mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Fix #2523. Extrusion depth now reflects perpendicular depth
This commit is contained in:
@@ -59,7 +59,7 @@ class Usecase:
|
||||
self.file.createIfcArbitraryClosedProfileDef("AREA", None, curve),
|
||||
None,
|
||||
extrusion_direction,
|
||||
self.convert_si_to_unit(self.settings["depth"]),
|
||||
self.convert_si_to_unit(self.settings["depth"]) * 1 / cos(self.settings["x_angle"]),
|
||||
)
|
||||
if self.settings["clippings"]:
|
||||
return self.apply_clippings(extrusion)
|
||||
|
||||
@@ -51,6 +51,7 @@ class Usecase:
|
||||
def create_item(self):
|
||||
length = self.convert_si_to_unit(self.settings["length"])
|
||||
thickness = self.convert_si_to_unit(self.settings["thickness"])
|
||||
thickness *= 1 / cos(self.settings["x_angle"])
|
||||
points = (
|
||||
(0.0, 0.0),
|
||||
(0.0, thickness),
|
||||
@@ -76,7 +77,7 @@ class Usecase:
|
||||
self.file.createIfcDirection((1.0, 0.0, 0.0)),
|
||||
),
|
||||
extrusion_direction,
|
||||
self.convert_si_to_unit(self.settings["height"]),
|
||||
self.convert_si_to_unit(self.settings["height"]) * (1 / cos(self.settings["x_angle"])),
|
||||
)
|
||||
if self.settings["booleans"]:
|
||||
extrusion = self.apply_booleans(extrusion)
|
||||
|
||||
@@ -37,17 +37,17 @@ class Usecase:
|
||||
connections = [
|
||||
r
|
||||
for r in self.settings["element"].ConnectedTo
|
||||
if r.RelatingConnectionType == self.settings["connection_type"]
|
||||
if r.is_a("IfcRelConnectsPathElements") and r.RelatingConnectionType == self.settings["connection_type"]
|
||||
] + [
|
||||
r
|
||||
for r in self.settings["element"].ConnectedFrom
|
||||
if r.RelatedConnectionType == self.settings["connection_type"]
|
||||
if r.is_a("IfcRelConnectsPathElements") and r.RelatedConnectionType == self.settings["connection_type"]
|
||||
]
|
||||
else:
|
||||
connections = [
|
||||
r
|
||||
for r in self.settings["relating_element"].ConnectedTo
|
||||
if r.RelatedElement == self.settings["related_element"]
|
||||
if r.is_a("IfcRelConnectsPathElements") and r.RelatedElement == self.settings["related_element"]
|
||||
]
|
||||
|
||||
for connection in set(connections):
|
||||
|
||||
Reference in New Issue
Block a user