Skip to content

Commit

Permalink
Print warning when a tab job does no work
Browse files Browse the repository at this point in the history
TODO: this should be fleshed out more if we end up actually wanting it
  • Loading branch information
sapphire-arches committed Nov 24, 2019
1 parent 5ae919c commit 68f761e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lasercut/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def tab_join_create_tab_on_face(material_face, material_plane, width, pos_y, tab

def make_tab_join(tab, tab_part, other_parts):
slots_pos = get_slot_positions(tab)
did_any_work = False
for i, y in enumerate(slots_pos):
for part_interactor in other_parts:
tab_to_add, tab_dog_bone = tab_join_create_tab_on_face(tab_part.properties, part_interactor.properties,
Expand All @@ -170,13 +171,17 @@ def make_tab_join(tab, tab_part, other_parts):
part_interactor.properties)

if intersect_test:
did_any_work = True
tab_part.toAdd.append(tab_to_add_transformed)
if tab_dog_bone:
tab_part.toRemove.append(helper.transform_part(tab_dog_bone, tab))
hole = helper.tab_join_create_hole_on_plane(tab, tab.tabs_width, y, tab_part.properties,
part_interactor.properties, tab.dog_bone)
part_interactor.toRemove.append(helper.transform_part(hole, tab))
break

if not did_any_work:
FreeCAD.Console.PrintWarning("Tab on part " + tab_part.get_name() + " did not apply\n")
return


Expand Down

0 comments on commit 68f761e

Please sign in to comment.