mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Close #3615. Follow (terrible, unofficial) convention that boolean result is intentional and boolean clipping result is automated.
This commit is contained in:
@@ -47,21 +47,12 @@ class Usecase:
|
|||||||
representation_type = "Clipping"
|
representation_type = "Clipping"
|
||||||
items = []
|
items = []
|
||||||
for item in self.settings["representation"].Items:
|
for item in self.settings["representation"].Items:
|
||||||
if self.settings["operator"] == "DIFFERENCE":
|
# For now, we don't use IfcBooleanClippingResult.
|
||||||
queue = [item]
|
# This is unofficial but we assume that clipping results are part
|
||||||
while queue:
|
# of automated clips, whereas IfcBooleanResults are manual bools.
|
||||||
queue_item = queue.pop()
|
# This is really terrible, but until we find a better solution...
|
||||||
if queue_item.is_a() == "IfcBooleanResult":
|
items.append(self.file.createIfcBooleanResult(self.settings["operator"], item, result))
|
||||||
representation_type = "CSG"
|
self.settings["representation"].RepresentationType = "CSG"
|
||||||
break
|
|
||||||
if queue_item.is_a("IfcBooleanClippingResult"):
|
|
||||||
queue.append(item.FirstOperand)
|
|
||||||
queue.append(item.SecondOperand)
|
|
||||||
items.append(self.file.createIfcBooleanClippingResult(self.settings["operator"], item, result))
|
|
||||||
else:
|
|
||||||
representation_type = "CSG"
|
|
||||||
items.append(self.file.createIfcBooleanResult(self.settings["operator"], item, result))
|
|
||||||
self.settings["representation"].RepresentationType = representation_type
|
|
||||||
self.settings["representation"].Items = items
|
self.settings["representation"].Items = items
|
||||||
|
|
||||||
def create_half_space_solid(self):
|
def create_half_space_solid(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user