ifcopenshell.api.geometry.add_mesh_representation
¶
Module Contents¶
- class ifcopenshell.api.geometry.add_mesh_representation.Usecase¶
- create_faceted_brep() ifcopenshell.entity_instance ¶
- create_mesh_representation() ifcopenshell.entity_instance ¶
- create_polygonal_face_set() ifcopenshell.entity_instance ¶
- execute(context: ifcopenshell.entity_instance, vertices: numpy.typing.NDArray[numpy.float64], faces: list[list[list[int]]], force_faceted_brep: bool) ifcopenshell.entity_instance ¶
- file: ifcopenshell.file¶
- vertices: numpy.typing.NDArray[numpy.float64]¶
In project units.
- ifcopenshell.api.geometry.add_mesh_representation.add_mesh_representation(file: ifcopenshell.file, context: ifcopenshell.entity_instance, vertices: list[ifcopenshell.util.shape_builder.SequenceOfVectors], edges: list[list[tuple[int, int]]] | None = None, faces: list[list[list[int]]] = None, coordinate_offset: ifcopenshell.util.shape_builder.VectorType | None = None, unit_scale: float | None = None, force_faceted_brep: bool = False) ifcopenshell.entity_instance ¶
Add a mesh representation.
Vertices, edges, and faces are given in the form of:
[item1, item2, item3, ...]
. EachitemN
is a sublist representing data for a separate IfcRepresentationItem to add.You can provide either
edges
orfaces
, no need to provide both. But currentlyedges
argument is not supported.- Parameters:
context – The IfcGeometricRepresentationContext for the representation.
vertices – A list of coordinates. where
itemN = [(0., 0., 0.), (1., 1., 1.), (x, y, z), ...]
edges – A list of edges, represented by vertex index pairs where
itemN = [(0, 1), (1, 2), (v1, v2), ...]
faces – A list of polygons, represented by vertex indices. where
itemN = [(0, 1, 2), (5, 4, 2, 3), (v1, v2, v3, ... vN), ...]
coordinate_offset – Optionally apply a vector offset to all coordinates. In project units.
unit_scale –
Scale factor for
vertices
units.If omitted, it is assumed that
vertices
are in SI units.If other value is provided
vertices
coords will be divided byunit_scale
.force_faceted_brep – Force using IfcFacetedBreps instead of IfcPolygonalFaceSets.
- Returns:
IfcShapeRepresentation.
- ifcopenshell.api.geometry.add_mesh_representation.COORD_3D¶
- ifcopenshell.api.geometry.add_mesh_representation.T¶