mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 23:02:39 +00:00
assign/unassign layer - mention representations
This commit is contained in:
@@ -22,7 +22,7 @@ import ifcopenshell
|
|||||||
def assign_layer(
|
def assign_layer(
|
||||||
file: ifcopenshell.file, items: list[ifcopenshell.entity_instance], layer: ifcopenshell.entity_instance
|
file: ifcopenshell.file, items: list[ifcopenshell.entity_instance], layer: ifcopenshell.entity_instance
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Assigns representation items to a layer
|
"""Assigns representation items or representations to a layer
|
||||||
|
|
||||||
In IFC, instead of objects being assigned to layers, representation
|
In IFC, instead of objects being assigned to layers, representation
|
||||||
items are assigned to layers. Representation items are portions of the
|
items are assigned to layers. Representation items are portions of the
|
||||||
@@ -31,7 +31,7 @@ def assign_layer(
|
|||||||
its frame) assigned to one layer, and another portion (e.g. the glazing
|
its frame) assigned to one layer, and another portion (e.g. the glazing
|
||||||
panels) assigned to another layer.
|
panels) assigned to another layer.
|
||||||
|
|
||||||
:param items: The list of IfcRepresentationItems to assign to the layer. This
|
:param items: The list of IfcRepresentationItems / IfcRepresentations to assign to the layer. This
|
||||||
should be the items from the object's IfcShapeRepresentation.
|
should be the items from the object's IfcShapeRepresentation.
|
||||||
:param layer: The IfcPresentationLayerAssignment layer to assign the
|
:param layer: The IfcPresentationLayerAssignment layer to assign the
|
||||||
item to.
|
item to.
|
||||||
|
|||||||
@@ -23,14 +23,13 @@ import ifcopenshell.util.element
|
|||||||
def unassign_layer(
|
def unassign_layer(
|
||||||
file: ifcopenshell.file, items: list[ifcopenshell.entity_instance], layer: ifcopenshell.entity_instance
|
file: ifcopenshell.file, items: list[ifcopenshell.entity_instance], layer: ifcopenshell.entity_instance
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Unassigns representation items from a layer
|
"""Unassigns representation items or representations from a layer
|
||||||
|
|
||||||
If the representation item isn't assigned to the layer, nothing will
|
If the element isn't assigned to the layer, nothing will happen.
|
||||||
happen.
|
|
||||||
If after unassignment layer won't have any assigned items it will be
|
If after unassignment layer won't have any assigned items it will be
|
||||||
removed to keep IFC valid.
|
removed to keep IFC valid.
|
||||||
|
|
||||||
:param items: A list IfcRepresentationItem elements to unassign
|
:param items: A list IfcRepresentationItem / IfcRepresentation elements to unassign
|
||||||
:param layer: The IfcPresentationLayerAssignment to unassign from
|
:param layer: The IfcPresentationLayerAssignment to unassign from
|
||||||
:return: None
|
:return: None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user