Sat, 06/10/2017 - 02:52
Forums:
Hi, All
Got on my hands STEP file, which I was able to read and retrieve TopoDS_Shape(TopoDS_Solid). It looks like small tube bent along complex path.
I'm able to display it, check flags etc, so far so good. But how I could extract actual solid parameters (radii, bending path)?
Any help would be greatly appreciated
Sat, 06/10/2017 - 07:42
All features, such as bends, whatever, are lost once the model is saved to STEP (or any other neutral) format. Generally speaking, what you need is automatic feature recognition. In a simple setting, you can just traverse through the faces of your model and check the host surface types. A cylindrical surface may mean bend. Its radius will be the radius you're looking for. Can you share your file to have better idea on kind of features it contains?
Sat, 06/10/2017 - 15:21
thank you for the reply.
Yes, I have several faces etc inside the solid, but they all are of TopoDS_Face type, so question how to get data from that is still open.
Please find attached STEP file
Sat, 06/10/2017 - 19:01
I will have a look, thanks. In the meanwhile, you can refer to BRep_Tool::Surface() method which gives access to the host geometry of your topological faces.
Sun, 06/11/2017 - 05:28
Thank you , will try
Just in case I've attached Python code I used to read and display it - works for me on Anaconda2, python-2.7, python OCC binding
regards
SP
Sun, 06/11/2017 - 11:49
Hi Severin
I have made a small script that shows your step-data,
and loops over the edges.: ExtractShape
In the log file you can see all curve types.
Best regards, Guido
Sun, 06/11/2017 - 20:41
Thank you, Guido
looks like what I needed
sincerely
SP
Wed, 10/09/2024 - 17:12
Hi Team,
By any chance can you still share the Extract Shape script? It's not opening now in 2024.