mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
black .
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user