mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 05:46:51 +00:00
black .
This commit is contained in:
@@ -354,7 +354,7 @@ class PolylineOperator:
|
|||||||
self.snapping_points = tool.Snap.select_snapping_points(context, event, self.tool_state, detected_snaps)
|
self.snapping_points = tool.Snap.select_snapping_points(context, event, self.tool_state, detected_snaps)
|
||||||
|
|
||||||
if self.snapping_points[0][1] not in {"Plane", "Axis"}:
|
if self.snapping_points[0][1] not in {"Plane", "Axis"}:
|
||||||
should_round=False
|
should_round = False
|
||||||
|
|
||||||
tool.Polyline.calculate_distance_and_angle(
|
tool.Polyline.calculate_distance_and_angle(
|
||||||
context, self.input_ui, self.tool_state, should_round=should_round
|
context, self.input_ui, self.tool_state, should_round=should_round
|
||||||
|
|||||||
@@ -152,13 +152,13 @@ class BIMModelProperties(PropertyGroup):
|
|||||||
direction_sense: bpy.props.EnumProperty(
|
direction_sense: bpy.props.EnumProperty(
|
||||||
items=[("POSITIVE", "Positive", ""), ("NEGATIVE", "Negative", "")],
|
items=[("POSITIVE", "Positive", ""), ("NEGATIVE", "Negative", "")],
|
||||||
name="Material Usage Direction Sense",
|
name="Material Usage Direction Sense",
|
||||||
default="POSITIVE"
|
default="POSITIVE",
|
||||||
)
|
)
|
||||||
offset_type: bpy.props.EnumProperty(
|
offset_type: bpy.props.EnumProperty(
|
||||||
items=[("EXTERIOR", "Exterior", ""), ("CENTER", "Center", ""), ("INTERIOR", "Interior", "")],
|
items=[("EXTERIOR", "Exterior", ""), ("CENTER", "Center", ""), ("INTERIOR", "Interior", "")],
|
||||||
name="Layer Offset Type",
|
name="Layer Offset Type",
|
||||||
default="EXTERIOR",
|
default="EXTERIOR",
|
||||||
description="It's a convention that affects the offset to reference line"
|
description="It's a convention that affects the offset to reference line",
|
||||||
)
|
)
|
||||||
offset: bpy.props.FloatProperty(name="Offset", default=0.0, description="Material usage offset from reference line")
|
offset: bpy.props.FloatProperty(name="Offset", default=0.0, description="Material usage offset from reference line")
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,6 @@ class Polyline(bonsai.core.tool.Polyline):
|
|||||||
if round(angle, 4) == round(math.pi, 4):
|
if round(angle, 4) == round(math.pi, 4):
|
||||||
rot_vector.x = -1.0
|
rot_vector.x = -1.0
|
||||||
|
|
||||||
|
|
||||||
coords = rot_vector * distance + last_point
|
coords = rot_vector * distance + last_point
|
||||||
|
|
||||||
x = coords[0]
|
x = coords[0]
|
||||||
@@ -335,7 +334,7 @@ class Polyline(bonsai.core.tool.Polyline):
|
|||||||
offset_type = model_props.offset_type
|
offset_type = model_props.offset_type
|
||||||
offset = 0
|
offset = 0
|
||||||
if offset_type == "CENTER":
|
if offset_type == "CENTER":
|
||||||
offset = -thickness/2
|
offset = -thickness / 2
|
||||||
elif offset_type == "INTERIOR":
|
elif offset_type == "INTERIOR":
|
||||||
offset = -thickness
|
offset = -thickness
|
||||||
|
|
||||||
@@ -353,7 +352,7 @@ class Polyline(bonsai.core.tool.Polyline):
|
|||||||
model_props.offset = offset * factor
|
model_props.offset = offset * factor
|
||||||
thickness *= direction
|
thickness *= direction
|
||||||
offset *= direction
|
offset *= direction
|
||||||
|
|
||||||
height = float(model_props.extrusion_depth)
|
height = float(model_props.extrusion_depth)
|
||||||
rl = float(model_props.rl1)
|
rl = float(model_props.rl1)
|
||||||
x_angle = float(model_props.x_angle)
|
x_angle = float(model_props.x_angle)
|
||||||
|
|||||||
@@ -76,9 +76,7 @@ class Pset(bonsai.core.tool.Pset):
|
|||||||
predefined_type = ifcopenshell.util.element.get_predefined_type(element)
|
predefined_type = ifcopenshell.util.element.get_predefined_type(element)
|
||||||
return bool(
|
return bool(
|
||||||
pset_name
|
pset_name
|
||||||
in bonsai.bim.schema.ifc.psetqto.get_applicable_names(
|
in bonsai.bim.schema.ifc.psetqto.get_applicable_names(element.is_a(), predefined_type, pset_only=True)
|
||||||
element.is_a(), predefined_type, pset_only=True
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user