Automatic Seam positioning

Hello,

When I perform a Sweep1 operation, rhino lets you specify seam positions of the two profiles: Natural or Automatic.
I’m wondering how does the Automatic Seam position actually work internally.

Thanks if someone can provide information on this.

Miquel

Hi Miquel - Automatic finds closest points and attempts to line them up in a useful way to make all the curve directions consistent and the seam relatively ‘stable’ and consistent - Natural finds the existing seam points and curve directions on closed curves. Automatic can be handy if your curves are all different and complex, but I generally prefer Natural along with some adjustments if I’ve been careful about how I make my curves. Personally, I wish Natural were the default, as Automatic can line up closest points that are very close to but not exactly on an end point or seam,which is not so good.

-Pascal

Hi @pascal,

Thanks for your answer. Is there any way to retrieve the “Automatic” seams positions from Rhinocommon? If not, how can we “compute” them?

The problem is we have a command with a few options, one of them is the Sweep but the result is the same as the “Natural” since we don’t move the seams so we want to allow the user to change between Automatic/Natural.

Hi @mpcarlos87,

So, you are scripting the Sweep1 or Sweep2 command(s)? Perhaps you should try using one of the many Brep.CreateFromSweep overides?

– Dale

Hi @dale,

We are using SweepOneRail class, is there any way to use the “Automatic” seam positioning from there?

Regards,

Hi @mpcarlos87,

Got it - I thought you might be scripting the command. I’m sure the SweepOneRail uses the same underlying code as Brep.CreateFromSweep.

To answer your question, no, there isn’t any code exposed to adjust the seams of closed curves. We may be able to add something. To you also need curves ordered and directions matched too? Or do you already do this?

– Dale

You could test closest points and use https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_ChangeClosedCurveSeam.htm

Hi @dale,

I think we’re sorting profiles and checking directions by our own but would be good to have a “Rhinocommon way” to do this. The only thing we don’t know how to do is compute the “Automatic” positioning of Rhino Sweep command.

Hi @Michael_Pryor, thanks but I’m pretty sure the “Automatic” option of the seam is not only the closest point!

Regards,

It is achievable by a recursive testing of closest point and testing if directions match. All methods which are available currently in Rhinocommon and doable now, but yes not as convenient as having it as a method override option.

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_DoDirectionsMatch.htm

1 Like

Can you explain further? In this case sweep1Distance.3dm (221.7 KB) points “a” and “c” are closest and direction is similar but despite of that Rhino chooses “a” and “b” as Automatic seams.

Regards,

Hi @mpcarlos87,

The automatic seam matcher does more than just look at closest points. It also looks at end points and discontinuity, matching curves at kinks when possible, and probably more.

– Dale

2 Likes