Unroll components from all plugins seem to use a different tolerance than file

I can tell that because there are surfaces that unroll fine in Rhino if I relax the tolerance a bit while they will subbornly not unroll whether I use the Wombat or Pufferfish, or any other Unroll component out there.

Will not unroll.gh (18.1 KB)
If you bake these surfaces in a file (Units : mm) and set the relative tolerance to 0.1, they will unroll fine with the Rhino UnrollSrf command, but in GH, no luck !

@Michael_Pryor , your version of this component is the most feature-complete ; maybe if you just add an input for “tolerance”, it would solve this issue.

I could add tolerance option (which is what Rhino’s Smash command does) the issue is the result surface is often not accurate if you check the surface area between the 3D and unrolled, I think that’s why people avoid it, I can’t see any real benefit of an inaccurate unroll, can you?

I’ve been flattening patterns for tensile structures for 20 years now, so I like to think I know what I’m doing here.
If you take the example I provided, the area change is 0.16% which is within my tolerance.
But if I don’t have a means to set the tolerance, and the component refuses to process some items because the unroll is beyond “some” relative tolerance that is not even exposed, I’m just stuck.

Could you please add a tolerance input ?

1 Like

Try the Peacock’s unroll component, it has two tolerance inputs. But if your surface has double curvature, could works better do it for yourself, sampling the surface with isocurves and unroll one dimension first using its length, remap the isocurves of the other dimension and unroll them as well. It always will be an approximation, but at least you will have something done.

2 Likes

In jewelry can be usefull unnacuracy unrolls, for example, the common way of build a signet ring is to cut a sheet of metal with its unrolled shape to wrap it like in a circle. As it is done with fine metals, you can easily remove excess material or model it to fit it perfectly.

It works !
Thank you so much Dani.

I’ve been flattening patterns for tensile structures for 20 years now, so I like to think I know what I’m doing here.

No one was doubting you, I don’t know your history or work and was asking genuinely :smiley:
Joseph again seems to like your suffering :smiley:

FWIW My component is set to using Rhino’s document tolerances like many gh components which is not good for your use case.

Anyway… here is what Rhinocommon has to offer, seems it is the options @Dani_Abalde is using, maybe he does something different, I don’t know.
https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_Unroller.htm


ExplodeTol.gh (6.0 KB)

Michael, for folks like me who are not programmers at heart, but who find in Grasshopper a fantastic way of building algorithms, it’s sometimes a bit frustrating that GH doesn’t expose all the useful stuff.
We appreciate the various efforts to develop plugins, but that also leads to a lot of confusion and hair pulling at times.

Take this Unroll command for instance : theres’ at least 5 different plugins offering it, with different available inputs (none so far with all of them !).
Getting stuff done has become a matter of stocking loads of plugins and reminding which one has the exact feature you need, with the right flavor of inputs and outputs.
It gets worse when dealing with blocks and properties because there are custom object types that make component incompatible.

I can definitely understand Joseph’s point of view.

3 Likes

Sure understandable. I make my stuff usually for my use case and put it out there for free in case anyone finds it useful. My case was planar face brep geometry, for fabric type unrolling I use different software meant for it because of the different size issues, but it seems that for your use the difference is acceptable.

Yes, I only included it to offer a version of the component with the tolerances, because more than once it had helped me.

private void RunScript(Brep Brp, List<Curve> Crvs, List<Point3d> Pts, bool Exp, double Spc, double aTol, double rTol, ref object A, ref object B, ref object C)
{
  if(Brp == null || !Brp.IsValid)
    return;
  Unroller unroll = new Unroller(Brp);
  unroll.ExplodeOutput = Exp;
  unroll.ExplodeSpacing = Spc;
  unroll.AbsoluteTolerance = aTol;
  unroll.RelativeTolerance = rTol;
  if(Crvs.Count > 0){
    unroll.AddFollowingGeometry(Crvs);
  }
  if(Pts.Count > 0){
    unroll.AddFollowingGeometry(Pts);
  }
  Curve[] crv = null;
  Point3d[] pts = null;
  TextDot[] dots = null;

  A = unroll.PerformUnroll(out crv, out pts, out dots);
  B = crv;
  C = pts; 
}
1 Like

There are a lot of fancy pants flattening tools out there, but most of them end up with patterns with incompatible edge lengths.
Oh, they sure make use of finite elements and all, but when two edges need to be HF welded together, they need to have the same lengths.

We generally make our patterns narrower in areas of strong gaussian curvature to avoid aberrations.
If we are pushing it, we use http://laminadesign.com/ which does a great job at finding the ideal triangulation.

1 Like

Thanks for the information, it’s good to know the limitations. In my case with fashion industry it is things like clo3d. I’ll have to check out lamina some time.

Hi @Dani_Abalde,

Rhino’s Unroll command shrinks trimmed faces before unrolling. You might add this to your code to make your component more reilable.

– Dale

3 Likes