Forum archiveIssue archiveData Exchange and Application Framework

Archived discussion

Read Step file and correct location of parts

Data Exchange and Application FrameworkFri, 08/23/2024 - 09:500 replies

Browse this forum
QuestionAuthor

Dear all,

I'm trying to read a Step file and retrieve the correct location and colour of each of the parts. I found a snippet of code (https://github.com/tpaviot/pythonocc-core/blob/master/src/Extend/DataExchange.py) and implemented in my code. I'm attaching my code in text format, as the forum doesn't allow python extensions. One needs to change the format to ".py" for it to run.
The thing is, a lot of parts have the same location, and I know that they are not because I see them in different locations in a CAD visualiser e.g. FreeCAD. What is interesting is that in FreeCAD the graphics show the parts in different locations, but its data show the same location in the "world". I've read something about the vertices actually being in the correct locations, but I'm very confused on how to implement that, and I'm cracking my head for days with this.

I'd appreciate any help!
Thanks in advance.

Discussion

No archived replies

Posts are displayed in their archived order.