dtcc-platform / dtcc-model

MIT License
1 stars 1 forks source link

Method to return a 3D bounds for a Mesh object #25

Closed snjsomnath closed 4 months ago

snjsomnath commented 11 months ago

https://github.com/dtcc-platform/dtcc-model/blob/6516b992416964cf33052d9831af107e76b16dfb/src/dtcc_model/geometry/mesh.py#L109

The Mesh.center() returns the geometric center of the points. It would also be useful to do something like Mesh.bounds() / Mesh.bbox or something similar to return a 3D bounding box which could then have a its own center method.

This is useful for transform operations, for example in the Unreal workflow.

anderslogg commented 11 months ago

@snjsomnath @dwastberg Agree. We already have that in the new data model (which is half-implemented). A Mesh is a subclass of Geometry and Geometry has a .bounds member which has .center.

anderslogg commented 4 months ago

I think this is fixed. A Mesh is a Geometry and therefore has .bounds