mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
Fix #2947. Embarrassing bug where slabs didn't consider the total thickness.
This commit is contained in:
@@ -95,13 +95,14 @@ class SvgWriter:
|
|||||||
if not resource_path:
|
if not resource_path:
|
||||||
self.resource_paths[resource] = None
|
self.resource_paths[resource] = None
|
||||||
continue
|
continue
|
||||||
|
resource_path = tool.Ifc.resolve_uri(resource_path)
|
||||||
os.makedirs(os.path.dirname(resource_path), exist_ok=True)
|
os.makedirs(os.path.dirname(resource_path), exist_ok=True)
|
||||||
if not os.path.exists(resource_path):
|
if not os.path.exists(resource_path):
|
||||||
resource_basename = os.path.basename(resource_path)
|
resource_basename = os.path.basename(resource_path)
|
||||||
ootb_resource = os.path.join(bpy.context.scene.BIMProperties.data_dir, "assets", resource_basename)
|
ootb_resource = os.path.join(bpy.context.scene.BIMProperties.data_dir, "assets", resource_basename)
|
||||||
if os.path.exists(ootb_resource):
|
if os.path.exists(ootb_resource):
|
||||||
shutil.copy(ootb_resource, resource_path)
|
shutil.copy(ootb_resource, resource_path)
|
||||||
self.resource_paths[resource] = tool.Ifc.resolve_uri(resource_path)
|
self.resource_paths[resource] = resource_path
|
||||||
|
|
||||||
def define_boilerplate(self):
|
def define_boilerplate(self):
|
||||||
self.add_stylesheet()
|
self.add_stylesheet()
|
||||||
|
|||||||
@@ -238,11 +238,11 @@ class DumbSlabPlaner:
|
|||||||
if not rel.is_a("IfcRelAssociatesMaterial"):
|
if not rel.is_a("IfcRelAssociatesMaterial"):
|
||||||
continue
|
continue
|
||||||
for element in rel.RelatedObjects:
|
for element in rel.RelatedObjects:
|
||||||
self.change_thickness(element, thickness)
|
self.change_thickness(element, total_thickness)
|
||||||
else:
|
else:
|
||||||
for rel in inverse.AssociatedTo:
|
for rel in inverse.AssociatedTo:
|
||||||
for element in rel.RelatedObjects:
|
for element in rel.RelatedObjects:
|
||||||
self.change_thickness(element, thickness)
|
self.change_thickness(element, total_thickness)
|
||||||
|
|
||||||
def regenerate_from_type(self, usecase_path, ifc_file, settings):
|
def regenerate_from_type(self, usecase_path, ifc_file, settings):
|
||||||
obj = tool.Ifc.get_object(settings["related_object"])
|
obj = tool.Ifc.get_object(settings["related_object"])
|
||||||
|
|||||||
Reference in New Issue
Block a user