Reading STEP properties with pythonocc

1k views Asked by At

I'm struggling to read presentation layer assignments out of an AP214 STEP CAD file with pythonocc. The file will read in, but I only get 1 shape and I'm not sure how to access any other attributes of the OCC.TopoDS.TopoDS_Shape object. I tried to go through the c++ from OCE but unfortunately my c++ is rusty and I failed to find anything helpful

I have lines at the end of the file like the following that assign the properties I'd like to use:

#27092=PRESENTATION_LAYER_ASSIGNMENT('PROPERTY001','PROPERTY001|ANSA_Thick=1.',(#587));
#27093=PRESENTATION_LAYER_ASSIGNMENT('PROPERTY002','PROPERTY002|ANSA_Thick=1.',(#24235));

Where PROPERTY001 and PROPERTY002 are the names of the properties I need to keep.

Ultimately what I'm looking to do is read in a STEP file, apply a mesh to the surface, and output an STL file while maintaining the property definitions such that the output STL file has multiple solids that correspond to each presentation_layer_assignment property from the input STEP file.

I'm using pythonocc-0.6a and OCEv11

Does anyone have any experience with this or suggestions? Thanks

0

There are 0 answers