mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 14:48:02 +00:00
black .
This commit is contained in:
@@ -398,9 +398,13 @@ class SheetBuilder:
|
|||||||
if not data["Name"]:
|
if not data["Name"]:
|
||||||
data["Name"] = ntpath.basename(foreground_path)[0:-4]
|
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:
|
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:
|
except AttributeError:
|
||||||
is_perspective = False
|
is_perspective = False
|
||||||
|
|
||||||
|
|||||||
@@ -1565,7 +1565,7 @@ class DumbWallJoiner:
|
|||||||
axis1 = tool.Model.get_wall_axis(wall1, layers1)
|
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 = [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))
|
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"]
|
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()
|
s = ifcopenshell.geom.settings()
|
||||||
piecewise_function = ifcopenshell_wrapper.map_shape(s, shape_rep.wrapped_data)
|
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)
|
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()
|
s = ifcopenshell.geom.settings()
|
||||||
piecewise_function = ifcopenshell_wrapper.map_shape(s, segment.wrapped_data)
|
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)
|
trans_matrix = pwf_evaluator.evaluate(dist_along)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user