Skip to content

Commit 8998e13

Browse files
committed
add obb functions
1 parent 7a946b1 commit 8998e13

File tree

1 file changed

+9
-0
lines changed
  • src/compas/datastructures/mesh

1 file changed

+9
-0
lines changed

src/compas/datastructures/mesh/mesh.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import sys
77
from math import pi
88

9+
import compas
10+
911
from compas.files import OBJ
1012
from compas.files import OFF
1113
from compas.files import PLY
@@ -123,6 +125,13 @@ class Mesh(HalfEdge):
123125
unify_cycles = mesh_unify_cycles
124126
quads_to_triangles = mesh_quads_to_triangles
125127

128+
if not compas.IPY:
129+
from .bbox_numpy import mesh_oriented_bounding_box_numpy
130+
from .bbox_numpy import mesh_oriented_bounding_box_xy_numpy
131+
132+
obb_numpy = mesh_oriented_bounding_box_numpy
133+
obb_xy_numpy = mesh_oriented_bounding_box_xy_numpy
134+
126135
def __init__(self, name=None, default_vertex_attributes=None, default_edge_attributes=None, default_face_attributes=None):
127136
name = name or 'Mesh'
128137
_default_vertex_attributes = {'x': 0.0, 'y': 0.0, 'z': 0.0}

0 commit comments

Comments
 (0)