In a STEP file I generated with OpenCascade, I can see this:
#58 = VERTEX_POINT('',#59);
#59 = CARTESIAN_POINT('',(-0.5,-0.5,-0.5));
#60 = VERTEX_POINT('',#61);
#61 = CARTESIAN_POINT('',(0.5,-0.5,-0.5));
#62 = SURFACE_CURVE('',#63,(#67,#79),.PCURVE_S1.);
#63 = LINE('',#64,#65);
#64 = CARTESIAN_POINT('',(-0.5,-0.5,-0.5));
#65 = VECTOR('',#66,1.);
#66 = DIRECTION('',(1.,0.,0.));
#67 = PCURVE('',#68,#73);
The repetition of data #59
and #64
annoys me a bit.
Seems like this STEP file could be a bit smaller (particularly if there thousand of vertices).
And when I edit the file to use #59
where #64
is used, it still looks fine.
Is there a good reason to have this duplicated data? And more important, is there a way to avoid it?
I already tried creating a TopoDS_Vertex
for each vertex and avoid repeating TopoDS_Edge
s that connect the same two vertices.
Those edges are then used to create a TopoDS_Wire
, which in turn is used to create TopoDS_Face
.
The whole mesh is put together with a BRepBuilderAPI_Sewing
.
Thanks