Please integrate sweep1 options in grasshopper component

In some cases sweep1 is the only way to go. While the rhino command offers a good set of options, the grasshopper component only has “miter”. In rhino when sweeping I nearly almost use “global shape blending” (see pic below … top: with “global shape blending”, bottom without)
Would it be possible to integrate all sweep options into the component? Or offer a sweep options component (like “loft options”)?

cheers Roberto

there is a very complete Sweep1 function in Rhinocommon if someone with the Balls would be so kind to implement a user object out of that (I’m stable in top 5% worst PyCode writers EU 2017-2025)

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/createfromsweep?version=8.x#(curve,ienumerable<curve>,point3d,point3d,sweepframe,vector3d,bool,sweepblend,sweepmiter,double,sweeprebuild,int,double)

I can´t find “global shape blending”. Am I missing something?

  • blendType
  • Type: SweepBlend
  • The shape blending type.
1 Like

thanks for the explanation!

no errorchecking,
no finetune.
just wrapped the method in a c# component.

sweep1_with_options_00.gh (12.9 KB)

for the details of the enums

   (Rhino.Geometry.SweepFrame) frameType,
   (Rhino.Geometry.SweepBlend) blendType,
   (Rhino.Geometry.SweepMiter) miterType,
   (Rhino.Geometry.SweepRebuild) rebuildType,

see the documentation here.
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brep/createfromsweep?version=8.x

casting from int to the enum type might fail.
EDIT/UPDATE: I added valueLists for the enums to make it more readable.

@eirannejad
it would be great if an unconnected Parameter with Type Hint “Point3d” will become (wish) Point3d.Unset and not (current) 0,0,0.

2 Likes

Thank you very much!!
Just downloaded the component and will give some feedback when I find the time to test it.

Hello Tom_P,
took some time until I could test your “sweep1 with options”. I simplified a complex setting that I used for an ordinary sweep1 some time ago.

The sweep with options component works very well, also when dragging the sliders.

It gives a wrong result if I use the rail as it was created but works with a flipped version while grasshoppers original sweep1 component works with both versions of the rail.

thanks again!

sweep1_with_options_01.gh (47.1 KB)