execuc / LCInterlocking

FreeCAD module to create laser cut interlocking parts.
GNU Lesser General Public License v2.1
143 stars 32 forks source link

Unable to get CrossPiece to work #60

Open rebeltaz opened 2 years ago

rebeltaz commented 2 years ago

I am trying to learn how to use this plugin on this test project (in FreeCAD v0.19 under Ubuntu 18.04 LTS). When I add both pieces to the CrossPiece dialog and run Preview, it tells me this:

00:20:26  Traceback (most recent call last):
  File "/home/derek/.FreeCAD/Mod/LCInterlocking/panel/crosspiece.py", line 56, in onChanged
    self.preview(fp)
  File "/home/derek/.FreeCAD/Mod/LCInterlocking/panel/crosspiece.py", line 100, in preview
    computed_parts = make_cross_parts(parts)
  File "/home/derek/.FreeCAD/Mod/LCInterlocking/lasercut/crosspart.py", line 372, in make_cross_parts
    raise ValueError("Not managed")
<class 'ValueError'>: Not managed

I tried making "Simple Copies" of both pad operations and working with those instead, but I get the same error. I even tried creating the pieces as Parts directly using Cubes and I still get the same error.

Am I doing something wrong? test.FCStd.zip

Guertelwal commented 1 year ago

I have the same Problem with FreeCAD 0.20.1

reox commented 1 year ago

I get a different error here:

19:44:21  Traceback (most recent call last):
  File "FreeCAD\Mod\LCInterlocking\panel\crosspiece.py", line 54, in onChanged
    self.execute(fp)
  File "FreeCAD\Mod\LCInterlocking\panel\crosspiece.py", line 136, in execute
    computed_parts = make_cross_parts(parts)
  File "FreeCAD\Mod\LCInterlocking\lasercut\crosspart.py", line 345, in make_cross_parts
    second_face = referential_faces[1]
<class 'IndexError'>: list index out of range

However, I think I have found some hints why it fails in certain cases: It only fails for me, when one of the surfaces at the cross-piece intersect each other. That might be the case when two sloped surfaces are used: image

If instead two planar surfaces are used, the cross-piece works perfectly: image