mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Rewrite coordinate offset to use np.array not Vector() for precision
This commit is contained in:
@@ -83,7 +83,7 @@ def add_representation(
|
||||
"context": context,
|
||||
"blender_object": blender_object,
|
||||
"geometry": geometry,
|
||||
"coordinate_offset": coordinate_offset,
|
||||
"coordinate_offset": Vector(coordinate_offset) if coordinate_offset is not None else None,
|
||||
"total_items": total_items,
|
||||
"unit_scale": unit_scale,
|
||||
"should_force_faceted_brep": should_force_faceted_brep,
|
||||
|
||||
@@ -1086,12 +1086,12 @@ class ShapeBuilder:
|
||||
)
|
||||
return points, segments, transition_arc
|
||||
|
||||
def mesh(self, points: list[Vector], faces: list[list[int]]) -> ifcopenshell.entity_instance:
|
||||
def mesh(self, points: list[list[float]], faces: list[list[int]]) -> ifcopenshell.entity_instance:
|
||||
if self.file.schema == "IFC2X3":
|
||||
return self.faceted_brep(points, faces)
|
||||
return self.polygonal_face_set(points, faces)
|
||||
|
||||
def faceted_brep(self, points: list[Vector], faces: list[list[int]]) -> ifcopenshell.entity_instance:
|
||||
def faceted_brep(self, points: list[list[float]], faces: list[list[int]]) -> ifcopenshell.entity_instance:
|
||||
"""Generate an IfcFacetedBrep with a closed shell
|
||||
|
||||
Note that :func:`polygonal_face_set` is recommended in IFC4.
|
||||
@@ -1109,7 +1109,7 @@ class ShapeBuilder:
|
||||
]
|
||||
return self.file.createIfcFacetedBrep(self.file.createIfcClosedShell(faces))
|
||||
|
||||
def polygonal_face_set(self, points: list[Vector], faces: list[list[int]]) -> ifcopenshell.entity_instance:
|
||||
def polygonal_face_set(self, points: list[list[float]], faces: list[list[int]]) -> ifcopenshell.entity_instance:
|
||||
"""
|
||||
Generate an IfcPolygonalFaceSet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user