Spline
Intender / Spline Extender (LScript version 2.3) BRIEF This is somewhat like a spline-version of the native LightWave plugin Extender. In addition, it is also an in-tender (no such word, by the way, in the way it is used in naming this script) in that instead of going out, it can go in. But that's not saying much; this script may, at first, be confusing so let's start at examples. EXAMPLE 3 x 3 Points Spline Patch 1. Create three (3), three-point splines. Note the heads of each spline denoted by the diamond symbology.
2. Create intersecting splines to create a patch. Again, note the heads of the spline denoted by the diamonds.
3. Select the spline that you wish the extend / in-tend.
4. Run SplineINEXtender.ls. You will be presented with a requester like that one below. In the MODE section you specify if you want to ex-tend the spline, or in-tend it. In-tending the spline means that a new spline will be created nearer the heads of the perpedicular splines, like what we will do here.
5. Use the Move Tool to move the selected spline aside, revealing a newly created spline attached to the cage.
6. With the spline still selected, run the script again. This time, select CLOSED from the SPLINE options. This option will attempt to close the newly created spline. Click OK.
7. Again, use the Move Tool to set aside another newly created closed spline. This simple example demonstrates the use of the Intender Mode and the Closed Spline option. Let's go on to another example which addresses the Automatic and Opened Spline options.
Spline Cage 1. Create two closed splines. Notice that they have indicators as to where their Control Points are. This denotes that the Control Points (both Start and End) are active.
2. Create the proper intersecting splines to patch the cage. Then, select the top closed spline.
3. Run SplineINEXtender.ls. Here you can choose Closed or Automatic and they will essentially do the same thing. Since you selected a closed spline, the resulting spline will also be closed unless you explicitly select Opened.
4. Use the Move Tool to see the new closed spline. Notice one important difference: the new closed spline does not have its Control Points toggled on yet, and is expected to be toggled as you can see: the spline overshoots and ends at the points it has already passed. Toggling CPs are not currently possible in LScript so you will have to do it yourself. Note: never let splines like these exist when you're using Spline_INEXtender. Always make sure that the type of spline you see below has their CPs toggled on.
5. Now select the bottom closed spline.
6. Run SplineINEXtender.ls. Here notice that we go into Intender Mode because we want the resulting spline to go downward - the direction where the adjacent splines are headed. Secondly, we choose the Opened Spline option. Press OK.
7. Move the selection to see the newly created opened spline.
SOME TIPS and CAUTIONS Concept. One of the things that I suspect will initially confuse users of this LScript will be the practice of "extending" and "intending." The spline in question - the one that will be operated on - requires that there are adjacent splines sharing all of its points. This is important! Expected operation will fail if this is not met: all of the selected spline's points must belong to another spline - one point, one different adjacent spline. It is on those other splines that points are appended to and subsequently used to create the new curve. Thus, the problem of "extending" and "intending" will surface if those adjacent splines do not have their heads properly aligned with each other. I hope this explanation makes sense. Closed Splines & Control Points. Since there is a limitation of LScript regarding Control Curve Points, I highly recommend avoiding splines which has CPs. Note that when you make "closed" spline (CTRL + O), LightWave creates CPs for that spline (closed splines, by the way, are not required to have CPs - it's just the way LightWave creates a closed spline as a default). If you choose to extend or in-tend a closed spline with a CP, make sure that you Merge Points after the LScript operation. Furthermore, when a closed CP spline is extended, you must toggle the BEGIN and END CPs "on". Also, if you choose to insert a spline that is adjacent to a closed CP spline, and especially after inserting it many times, you might find it necessary to re-create your closed CP spline. What happens is that the order of points, and consequently the order of the Control Points are changed when the script messes around with a closed CP spline. "Re-Runnability". I've also made effort to make sure that the previously selected splines and points remain selected after running the script. In this way, if you wanted to create more points along those splines, all you have to do is run the script once again. Undo. If you decide that you want to undo the LScript, press the undo three to four times. Unless something goes awry, three or four undoes will often put it back rightly. Often, you would know whether or not you've reached it when the original selected spline is selected. During the time I tested this, it was easy to make a mistake of not undoing all of the processes and subsequent attempts to run the scripts failed expected operation because it turned out that "orphaned" splines lay in the exact same positions as the ones I needed to select. So be aware of this pitfall. Stray Duplicate Points. Another pitfall: since I introduced the a new "unify" capability into the script, the problem of duplicate splines is reduced (but not eliminated). However, duplicate points residing the same space is still a problem to look out for. If the script fails expected operation, first make sure that there are no extra points and/or splines. In the course of my own modelling, this has been the number one problem. Remember, keep on merging points and unifying polygons as you model.
SUMMARY OF INTERFACE
MODES Extender: creates splines on the other side, farther from the adjacent's spline's head. SPLINE
OPTIONS Opened: forces the resulting spline to be opened regardless if the originally selected spline was closed. Closed: forces the resulting spline to be closed regardless if the originally selected spline was open.
The only difference is that of that large button. I guess it's pretty self-explanatory. :) Remember that the "unify" feature is not a fool-proof way of getting rid of redundant splines.
LAST WORDS While I can not assume responsibility for any misfortune arising from the use of this script, I still would like to know if there are any bugs in it: faulknermano1@yahoo.com
|