FreeCAD_SheetMetal icon indicating copy to clipboard operation
FreeCAD_SheetMetal copied to clipboard

`SMFoldWall` should display an error message if the profile is not colinear lines

Open pierreporte opened this issue 11 months ago • 6 comments

This issue has been thought of with the FreeCAD Design Working Group initiative for the sheet metal worbench conducted by @obelisk79 for @sliptonic. It is posted there because it is out of scope of this work.

SMFoldWall needs that the sketch contains only one fold line, continuous or discontinuous. If it is discontinuous, the segments must be colinear. If one of these conditions is not fulfilled, the feature fails. However, in certain cases, it still produces a result but obviously wrong. When there is an error message, it is not helpful. See the pictures below.

SMFoldWall should check if the profile is correct and display an error message listing what’s wrong: several profiles, non-colinear fold line, etc. and not produce anything.


image

image

image

image

image

image

image

pierreporte avatar Mar 02 '24 22:03 pierreporte

I think this feature should be limited to a single straight line. Otherwise it should report an error

shaise avatar Mar 03 '24 11:03 shaise

The wiki shows a very legitimate use of a discontinuous line: https://wiki.freecad.org/SheetMetal_AddFoldWall

Maybe it would be better to graphically select in the 3D view the parts that shouldn’t be bent.

pierreporte avatar Mar 03 '24 11:03 pierreporte

Ohh, Yes, correct. so in this case, checking the validity of such line is not so easy.

shaise avatar Mar 03 '24 11:03 shaise

I think that you can programmatically get a list of all geometry in a sketch. It may be possible to check the colinearity. Would it be enough to check numerically if all vertex sit on a line?

pierreporte avatar Mar 03 '24 11:03 pierreporte

Apparently, OpenCascade provides a way to verify if a set of points lie on a line: https://dev.opencascade.org/doc/refman/html/class_g_prop___p_equation.html

pierreporte avatar Mar 03 '24 11:03 pierreporte