mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
black .
This commit is contained in:
@@ -1656,7 +1656,7 @@ class CutDecorator:
|
||||
for obj in [o for o in bpy.context.visible_objects if o.type == "MESH"]:
|
||||
if not (element := tool.Ifc.get_entity(obj)):
|
||||
continue
|
||||
#Skip the elements in the following classes
|
||||
# Skip the elements in the following classes
|
||||
if element.is_a() in classes_no_cut:
|
||||
continue
|
||||
self.decorate(context, obj, element)
|
||||
@@ -1726,9 +1726,6 @@ class CutDecorator:
|
||||
batch.draw(shader)
|
||||
|
||||
def decorate(self, context, obj: bpy.types.Object, element: ifcopenshell.entity_instance) -> None:
|
||||
|
||||
|
||||
|
||||
has_cut_cache = element.id() in DecoratorData.cut_cache
|
||||
has_fill_cache = element.id() in DecoratorData.fill_cache
|
||||
|
||||
|
||||
@@ -455,7 +455,6 @@ class DocProperties(PropertyGroup):
|
||||
description="The cut decoractor will be turned off for these classes\nEx: IfcVirtualelement, IfcSpace",
|
||||
)
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
should_use_underlay_cache: bool
|
||||
should_use_linework_cache: bool
|
||||
|
||||
@@ -651,7 +651,7 @@ class PolylineOperator:
|
||||
else:
|
||||
reference_point = Vector((0.0, 0.0, 0.0))
|
||||
self.tool_state.plane_origin = Vector((reference_point.x, reference_point.y, reference_point.z))
|
||||
|
||||
|
||||
if x:
|
||||
if event.shift and event.value == "PRESS" and event.type == "X":
|
||||
self.tool_state.use_default_container = False
|
||||
@@ -676,7 +676,6 @@ class PolylineOperator:
|
||||
tool.Blender.update_viewport()
|
||||
get_plane_origin()
|
||||
|
||||
|
||||
def handle_instructions(
|
||||
self, context: bpy.types.Context, custom_instructions: dict = {}, custom_info: str = "", overwrite: bool = False
|
||||
) -> None:
|
||||
|
||||
@@ -127,13 +127,16 @@ class Cad:
|
||||
if new_angle is not None:
|
||||
rot_mat = Matrix.Rotation(new_angle, 3, axis)
|
||||
rot_vector = (d1 @ rot_mat) if parameter else (rot_mat @ d1)
|
||||
|
||||
|
||||
# 180 degrees special cases
|
||||
if abs(round(a, 4)) == round(math.pi, 4) and (
|
||||
rot_vector.x == 0.0 and rot_vector.y == 0.0 or
|
||||
rot_vector.x == 0.0 and rot_vector.z == 0.0 or
|
||||
rot_vector.y == 0.0 and rot_vector.z == 0.0
|
||||
):
|
||||
rot_vector.x == 0.0
|
||||
and rot_vector.y == 0.0
|
||||
or rot_vector.x == 0.0
|
||||
and rot_vector.z == 0.0
|
||||
or rot_vector.y == 0.0
|
||||
and rot_vector.z == 0.0
|
||||
):
|
||||
rot_vector *= -1
|
||||
return rot_vector
|
||||
else:
|
||||
@@ -141,7 +144,7 @@ class Cad:
|
||||
|
||||
if degrees:
|
||||
a = math.degrees(a)
|
||||
|
||||
|
||||
# 180 degrees special cases
|
||||
if abs(round(a, 2)) == abs(180.00):
|
||||
return -180.0
|
||||
|
||||
Reference in New Issue
Block a user