ScriptSpot

Script

Spline Toolbox

By LittleLordPotala · 2012-06-18

Version
1.1
Version requirement
2010, 2011, 2012, 2013
Votes
12
Description

New version 1.1

It is 6 tools in one interface :

- Spline select tool (it allows dot selection, random and by angle)

- Outline extended (it's the basic outline tool with more options) / Updated (realtime feedback ,keeps original selection and mousetool creation)

- 2-Tangents circle allows to create a circle relative to two tangents (usefull in design/architecture when trying to place precisely a circle in a corner)

- Divide Spl. Segs by percent allows to divide one or multiple segments by percent and choosing between 2 interpolation methods "path" or "length" that can give different results only in curved splines

- Constrain Spl. Verts, working in vertex suboject mode, just constrains the vertex along the same spline (it works with any vertex type but with the bezier type, the tangents don't follow exactly the curve, maybe for a next version...)

- Spline segments infos gives realtime infos about the selected segments and total spline length

Additional Info

Side Notes about "Outline extended" :

- It works only in segment sub-object level, but, then, the script gives the choice to work like in segment or spline selection level.

- Ctrl-Z does not work with this tool, instead, use the "undo outline" button.

-In version 1.1, there is a realtime feedback. You can enter the outline mode directly by moving the spinner. But if you first click the outline checkbutton, you also have the possibility to create the outline by dragging the mouse in the viewport and adjust the value with the spinner. To exit the outline mode, you have to click again on the outline button.

Thanks to barigazy and harumscarum for their great ideas !

Attachments

Tags: spline

Comments (14)

Random ID

dmitrybelonosov · 2016-04-13

Hello! This tool is good! Thank you!

Can you add the function "random ID" for each segment with a range? MaterialByElement modifier only works with polygons. Can you help me?

k2000 · 2013-11-13

there were issues when system units in meters
maximum circle radius was limited =0.1m

made some fix, added range [0,100000,0]
as by default its 0,100,0

thx
good idea!

outline and divide tools not very intuitive but anyway cool :)
segment length - very needed info!

asymptote · 2013-02-12

Fantastic, I would love to see the Constrain spline retaining the exact curve when sliding.
Is there any way to prevent the "kinking" that happens when vertex's are moved close to each other using Divide Spl segments and Constrain Spl?
It's not too difficult to fix by tweaking the bezier handles after moving, but would be cool if it adapted to the vertex positioning.
This tool just saved me a big headache designing tubular curved roof span sections, I reached for the constrain vertex to spline, and it wasn't there.
It is now.
You prove to us that core functions of Max can be developed and improved upon, it's a shame AD don't have the same outlook.
Thanks for the script.

Thanks

LittleLordPotala · 2013-02-14

I thank you for your kind comment.
Regarding the "Constrain Spl" function and the bezier handles, it's technically possible but that's a bit tricky to implement such a dynamic recalculation of the tangents. When you move a point, the interpolations completely change...
For the moment, I have no time to do it. But why not in the future ? There is so much that can be done for this splines !
I agree that AD could also do it, but at least they give us MaxScript, a great way to fill some gaps.
Best regards.

harumscarum · 2012-06-22

I hope not to complicate the interface )
so i try:

1/ as soon as we touch the spinner (or enter from keyboard) - outline will updates every time spinner is released. same behavior if not "copy" - we just don't see source segment

2/ in order to apply outline need to deselect or select another segment(spinner must back to 0.0)

OK,

LittleLordPotala · 2012-06-22

I understand your idea.
I will see if I can implement this user interaction without loosing stability or adding some new issues.

Thank you harumscarum.

barigazy · 2012-06-27

Nice update, just perfect.

Thank you Lord!

harumscarum · 2012-06-22

there is one issue regarding Outline_Extended
now using spinners, when release it - outline is applied and no more selection

but could it be better when release spinners - see outline result, but keep selection of source segment. and when touch spinners again - on spinners release outline result will updates.

"keep selection of source segment"

LittleLordPotala · 2012-06-22

I guess it's possible to re-apply the source selection after the "outline" operation but then you would like that the same spinner just updates the last operation instead of applying a new "outline".
If I understand well, you would like two different functions in one spinner.

So, in your case, after updating the last operation, how to tell to the spinner that we want a new outline ? (Maybe by creating a new button to bake the last operation ?)

Sorry for this questions but I have to understand everything before writing the code.
I know it's not easy to explain and above all to find the best user interface...

---------
edit:
I just have another question : if we are not in "copy" mode, how do you want to re-apply the source selection ?

Hi,

LittleLordPotala · 2012-06-22

thank you, JokerMartini and barigazy, for your kind comments.
As you already know, regarding the spline development Maxscript is very limited, even the SDK in C++ doesn't offer a lot more, so if you find any bug or an idea of improvement, feel free to post here.

barigazy · 2012-06-22

Maybe you can add divide spline by percent of segs length option.
Standard divide operation always divide segment at 0.5 (50%) of seg.length.

Great idea !

LittleLordPotala · 2012-06-22

The "divide" tool is actually not very flexible. I will try that for the next version.
I'm also currently searching a way to constrain vertices along a spline...
(For that, the Snap tool is not very convincing).

Thanks again for your idea.

+1

barigazy · 2012-06-21

I like this tool a lot.Good job, man.
Just keep up with great stuff.
Cheers!

JokerMartini · 2012-06-21

The ultimate spline toolbox. I still do not know, to this day, why autodesk has not pushed out better toolsets for spline shapes.
Anywho, thanks for the tools, im sure this will become very useful, very fast.