mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Remove random debug print statements
This commit is contained in:
@@ -25,14 +25,12 @@ from bpy.types import WorkSpaceTool
|
|||||||
from bonsai.bim.module.model.data import AuthoringData, RailingData, RoofData
|
from bonsai.bim.module.model.data import AuthoringData, RailingData, RoofData
|
||||||
|
|
||||||
|
|
||||||
|
# TODO duplicate code in cad/workspace and model/workspace
|
||||||
def check_display_mode():
|
def check_display_mode():
|
||||||
global display_mode
|
global display_mode
|
||||||
try:
|
try:
|
||||||
theme = bpy.context.preferences.themes["Default"]
|
theme = bpy.context.preferences.themes["Default"]
|
||||||
text_color = theme.user_interface.wcol_menu_item.text
|
text_color = theme.user_interface.wcol_menu_item.text
|
||||||
background_color = theme.user_interface.wcol_menu_item.outline
|
|
||||||
print(f"text_color = {text_color}")
|
|
||||||
print(f"background_color = {background_color}")
|
|
||||||
if sum(text_color) < 2.6:
|
if sum(text_color) < 2.6:
|
||||||
display_mode = "lm"
|
display_mode = "lm"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -30,14 +30,12 @@ from bonsai.bim.module.system.data import PortData
|
|||||||
from bonsai.bim.module.model.prop import get_ifc_class
|
from bonsai.bim.module.model.prop import get_ifc_class
|
||||||
|
|
||||||
|
|
||||||
|
# TODO duplicate code in cad/workspace and model/workspace
|
||||||
def check_display_mode():
|
def check_display_mode():
|
||||||
global display_mode
|
global display_mode
|
||||||
try:
|
try:
|
||||||
theme = bpy.context.preferences.themes["Default"]
|
theme = bpy.context.preferences.themes["Default"]
|
||||||
text_color = theme.user_interface.wcol_menu_item.text
|
text_color = theme.user_interface.wcol_menu_item.text
|
||||||
background_color = theme.user_interface.wcol_menu_item.outline
|
|
||||||
print(f"text_color = {text_color}")
|
|
||||||
print(f"background_color = {background_color}")
|
|
||||||
if sum(text_color) < 2.6:
|
if sum(text_color) < 2.6:
|
||||||
display_mode = "lm"
|
display_mode = "lm"
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -2105,7 +2105,6 @@ class RefreshClippingPlanes(bpy.types.Operator):
|
|||||||
obj = clipping_plane.obj
|
obj = clipping_plane.obj
|
||||||
if not obj:
|
if not obj:
|
||||||
continue
|
continue
|
||||||
print("doing", obj)
|
|
||||||
|
|
||||||
bm = bmesh.new()
|
bm = bmesh.new()
|
||||||
bm.from_mesh(obj.data)
|
bm.from_mesh(obj.data)
|
||||||
@@ -2115,11 +2114,8 @@ class RefreshClippingPlanes(bpy.types.Operator):
|
|||||||
bm.faces.ensure_lookup_table()
|
bm.faces.ensure_lookup_table()
|
||||||
face = bm.faces[0]
|
face = bm.faces[0]
|
||||||
center = world_matrix @ face.calc_center_median()
|
center = world_matrix @ face.calc_center_median()
|
||||||
print("center", center)
|
|
||||||
normal = world_matrix.to_3x3() @ face.normal * -1
|
normal = world_matrix.to_3x3() @ face.normal * -1
|
||||||
center += normal * -0.01
|
center += normal * -0.01
|
||||||
print("normal", normal)
|
|
||||||
print("new center", center)
|
|
||||||
|
|
||||||
normal.normalize()
|
normal.normalize()
|
||||||
distance = -center.dot(normal)
|
distance = -center.dot(normal)
|
||||||
|
|||||||
Reference in New Issue
Block a user