gumyr / build123d

A python CAD programming library
Apache License 2.0
556 stars 93 forks source link

Oriented BoundBox not working correctly #624

Open jdegenstein opened 6 months ago

jdegenstein commented 6 months ago
bb2 = BoundBox._from_topo_ds(
    Solid.make_cylinder(0.5, 0.5).translate((0, 0, 0.1)).wrapped, optimal=False, oriented=True
)

Returns: AttributeError: 'OCP.Bnd.Bnd_OBB' object has no attribute 'Get'

The API for these two is different apparently in OCCT

https://dev.opencascade.org/doc/refman/html/class_bnd___o_b_b.html

https://dev.opencascade.org/doc/refman/html/class_bnd___box.html

jdegenstein commented 1 month ago

Current best idea is to overload the init for bounding_box() for the oriented bounding box case and add customized logic for that

jdegenstein commented 1 month ago

better idea would be to create a new class OrientedBoundBox as the existing BoundBox class is not fit for purpose