예제 #1
0
 def __init__(
     self,
     length: float,
     width: float,
     height: float,
     name: str = "",
     units: str = "m",
 ):
     Group.__init__(self, name)
     self._size = [length, width, height]
     self._units = units
     self.nx_class = GEOMETRY_NX_CLASS
     self._create_datasets_and_add_to_shape_group()
예제 #2
0
 def __init__(
     self,
     vertices: List[QVector3D] = None,
     faces: List[List[int]] = None,
     name: str = "",
     colors: List[List[int]] = [],
 ):
     """
     :param vertices: list of Vector objects used as corners of polygons in the geometry
     :param faces: list of integer lists. Each sublist is a winding path around the corners of a polygon.
         Each sublist item is an index into the vertices list to identify a specific point in 3D space
     """
     Group.__init__(self, name)
     OFFGeometry.__init__(self)
     self.name = name
     self._vertices = vertices
     self._faces = faces
     self._colors = colors