Announcement

Collapse
No announcement yet.

Script for transforming primitive cylinders to splines ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script for transforming primitive cylinders to splines ?

    Hello Forum,

    last time I asked for a solution to select cylinders by its radius and luckily plastic helped me out with a little script that solved that problem.

    Now my second question (I promise I will start learning maxscript!):

    Is there a way to transform or generate splines from the cylindres based on their middle axis ? I dont want their edges to be used to generate splines, there is already a button for this....

    Thanks,

    Daniel
    ____________________
    www.formfest.de

  • #2
    select your cylinder and go

    Code:
    for i in selection do
    (valrad = i.radius 
    Circle radius:valrad rotation:i.rotation pos:i.pos)
    hope it works,
    michael

    btw, it works on the pivots of the cylinders.

    edit: ooops, was too quick on that on, as i thought at circles right away... for the middle axis it's something different, but you gotta draw up a spline adding vertices, a little more work - probably later
    This signature is only a temporary solution

    Comment


    • #3
      ThX sushi, I would appreciate to hear something from you again...
      ____________________
      www.formfest.de

      Comment


      • #4
        This creates a spline for each cylinder - assuming the cylinders are vertical.
        Diego

        Code:
        for o in $cyl* do
        	(
        	NS = splineShape pos:o.pos
        	addNewSpline NS
        	addKnot NS 1 #smooth #curve o.pos
        	addKnot NS 1 #smooth #curve (o.pos + [0,0,o.height])
        	updateShape NS
        	)

        Comment

        Working...
        X