move to tools methods for working with manual booleans #3709

Also fixed a bug adding boolean when pset is already added and representation type in add_boolean

```
  File "\addons\blenderbim\tool\ifc.py", line 201, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\addons\blenderbim\bim\ifc.py", line 336, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\addons\blenderbim\bim\module\model\opening.py", line 534, in _execute
    data = json.loads(pset["Data"])
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 248, in __getitem__
    if key < 0 or key >= len(self):
TypeError: '<' not supported between instances of 'str' and 'int'
```
This commit is contained in:
Andrej730
2023-10-17 16:38:25 +05:00
parent 3f018a4195
commit 35d66f5d8c
4 changed files with 69 additions and 53 deletions
@@ -57,9 +57,11 @@ class Usecase:
)
):
items.append(self.file.createIfcBooleanClippingResult(self.settings["operator"], item, result))
representation_type = "Clipping"
else:
items.append(self.file.createIfcBooleanResult(self.settings["operator"], item, result))
self.settings["representation"].RepresentationType = "CSG"
representation_type = "CSG"
self.settings["representation"].RepresentationType = representation_type
self.settings["representation"].Items = items
return items