mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
shape_builder - create non-optional position for profiles in ifc2x3
This commit is contained in:
@@ -344,6 +344,16 @@ class ShapeBuilder:
|
|||||||
"Ref: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcArbitraryClosedProfileDef.htm#8.15.3.1.4-Formal-propositions"
|
"Ref: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcArbitraryClosedProfileDef.htm#8.15.3.1.4-Formal-propositions"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
kwargs = {
|
||||||
|
"ProfileName": name,
|
||||||
|
"ProfileType": profile_type,
|
||||||
|
"OuterCurve": outer_curve,
|
||||||
|
}
|
||||||
|
if self.file.schema == "IFC2X3":
|
||||||
|
kwargs["Position"] = self.file.create_entity(
|
||||||
|
"IfcAxis2Placement2D", self.file.create_entity("IfcCartesianPoint", [0.0, 0.0])
|
||||||
|
)
|
||||||
|
|
||||||
if inner_curves:
|
if inner_curves:
|
||||||
if not isinstance(inner_curves, collections.abc.Iterable):
|
if not isinstance(inner_curves, collections.abc.Iterable):
|
||||||
inner_curves = [inner_curves]
|
inner_curves = [inner_curves]
|
||||||
@@ -354,13 +364,9 @@ class ShapeBuilder:
|
|||||||
"Ref: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcArbitraryClosedProfileDef.htm#8.15.3.1.4-Formal-propositions"
|
"Ref: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcArbitraryClosedProfileDef.htm#8.15.3.1.4-Formal-propositions"
|
||||||
)
|
)
|
||||||
|
|
||||||
profile = self.file.createIfcArbitraryProfileDefWithVoids(
|
profile = self.file.create_entity("IfcArbitraryProfileDefWithVoids", InnerCurves=inner_curves, **kwargs)
|
||||||
ProfileName=name, ProfileType=profile_type, OuterCurve=outer_curve, InnerCurves=inner_curves
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
profile = self.file.createIfcArbitraryClosedProfileDef(
|
profile = self.file.create_entity("IfcArbitraryClosedProfileDef", **kwargs)
|
||||||
ProfileName=name, ProfileType=profile_type, OuterCurve=outer_curve
|
|
||||||
)
|
|
||||||
return profile
|
return profile
|
||||||
|
|
||||||
def translate(self, curve_or_item, translation: Vector, create_copy=False):
|
def translate(self, curve_or_item, translation: Vector, create_copy=False):
|
||||||
|
|||||||
Reference in New Issue
Block a user