Open
Description
I have an assembly step file and I'm trying to return the part names and part origin locations with respect to the top-level assembly origin. I've tried something like this for getting origin location but all three parts come back as (0.0, 0.0, 0.0):
step_reader = STEPControl_Reader()
step_reader.ReadFile('./test_assy.stp')
step_reader.TransferRoots()
myshape = step_reader.Shape()
it = TopoDS_Iterator(myshape)
while it.More():
shp = it.Value()
trsf = myshape.Location().Transformation()
print (trsf.TranslationPart().Coord())
it.Next()
I'm also not sure if it's more appropriate to use XCAF and something like ShapeTool which I've seen in some assembly examples.