Hoping I can engage assistance ...
My company designs & manufactures a small amount of stuff in sheet metal. In the past, we have engaged designers who generally do the CAD work in Solidworks - which when complete is then shipped off to the metal fabricators for laser cutting and folding - and returned to us for assembly and integration. Each product we produce consists of between 50 to 100 metal parts.
I would prefer to be in a position to perform the CAD work myself (I have been using SU for many years). Designing each product, along with each part is a simple thing in SU.
Where I am struggling is producing the flattened components for metal fab. Doing this manually is easy enough ... just too labourious and consequently error prone!
So I need to take each 3D modelled part and:
- Create a flattened "blank" for laser cutting.
- Represent that "blank" with fold lines/angles/direction (labelled dimensions) for the press brake operators to program.
The most important point to consider here is that my parts have a thickness, and a fold is a radius, not a perfect intersection of two faces. I have looked at:
-
Jim Foltz's "unfold" tool - and by my understanding it assumes the face has no thickness - and a fold is an intersection of two faces.
-
alexschreyer's "unwrap and flatten" faces - and again - I dont think it takes into consideration that a fold is a radiused bend in the metal. Equally, if I was to use this to unwrap each face of an SU surface to a single plane, the resulting blank would be the wrong size (each face is flattened "as is"). The magnitude of the error would also depend on whether I unfolded the inside faces or the outside faces of each bend (whereas the industry sheet metal calculation methods use a nominal neutral line part way through the thickness of the material (the K-factor).
So - I am looking to write an extension that accomplishes this.
-
It will take an SU component as the part to be unfolded (we create an individual .SKP file for each part, and then we combine them into sub-assemblies - which are further combined into the overall final assembly).
-
The first face would be selected by the user, and the extension will unfold the selected face and all adjacent faces. It would essentially be creating a 2d drawing of the sheet metal blank, so would only work on a single side of the 3D component.
-
As a bend radius is encountered, it will undertake the calculations for each fold to apply the necessary bend deduction/allowance onto the 2D drawing (maths is easy based on bend radius, material thickness and K-factor).
-
It must take into consideration that faces may have holes / slots / and other cuts through them (for rivets, bolts, cable connectors etc. etc.).
-
It must also take into consideration that surfaces (the fold) may also have holes / slots / cuts that pass across them or along them.
-
As a surface is encountered, the extension must determine whether the fold is UP or DOWN (for representation on the 2D drawing for the press brake operator).
I have started an extension simply to work out methods to solve problems at the moment).
- Takes the selected faces from the user.
- Looks at adjacent faces. If perpendicular - ignore as these are assumed to be cuts.
- If not perpendicular - assumed is a fold. Look at all faces that make up the surface & ascertain radius (thanks to a code snippet by thom thom).
... but I am currently struggling to determine the fold (surface) direction relative to the selected face.
- If surface is concave - fold direction is up.
- If surface is convex - fold direction is down.
- if vector normal converges with selected face normal - fold is up (I think ... 3d vectors are new to me).
- If vector normal diverges with selected face - fold is down.
Attached are a series of test components, each with their flat pattern represented. Note that I have left some internal lines and faces in-situ to represent fold radius boundaries. In reality, these are not required.
Any assistance is appreciated.