On some surfaces that have very little distortion when using unrollsrf(0.01%), squish changes them a lot, sometimes over 50%. Has anyone else run into this and knows whats happening?
Can you provide a file with an example surface?
My understanding is the Squish algorithm is fundamentally different than the UnrollSrf algorithm.
Squish has numerous settings for how it flattens.
From Help for Squish: Squish | Rhino 3-D modeling
Limitations
- Does NOT unroll, unfold, or peel.
- Does not work great on developable surfaces. Use the UnRollSrf command.
Technical details and caveats
Squish is an algorithm that works on meshes. Squish flattens the mesh by “minimizing the changes in facet area and changes in facet edge lengths” between the 3‑D mesh and the 2‑D mesh, subject to some constraints.
For example, if A,B,C are the corners of a 3‑D triangle and a,b,c are the corresponding corners of the 2‑D triangle, the changes in edge length are
d1 = |Distance(A,B) - Distance(a,b)|
d2 = |Distance(B,C) - Distance(b,c)|
d3 = |DIstance(C,A) - Distance(c,a)|
da = |Area(A,B,C) - area(a,b,c)|
DL = d1+d2+d3
DL2 = d12 + d22 + d32
DA = da
DA2 = da2
D = some combination of DL, DL2, DA and DA2
The “minimizing the changes in area and or edge lengths” above means create the 2‑D mesh so that “D” is as small as possible.
In practice, there are thousands of facets and many ways to minimize D, most of which don’t make practical sense. So Squish constrains the answer to prevent the 2‑D mesh from folding back onto itself and forcing certain 3‑D points end up in specified 2‑D locations.
A trimmed NURBS surface is squished by squishing a dense mesh of the surface.
The squish options determine how DA, DA2, D1 and D2 are combined and allow for more complicated ways to calculate of DA, DA2, D1, and D2 and to allow for a bias towards stretching or compression.
Smash uses a modified version of UnrollSrf to flatten surfaces with compound curvature. Smash will usually give the same or very similar result to UnrollSrf for developable surfaces without compound curvature.
From Help for Smash: Smash | Rhino 3-D modeling
The Smash command flattens a surface without restriction to single-directional curvature.
Note
- Makes an approximate 2-D development of surfaces that have compound curvature.
- This command can be used to deal with fabrics that have a certain amount of flexibility and stretch.
- The Smash command is a modified version of the UnrollSrf command. With UnrollSrf, the surface has to be linear in one direction to unroll, and with the Smash command it does not.
- Since it is not possible to flatten a double-curved object (like a half a coconut shell) to get a paper pattern, the answer is always inaccurate to some degree. This command is useful if the object you are flattening is not extremely curved and you want to make the pattern out of a stretchy material like rubber.
I think it has something to do with the complexity of the curves the surface is built with. When I simplify the starting curves using rebuildcurvenonuniform I get a more accurate result with squish. But it is odd because if I mesh the surface and squish, or squish the surface, I still get a really inaccurate result.