MoI discussion forum
MoI discussion forum

Full Version: Loft factory question

Show messages: All  1-16  17-20

From: bemfarmer
4 Feb 2018   [#17] In reply to [#6]
Hi Michael,
I'd forgotten about this old subject, but have a question.

Rather than dragging the marker point of the seam, shown during Loft, is it possible to just enter a point, or coordinates or object list of a previously picked
point on the curve for, say, the orientations list input of Loft, or say the EditOrientations.js?

I'm trying to script changing the start point of an ellipse, using the loft method that has been previously posted.
http://moi3d.com/forum/index.php?webtag=MOI

- Brian
From: Michael Gibson
4 Feb 2018   [#18] In reply to [#17]
Hi Brian,

> Rather than dragging the marker point of the seam, shown during Loft, is it possible to just enter
> a point, or coordinates or object list of a previously picked
> point on the curve for, say, the orientations list input of Loft, or say the EditOrientations.js?

So you mean in your own script that you're making, not typing in coordinates in the regular Loft command, right?

I'm not sure if that's possible currently - one thing you can try though is if you run .update() on the Loft factory, the curve orientation input (input index 1 on the loft factory) should get filled in with a default orientation list. It should then be possible to modify that list, you can get it I think by factory.getInput(1).getValue(); that will be a list object, each item in the list is a CurveOrientation object which has 2 properties: flipped and seam which can be modified.

The seam point though is a normalized parameter value, with 0.0 meaning the start of the original curve and 1.0 meaning the end of the curve, and 0.5 meaning the middle of the curve's parameter space, not necessarily the middle of the arc length distance of the curve.

- Michael
From: bemfarmer
4 Feb 2018   [#19] In reply to [#18]
Thank you Michael.

I'll do some tests.

I guess that the "curve's parameter space" has to do with the NURBS representation?

- Brian

Using cPlane at the centerpoint, I'm intersecting the "waist" of an extruded (or lofted) pair of circles, (an oblique cylinder), with
a plane, which is a "belt" ellipse. (Like a person with a belt around the waist.)
The ellipse formed often has a different start point than the starting cylinder. I'm trying to move the start point to match the cylinder seam.
It is easy interactively, with a specific cylinder...
From: Michael Gibson
4 Feb 2018   [#20] In reply to [#19]
Hi Brian,

> I guess that the "curve's parameter space" has to do with the NURBS representation?

Yup, there is a range of numbers called the "knot vector" which sets a minimum and maximum value for the parameter space range. Evaluating the curve at the start parameter yields the start point of the curve, evaluating the curve at the end parameter gives the end point of the curve.

- Michael

Show messages: All  1-16  17-20