my bad, it took another few lines to add the Locations... sorry for the noise...
Archived discussion
Bug | BRepTools_ShapeSet.WriteToString does not serialize TopoDS.Location
The subject sums it up; when serializing a TopoDS_Shape with the BRepTools_ShapeSet class, the "Location" attribute is not transferred properly.
Expressed in pythonocc:
boxA = make_cube(1,1,1)
boxB = copy.deepcopy(translate_topods_from_vector(make_cube(1,1,1), gp_Vec(10,0,0)))
for i,j in zip(Topo(boxA).vertices(), Topo(boxB).vertices()):
a,b = vertex2pnt(i),vertex2pnt(j)
assert a == b
AssertionError: !=
The docs state:
"Contains a Shape and all its subshapes, locations and geometries"
Not true according to this test... however, I'm surprised I would be the first to stumble upon this...
-jelle
Discussion
1 archived reply
Posts are displayed in their archived order.