Wiley
February 7, 2025, 2:11pm
1
How can I achieve the clean sweep with Brep.CreateFromSweepSegmented in RhinoCommon?
BuggySweep.zip (9.6 MB)
Both trials achieved poor results.
sweep = Brep.CreateFromSweepSegmented(
railCrv,
sectionCrvs,
true,
RhinoDoc.ActiveDoc.ModelAbsoluteTolerance
);
var sweep = Brep.CreateFromSweepSegmented(
railCrv,
sectionCrvs,
Point3d.Unset,
Point3d.Unset,
SweepFrame.Freeform,
Vector3d.Unset,
true,
SweepBlend.Local, //most set to Local, otherwise it messes up the sweep.
SweepMiter.Untrimmed,
RhinoDoc.ActiveDoc.ModelAbsoluteTolerance,
SweepRebuild.None,
0,
0.0
);
I noticed it has been asked before.
Wiley
February 7, 2025, 2:28pm
2
Sweep1SegmentedBug.gh (7.5 KB)
I’ve also attached a buggy sweep gh test file.
dale
(Dale Fugier)
February 7, 2025, 4:53pm
3
Hi @Wiley ,
Try simplifying your rail curve (polycurve with 6 linear NURBS curves) into a simple polyline curve.
Does this help?
– Dale
Wiley
February 7, 2025, 5:07pm
4
Thanks @dale
But why did the Sweep command work while the RhinoCommon Sweep did this weird twisting thing?
dale
(Dale Fugier)
February 7, 2025, 7:47pm
5
When you run Sweep
, take note of the direction and location of the seams of the shape curves.
– Dale
Wiley
February 7, 2025, 8:03pm
6
So how would you change the script I have?
dale
(Dale Fugier)
February 7, 2025, 9:10pm
7
Since the two shape curves are identical, why not delete one?
1 Like
Wiley
February 8, 2025, 7:27pm
8
Yes. Actually using just one profile curve at start is much stabler than trying to orient profile curves manually.