shaise / FreeCAD_SheetMetal

A simple sheet metal workbench for FreeCAD
http://theseger.com/projects/2015/06/sheet-metal-addon-for-freecad/
GNU Lesser General Public License v2.1
186 stars 55 forks source link

Refine property missing. #345

Open leoheck opened 1 month ago

leoheck commented 1 month ago

Where is this Refine property, I could not find it. Is this generic advice or this feature should have this property and I am not finding it? image

leoheck commented 1 month ago

I am using

OS: Ubuntu 24.04 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37819 (Git) AppImage
  * sheetmetal 0.4.18

Trying to unfold a simple structure.. but it is failing. Actually this is the first time I am doing this, so I am not sure if I am doing this right.

I am selecting a face and trying to unfold the structure.

The structure is simple, I guess. And I am also seeing this issue here:

image

23:11:35  Error Analysis: Sheet thickness invalid for this face! at Face39
23:11:35  exception at line 3131("'NoneType' object has no attribute 'Edges'",)
23:11:35  ("'NoneType' object has no attribute 'Edges'",)
leoheck commented 1 month ago

There is also a different issue when I apply Part Design Features. I am not sure if it supports that.

23:31:40  Error Unfold: not handled curve type in unbendFace at Face146
23:31:40  exception at line 3131("'NoneType' object has no attribute 'Edges'",)
23:31:40  ("'NoneType' object has no attribute 'Edges'",)

For instance, I tried to make a groove in the last feature to create some room inside.

image

image

shaise commented 1 month ago

the refine is a general preference in part design. please upload the file that failed unfold here.

leoheck commented 1 month ago

The first folder has the one that fails for some unknown reason. This was my first attempt, and things broke during the process and I had to fix some features after some updates adding extra faces and this may be related to the issue. I am about to redo this to check if I can improve it. I was doing features on one side, and after I realized that I could select more than 1 face at the same time so I don't have to mirror anything at the end.

The second folder has another similar test. To see if a new object could work without issues. And it worked fine including the Pocket.

The 3rd folder is another test, where I am using a Grove as in the 1st test, and it works, but the projected Sketch is not as good as in the second test.

unfold_test.zip

leoheck commented 1 month ago

the refine is a general preference in part design. please upload the file that failed unfold here.

The popup suggested to turn off refine on Bend02.

Ah, I understand now that the suggestion was to disable the refine somewhere until the Bend02 feature since Bend02 does not have that property.

leoheck commented 1 month ago

Replicated the design without the groove, and it works.

Also, I could not set the tip of the Body with the Sheetmetal, to ignore the Part Design Feature, I had to delete it. Is it possible to do that somehow? This way I could test intermediate places to check if the sheet metal is working.

shaise commented 1 month ago

Few things about the original design:

  1. Bend 4 had a bend radius of 0. This can tend to cause issues.
  2. The groove cut into the some bends and created 'refined' faces crossing both flat and curved features. This tends to confuse the unfolder.
  3. the 'switch refine to false for feature xxx' usually does not correspond to any particular bend on the way. Its just the name of the body you have selected to unfold. You can export your part as step, import to a different document and get the same sort of error. The unfolder is not 'aware' of any folds. It works on the selected part as simple solid object.
leoheck commented 1 month ago

Good. I don't remember setting something with radius zero. At least least this was not my intention. About the groove, am I doing something wrong or is there any design trick that I can to do avoid confusing the unfoder that much?

shaise commented 1 month ago

There is no right or wrong when cutting features into a sheetmetal object. Its just a limitation of the unfolder (the unfold algorithm is very complex and was done by a very clever programmer - not me) One thing to take into account though, is that some of the groove cuts create edges in the sheet that are not completely perpendicular to the sheet surface, hence even if you unfold it correctly, the resultant sheet pattern can not be cut using a laser as the laser creates only perpendicular edges.

leoheck commented 1 month ago

Thanks for the explanation. I was experimenting this workbench to design a cardboard structure to fix items inside a cardboard box.