-
-
Notifications
You must be signed in to change notification settings - Fork 406
Export additional object information to STEP #843
Copy link
Copy link
Open
Labels
Description
I managed to successfully build a STEP file with multiple entities grouped into compounds using StepControl_Writer and I'm wondering how to add additional information that is associated to every entity. I'm interested mostly in object names and properties.
In my STEP file every object is named like:
--Open CASCADE STEP Translator 7.4.1
--Open CASCADE STEP Translator 7.4.1.1_1
--mesh_name_undefined
--Open CASCADE STEP Translator 7.4.1.1_2
--mesh_name_undefined
while I'm trying to visualize them, and it comes from:
#7 = PRODUCT('Open CASCADE STEP translator 7.4 1', 'Open CASCADE STEP translator 7.4 1','',(#8));
I'd like to add unique names to products and for each of them add a set of properties similar to IFC. Unfortunately can't find any example and not sure if this is even possible.
A small piece of my code just to show how I tackle geometry:
step_writer = STEPControl_Writer()
builder = BRep_Builder()
root_compound = TopoDS_Compound()
builder.MakeCompound(root_compound)
for geometry in geometries:
sew = BRepBuilderAPI_Sewing()
vertices = np.array([gp_Pnt(p[0],p[1],p[2]) for p in geometry['vertices']])
for face in geometry['faces']:
sew.Add(create_face_from_points(vertices[face]))
sew.Perform()
builder.Add(root_compound, sew.SewedShape())
step_writer.Transfer(root_compound, STEPControl_AsIs)
step_writer.Write('filename.stp')
Reactions are currently unavailable