Fri, 07/08/2022 - 21:44
Hi,
to build lean models of gears, I - first build a tooth-face of a single tooth-bspline-surface - use BRepBuilderAPI_Transform to build the other teeth by creating copyless transformations of the first toot-face as a pattern - use BRepBuilderAPI_Sewing to sew the teeth to a gear-shell (- finally I use these gear-shell to split a solid-shape into two gear-solids )
Like expected writing the lean gear-shell with BRepTools::Write leads to a very small brep-file. Thanks to the non-copy-option of the BRepBuilderAPI_Transform it's hardly bigger than the BREP-File of the single tooth-face. Also like expected the size of the file rises with the number of teeth when using the copy-option of BRepBuilderAPI_Transform.
But when writing the same lean shell with STEPCAFControl_Writer this always leads to exorbitant big files (with hundreds of surface instances inside). Addingly the size of the file is independent of the copy/noncopy option of the BRepBuilderAPI_Transform. On the other side the STEPCAFControl_Writer in general is able to deal with cited faces without building new space-wasting instances of the underlying surface.
How to also get a smart lean step-export of this lean shape?
Thanks and kind regards
The following part shows the Core-Routine building the shell:
for (Standard_Integer iFace = 0; iFace < round(abs(theNbPeriods)); iFace++)
{
gp_Trsf aRot;
aRot.SetRotation(gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)), (2.0 * M_PI / theNbPeriods) * iFace);
TopoDS_Shape aFace = BRepBuilderAPI_Transform(aBFace, aRot, false).Shape();
aSewing.Add(aFace);
aNbFaces++;
}
When viewing the appended files with the "CAD Assistant" the property "Shape Mesh Quality" should by "very high"