Update all geom settings to new v0.8 syntax

This commit is contained in:
Dion Moult
2024-06-09 16:15:55 +10:00
parent 52f9db4522
commit cdce612566
17 changed files with 37 additions and 40 deletions
@@ -140,7 +140,7 @@ class Usecase:
return (self.settings["profile"].FlangeWidth * 2) - self.settings["profile"].WebThickness
else:
settings = ifcopenshell.geom.settings()
settings.set(settings.INCLUDE_CURVES, True)
settings.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
shape = ifcopenshell.geom.create_shape(settings, self.settings["profile"])
x = [shape.verts[i] for i in range(0, len(shape.verts), 3)]
return self.convert_si_to_unit(max(x) - min(x))
@@ -169,7 +169,7 @@ class Usecase:
return self.settings["profile"].Depth
else:
settings = ifcopenshell.geom.settings()
settings.set(settings.INCLUDE_CURVES, True)
settings.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
shape = ifcopenshell.geom.create_shape(settings, self.settings["profile"])
y = [shape.verts[i + 1] for i in range(0, len(shape.verts), 3)]
return self.convert_si_to_unit(max(y) - min(y))
@@ -144,7 +144,7 @@ class Usecase:
}
)
self.settings_2d = ifcopenshell.geom.settings()
self.settings_2d.set(self.settings_2d.INCLUDE_CURVES, True)
self.settings_2d.set("dimensionality", ifcopenshell.ifcopenshell_wrapper.CURVES_SURFACES_AND_SOLIDS)
shape = ifcopenshell.geom.create_shape(self.settings_2d, dummy_solid)
if self.cardinal_point == 1: