When performing a sweep along a relatively complex closed curve, the result includes some unwanted helical twisting (see image below, hopefully it is clear enough). For clarity, the surface being swept is a rectangle.
When performing a sweep of the same surface over just a portion of the curve, the result does not include the same helical twisting. The images below include both the partial sweep and the full and partial sweeps together.
It is worth noting that aside from the beginning of the sweep, the orientation of the cross-section along the sweep is rather different. Any help explaining what is happening, as well as any solution to avoid the twisting, would be greatly appreciated! I am happy to provide whatever additional information is needed.
My answer here is more speculation than definitive. As you sweep along any curve, the cross-section orientation is defined by the Frenet frame at any point along the spline curve. The Frenet frame is defined by the tangent, the normal, and the binormal (cross(T, N)) at every point along the spline.
My guess is that when you break the curve, you actually have a slightly different underlying spline representation. The periodic spline contains locations where the Frenet frame spirals about the curve causing the helical sections that you see.
Can you do something like the following:
Break up the curve.
Sweep along smaller sections and use the terminating rectangle as the start of a new section.
Imprint and merge the sections after the sweep.
a) Alternatively, you can click off the “Individual Volumes” option to create a single volume.
b) or you can do a Boolean Unite to create a single volume.
Testing on my end with just some random points for a fitted spline and then using a tangent curve to create first derivative continuity between the end points gives pretty good results. That does lend credence to my speculation.
Your speculation makes good sense to me! I imagined a similar workflow with breaking up the sweep into sections, but my concern is matching the terminating surface of the final section to the starting surface of the initial section to close the loop. Perhaps this is what you mean by using a tangent curve to create continuity between the end points (unless that refers to the guide curve)?
I got the ends to match by doing a create curve <ids> combine. This will create a new curve from the existing ones. The caveat on this is that the curves must be first derivative continuous (C1). That gave me a continuous curve that I could sweep along and the start and end surfaces matched correctly.
Are you suggesting to create two separate path segments, combine them, then sweep over that closed path?
When doing so, I get the following error when combining the segments: ERROR: Error combining Curves. Unfortunately, this is not very descriptive but pictured below are the two segments (hopefully the image is clear).
Perhaps this has to do with the segments (not) being first derivative continuous? I’m a bit confused about this condition. I assume this has to do with the tangent rather than the normal or binormal in the Frenet frame but perhaps it is all three. If this is the issue, is there a way to enforce C1 between the segments?
I’d also like to point out that the error above results from the command create curve combine curve <ids>, which is what Cubit executes when using the GUI and is slightly different from the suggested create curve <ids> combine. When using the latter, no error results but the segments are not combined either (see image below).
The error is probably related to my comment that the curves have to be C1 continuous. Maybe try the curve tangent option to fill the gap. All you need to provide is the start and end vertices of an existing curve and it will use the existing tangents at the endpoints.
Doing so resulted in much the same sweep as before (see below). Not sure if combining the curves overwrites the original Frenet frames along the curve.
Use however many segments you need to capture the original curve, then do something like
create spline vertex 1 2 to 100 1
where the 1 should be the existing vertex on the curve. If ids are off, you can issue a compress command to restart all numbering at 1. There should be at least one vertex on the original curve. This will create a new spline that only approximates the original but will pass through every given point on the original curve. It will start and end at vertex 1
You can do
label vertex on
or
locate vertex in curve all
to see the existing vertices in the curve. label vertex off turns off the labeling.
I’m a bit confused about why we would want to recreate the curve. This seems essentially like the original workflow I use in Cubit to create the guide curve. I use Cubit to generate vertices from point locus data and generate a spline across those vertices. If you could elaborate, I’d appreciate it.