pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

Data Exchange - Loading file structure and names

Open BacchusX1 opened this issue 1 year ago • 0 comments

Hi all,

I am new to python occ so thanks for any help in advance.

I utilize occ to create graphs from step files and perform a classification task on extracted features from graph (connectivity, etc) and step (face types, volume etc). I want to process assemblies, identify common standard parts, delete them and finally safe a step file without standard parts.

This works fine but I cannot retain the overall structure after writing the step without standard parts in the end.

I have the problem that I cannot load a step files complete structure (assembly - subassembly - solid) with its names and afterwards write it in the same way.

I have learned that compounds can be used to pack solids into assemblies. And I have seen the read_step_file_with_names_colors() function but no writer corresponding to it.

Has anyone a solution to retain the step file structure (assembly, subassembly, solid and associated names) during reading and writing?

Update 19.10.2024:

I have found issue: https://github.com/tpaviot/pythonocc-core/issues/805. Based on that I will try to extract assembly structure. (https://github.com/dblanding/kodacad/blob/master/stepanalyzer.py)

For writing the assembly structure with names, I did not found a solution yet, so I would keep the issue open and keep you updated. I hope to close the issue with a complete example.

BacchusX1 avatar Oct 16 '24 09:10 BacchusX1