ifcopenshell.api.geometry.add_representation

Module Contents

class ifcopenshell.api.geometry.add_representation.Usecase
convert_si_to_unit(co)
create_annotation2d_representation() ifcopenshell.entity_instance
create_annotation3d_representation() ifcopenshell.entity_instance
create_annotation_fill_areas(is_2d: bool = False) list[ifcopenshell.entity_instance]
create_arbitrary_extrusion_representation() ifcopenshell.entity_instance
create_arbitrary_void_extrusion_representation() ifcopenshell.entity_instance
create_box_representation() ifcopenshell.entity_instance
create_camera_block_representation() ifcopenshell.entity_instance
create_camera_pyramid_representation() ifcopenshell.entity_instance
create_cartesian_point(x: float, y: float, z: float | None = None, is_model_coords: bool = True) ifcopenshell.entity_instance

Create IfcCartesianPoint.

x, y, z coords are provided in SI units.

create_cartesian_point_list_from_vertices(vertices: bpy.types.MeshVertices, is_2d: bool = False, is_model_coords: bool = True) ifcopenshell.entity_instance
create_circle_extrusion_representation() ifcopenshell.entity_instance
create_cog_representation() ifcopenshell.entity_instance | None
create_curve2d_representation() ifcopenshell.entity_instance
create_curve3d_representation() ifcopenshell.entity_instance | None
create_curve_bounded_planes(is_2d: bool = False) list[ifcopenshell.entity_instance]
create_curve_from_polygon(points: ifcopenshell.entity_instance, polygon: bpy.types.MeshPolygon, is_2d: bool = False) ifcopenshell.entity_instance
create_curve_from_polygon_ifc2x3(polygon: bpy.types.MeshPolygon, is_2d: bool = False) ifcopenshell.entity_instance
create_curves(should_exclude_faces: bool = False, is_2d: bool = False, ignore_non_loose_edges: bool = False) list[ifcopenshell.entity_instance]
create_curves_from_curve(is_2d: bool = False, curve_object_data: bpy.types.Curve | None = None) list[ifcopenshell.entity_instance]
create_curves_from_curve_ifc2x3(is_2d: bool = False, curve_object_data: bpy.types.Curve | None = None) list[ifcopenshell.entity_instance]
create_curves_from_mesh(should_exclude_faces: bool = False, is_2d: bool = False) list[ifcopenshell.entity_instance]
create_curves_from_mesh_ifc2x3(should_exclude_faces=False, is_2d=False) list[ifcopenshell.entity_instance]
create_edge() ifcopenshell.entity_instance | None
create_faceted_brep() ifcopenshell.entity_instance
create_geometric_curve_set_representation(is_2d: bool = False) ifcopenshell.entity_instance
create_light_source() ifcopenshell.entity_instance | None
create_light_source_positional() ifcopenshell.entity_instance
create_lighting_representation() ifcopenshell.entity_instance
create_material_profile_set_extrusion_representation() ifcopenshell.entity_instance
create_mesh_representation() ifcopenshell.entity_instance
create_model_representation() ifcopenshell.entity_instance | None
create_plan_representation() ifcopenshell.entity_instance | None
create_plane(polygon: bpy.types.MeshPolygon) ifcopenshell.entity_instance
create_point_cloud_representation(is_2d: bool = False) ifcopenshell.entity_instance
create_polygonal_face_set() ifcopenshell.entity_instance
create_rectangle_extrusion_representation() ifcopenshell.entity_instance
create_structural_reference_representation() ifcopenshell.entity_instance
create_swept_disk_solid_representation() ifcopenshell.entity_instance
create_swept_disk_solids() list[ifcopenshell.entity_instance]
create_text() ifcopenshell.entity_instance
create_text_representation(is_2d: bool = False) ifcopenshell.entity_instance
create_triangulated_face_set() ifcopenshell.entity_instance
create_variable_representation() ifcopenshell.entity_instance | None
create_vertex_point(point: mathutils.Vector) ifcopenshell.entity_instance
create_vertices(is_2d: bool = False) None
evaluate_geometry() None
execute() ifcopenshell.entity_instance | None
is_camera_landscape() bool
is_mesh_curve_consecutive(geom_data: bpy.types.Mesh) bool
remove_doubles_from_mesh(mesh: bpy.types.Mesh) None
should_triangulate_face(face: bmesh.types.BMFace, threshold: float = EPSILON) bool
coordinate_offset: numpy.typing.NDArray[numpy.float64] | None
file: ifcopenshell.file
ifc_vertices: list[ifcopenshell.entity_instance]
settings: dict[str, Any]
ifcopenshell.api.geometry.add_representation.add_representation(file: ifcopenshell.file, *, context: ifcopenshell.entity_instance, blender_object: bpy.types.Object, geometry: bpy.types.Mesh | bpy.types.Curve, coordinate_offset: numpy.typing.NDArray[numpy.float64] | None = None, total_items: int = 1, unit_scale: float | None = None, should_force_faceted_brep: bool = False, should_force_triangulation: bool = False, should_generate_uvs: bool = False, ifc_representation_class: Literal['IfcExtrudedAreaSolid/IfcRectangleProfileDef', 'IfcExtrudedAreaSolid/IfcCircleProfileDef', 'IfcExtrudedAreaSolid/IfcArbitraryClosedProfileDef', 'IfcExtrudedAreaSolid/IfcArbitraryProfileDefWithVoids', 'IfcExtrudedAreaSolid/IfcMaterialProfileSetUsage', 'IfcGeometricCurveSet/IfcTextLiteral', 'IfcTextLiteral'] | None = None, profile_set_usage: ifcopenshell.entity_instance | None = None, text_literal: ifcopenshell.entity_instance | None = None) ifcopenshell.entity_instance | None

Add an IfcShapeRepresentation.

Parameters:
  • context – The IfcGeometricRepresentationContext.

  • blender_object – This is (currently) a Blender object, hence this depends on Blender now.

  • geometry – This is (currently) a Blender data object, hence this depends on Blender now.

  • coordinate_offset – Optionally apply a vector offset to all coordinates (in SI units).

  • total_items – How many representation items to create.

  • unit_scale – A scale factor to apply for all vectors in case the unit is different.

  • should_force_faceted_brep – If we should force faceted breps for meshes.

  • should_force_triangulation – If we should force triangulation for meshes.

  • should_generate_uvs – If UV coordinates should also be generated.

  • ifc_representation_class – Whether to cast a mesh into a particular class

  • profile_set_usage – The material profile set if the extrusion requires it

  • text_literal – The text literal if the representation requires it

Returns:

IfcShapeRepresentation or None if couldn’t create representation for the provided context.

ifcopenshell.api.geometry.add_representation.EPSILON = 1e-06
ifcopenshell.api.geometry.add_representation.X_AXIS
ifcopenshell.api.geometry.add_representation.Z_AXIS