right number of edges

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: 
leo lei's picture

The third part has 8 edges. Two of them is overlapping. If we can see the .brep file, it's better to understand

Giovanni Bettega's picture

Thank you! The third part has 7 edges (one is shared)
Brep attached
Giovanni

Attachments: 
leo lei's picture

you can run "\..\OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\inspector.bat" and check the model.

Mikhail Sazonov's picture

Without a real shape file it is discussion about nothing.

Giovanni Bettega's picture

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

Attachments: 
Mikhail Sazonov's picture

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.

Giovanni Bettega's picture

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.

Mikhail Sazonov's picture

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.

Attachments: