Close #3615. Follow (terrible, unofficial) convention that boolean result is intentional and boolean clipping result is automated.

This commit is contained in:
Dion Moult
2023-08-21 08:53:14 +10:00
parent ffa5686b22
commit 0044ef5588
@@ -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):