Convert Ploy to spline

a spline, enable in renderer, with some radial thickness, sides, interpolation value, after convert to editpoly, is it possible using a script, convert poly back to spline?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

PolyEdges To SplineShape v2

And this is the same but here you have the possibility to change each option separately.
I think this is actually what you're looking for.

fn polyToSpline obj splName: thickness: sides: visInRender: visInView: wireclr: =
(
	if selection.count == 1 and classof obj == Editable_Poly do
	(
		max create mode
		with redraw off
		(
			edgesCount = obj.edges.count
			polyOp.createShape obj #{1..edgesCount} smooth:false name:splName
			ps = $PolySpline ; ps.wirecolor = wireclr  ; ps.thickness = thickness ; ps.sides = sides
			ps.render_displayRenderMesh = visInView ; ps.render_renderable = visInRender
			updateshape ps ; ps.name = uniquename ps.name ; select ps
		)
	)
)
polyToSpline $ splName:"PolySpline" thickness:0.3 sides:12 visInRender:on visInView:on wireclr:orange

barigazy

cmjohncheng's picture

thanks for reply, actually i

thanks for reply, actually i looking for script like miauu show, just it cant work normal(first and last vertex hvnt move to middle), btw, ur this script not bad too, thanks for sharing!

http://www.scriptspot.com/3ds-max/scripts/turboreverse
this script for turbosmooth reverse to previous poly

i looking for script reverse poly to previous spline, attachment got show(No1 already become No2, can reverse back to No1?), is it possible?

AttachmentSize
spline.jpg 50.15 KB
LittleLordPotala's picture

It is possible,

It is possible, try the attached script.
It will only work if your editable poly was first a renderable spline.
It doesn't work with editable mesh or edit_poly modifier.

Select your editable poly and execute the script. (I just tested it on max 2013)

AttachmentSize
poly_to_spline.ms 441 bytes
cmjohncheng's picture

great

great, this script really work, but got some limitation like what u say, cant work with editable mesh or edit poly modifier, and if got more than one spline, it cant get the right result~

barigazy's picture

hi LittleLordPotala, are you

hi LittleLordPotala,
are you have mail, i want to send you another solution for testing this kind of problem.

barigazy

barigazy's picture

PolyEdges To SplineShape

This is your function
You can set manually thickness and sides

fn polyToSpline obj thickness: sides: =
(
	if selection.count == 1 and classof obj == Editable_Poly do
	(
		max create mode
		with redraw off
		(
			edgesCount = obj.edges.count
			polyOp.createShape obj #{1..edgesCount} smooth:false name:"PolySpline"
			ps = $PolySpline ; ps.wirecolor = orange  ; ps.thickness = thickness ; ps.sides = sides
			ps.render_displayRenderMesh = ps.render_renderable = true ; updateshape ps ; ps.name = uniquename ps.name ; select ps
		)
	)
)
polyToSpline $ thickness:0.3 sides:12

barigazy

cmjohncheng's picture

thanks for reply, have try,

thanks for reply, have try, but got some problem, first and last vertex wont at center..
attachment in 2010 format

AttachmentSize
last_vertex.rar 33.12 KB
miauu's picture

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.