Thu, 09/29/2022 - 09:57
Forums:
Ciao
let consider the step file in the attached picture:
the number of edges is 19.
A TopoDS_Shape is readed and loaded with a standard step reader (.oneShape()):
this is "aShape" in the following
TopTools_IndexedMapOfShape allEdges;
TopExp::MapShapes(aShape,TopAbs_EDGE,allEdges);
cout<<"____total number of edges: "<<allEdges.Extent()<<"____"<<endl;
This code gives me N = 20;
What's wrong?
Thank you for your help
Giovanni
Attachments:
Thu, 09/29/2022 - 10:20
The third part has 8 edges. Two of them is overlapping. If we can see the .brep file, it's better to understand
Thu, 09/29/2022 - 10:41
Thank you! The third part has 7 edges (one is shared)
Brep attached
Giovanni
Thu, 09/29/2022 - 10:49
you can run "\..\OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\inspector.bat" and check the model.
Thu, 09/29/2022 - 10:47
Without a real shape file it is discussion about nothing.
Thu, 09/29/2022 - 10:54
Ciao,
thank you for your reply. Unfortunately webpage does not allow to load an .stp file.
So I changed the extension in .txt. Please change it when loading.
This file has been loaded using a step reader (.oneShape()), and then written as .brep
(see the previous message) using BRepTools::write
Giovanni
Thu, 09/29/2022 - 14:02
The shape got from reading this step file has the same structure as the brep file uploaded earlier. The edges in it are not shared, and faces not connected, and each shell contains only one face.
Thu, 09/29/2022 - 17:25
Thank you Mikhail! I build the geometry with an external software: one face, two faces -> which intentionally do not share an edge <- and a shell, built by merging the previous two faces.
I concluded that five independent faces, instead of three faces and one shell, were produced by the software when exporting.
Thu, 09/29/2022 - 10:53
Your shape has 5 shells, 5 faces (not connected) and 20 edges. No one edge is shared. See the picture from draw. If an edge was shared it would be colored with yellow.