mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
black .
This commit is contained in:
@@ -177,7 +177,7 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
vec = Vector((1, 0, 0)) # Fallback to a unit vector
|
vec = Vector((1, 0, 0)) # Fallback to a unit vector
|
||||||
else:
|
else:
|
||||||
vec = vec.normalized()
|
vec = vec.normalized()
|
||||||
scaled_length = 0.023 * scale #0.023 could probably be a preference
|
scaled_length = 0.023 * scale # 0.023 could probably be a preference
|
||||||
co_end = co1 + vec * scaled_length
|
co_end = co1 + vec * scaled_length
|
||||||
obj = annotation.Annotator.add_line_to_annotation(obj, co_end, co1)
|
obj = annotation.Annotator.add_line_to_annotation(obj, co_end, co1)
|
||||||
obj.matrix_world = obj.matrix_world @ Matrix.Rotation(math.radians(-90), 4, "Z")
|
obj.matrix_world = obj.matrix_world @ Matrix.Rotation(math.radians(-90), 4, "Z")
|
||||||
|
|||||||
@@ -125,7 +125,9 @@ class Spatial(bonsai.core.tool.Spatial):
|
|||||||
return ifcopenshell.util.element.get_container(element)
|
return ifcopenshell.util.element.get_container(element)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_decomposed_elements(cls, container: ifcopenshell.entity_instance, is_recursive=True) -> list[ifcopenshell.entity_instance]:
|
def get_decomposed_elements(
|
||||||
|
cls, container: ifcopenshell.entity_instance, is_recursive=True
|
||||||
|
) -> list[ifcopenshell.entity_instance]:
|
||||||
return ifcopenshell.util.element.get_decomposition(container, is_recursive=is_recursive)
|
return ifcopenshell.util.element.get_decomposition(container, is_recursive=is_recursive)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -1304,9 +1306,10 @@ class Spatial(bonsai.core.tool.Spatial):
|
|||||||
props = cls.get_object_spatial_props(obj)
|
props = cls.get_object_spatial_props(obj)
|
||||||
props.container_obj = container_obj
|
props.container_obj = container_obj
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_filtered_elements(cls, should_filter: bool = True, is_recursive: bool = True) -> Iterable[ifcopenshell.entity_instance]:
|
def get_filtered_elements(
|
||||||
|
cls, should_filter: bool = True, is_recursive: bool = True
|
||||||
|
) -> Iterable[ifcopenshell.entity_instance]:
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
props = cls.get_spatial_props()
|
props = cls.get_spatial_props()
|
||||||
container = ifc_file.by_id(props.active_container.ifc_definition_id)
|
container = ifc_file.by_id(props.active_container.ifc_definition_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user