This commit is contained in:
Andrej730
2024-11-06 10:53:21 +05:00
parent 36bd89bb40
commit 4e070545ae
4 changed files with 12 additions and 8 deletions
@@ -397,13 +397,17 @@ class SheetBuilder:
data.update({"Sheet" + k: v for k, v in sheet.get_info().items()})
if not data["Name"]:
data["Name"] = ntpath.basename(foreground_path)[0:-4]
#If a perspective drawing, don't add scale to view title
# If a perspective drawing, don't add scale to view title
try:
is_perspective = drawing.Representation.Representations[0].Items[0].TreeRootExpression.FirstOperand.is_a("IfcRectangularPyramid")
is_perspective = (
drawing.Representation.Representations[0]
.Items[0]
.TreeRootExpression.FirstOperand.is_a("IfcRectangularPyramid")
)
except AttributeError:
is_perspective = False
if not is_perspective:
data["Scale"] = tool.Drawing.get_drawing_human_scale(drawing)
view.append(self.parse_embedded_svg(view_title, data))
@@ -1109,7 +1109,7 @@ class OverrideDuplicateMove(bpy.types.Operator):
single_obj = False
if len(old_to_new) == 1:
single_obj = True
for new in old_to_new.values():
if not hasattr(new[0], "ConnectedTo"):
continue
+1 -1
View File
@@ -1565,7 +1565,7 @@ class DumbWallJoiner:
axis1 = tool.Model.get_wall_axis(wall1, layers1)
bases = [axis1["base"][0].to_3d(), axis1["base"][1].to_3d(), axis1["side"][0].to_3d(), axis1["side"][1].to_3d()]
bases = [Vector((v[0], v[1], wall1.matrix_world.translation.z)) for v in bases] # add wall Z location
bases = [Vector((v[0], v[1], wall1.matrix_world.translation.z)) for v in bases] # add wall Z location
extrusion = self.get_extrusion_data(tool.Ifc.get().by_id(wall1.data.BIMMeshProperties.ifc_definition_id))
wall_dir = wall1.matrix_world.to_quaternion() @ extrusion["direction"]
@@ -47,7 +47,7 @@ def evaluate_representation(shape_rep: entity_instance, dist_along: float) -> np
s = ifcopenshell.geom.settings()
piecewise_function = ifcopenshell_wrapper.map_shape(s, shape_rep.wrapped_data)
pwf_evaluator = ifcopenshell_wrapper.piecewise_function_evaluator(piecewise_function,s)
pwf_evaluator = ifcopenshell_wrapper.piecewise_function_evaluator(piecewise_function, s)
trans_matrix = pwf_evaluator.evaluate(dist_along)
@@ -69,7 +69,7 @@ def evaluate_segment(segment: entity_instance, dist_along: float) -> np.ndarray:
s = ifcopenshell.geom.settings()
piecewise_function = ifcopenshell_wrapper.map_shape(s, segment.wrapped_data)
pwf_evaluator = ifcopenshell_wrapper.piecewise_function_evaluator(piecewise_function,s)
pwf_evaluator = ifcopenshell_wrapper.piecewise_function_evaluator(piecewise_function, s)
trans_matrix = pwf_evaluator.evaluate(dist_along)