mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Display TargetScale in Contexts UI / edit target scale denominator (#6816)
This commit is contained in:
@@ -26,6 +26,7 @@ def add_context(
|
||||
context_type: Optional[ifcopenshell.util.representation.CONTEXT_TYPE] = None,
|
||||
context_identifier: Optional[ifcopenshell.util.representation.REPRESENTATION_IDENTIFIER] = None,
|
||||
target_view: Optional[ifcopenshell.util.representation.TARGET_VIEW] = None,
|
||||
target_scale: Optional[float] = None,
|
||||
parent: Optional[ifcopenshell.entity_instance] = None,
|
||||
) -> ifcopenshell.entity_instance:
|
||||
"""Adds a new geometric representation context
|
||||
@@ -107,6 +108,9 @@ def add_context(
|
||||
the common target views above or consult the IFC documentation
|
||||
(under the IfcShapeRepresentation page) for more details. Optional
|
||||
for contexts, but mandatory for subcontexts.
|
||||
:param target_scale: It defines the intended scale at which the representation
|
||||
is designed to be viewed or printed
|
||||
:type target_scale: float, optional
|
||||
:param parent: the parent context. Must be left as None (the default)
|
||||
for contexts, and only set for subcontexts. Note that there are only
|
||||
contexts and subcontexts, a subcontext cannot have any children.
|
||||
@@ -186,6 +190,7 @@ def add_context(
|
||||
"parent": parent,
|
||||
"context_identifier": context_identifier,
|
||||
"target_view": target_view,
|
||||
"target_scale": target_scale,
|
||||
}
|
||||
return usecase.execute()
|
||||
|
||||
@@ -221,6 +226,7 @@ class Usecase:
|
||||
"ContextType": self.settings["context_type"],
|
||||
"ParentContext": self.settings["parent"],
|
||||
"TargetView": self.settings["target_view"],
|
||||
"TargetScale": self.settings["target_scale"],
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user