[Closed] Create shape of an object just like max default section
Hi
My problem with max default section is that it creates shape from all object in the scene in its boundary but i need only a shape from one object
Is there any other way to create a shape from selected object?
Is it possible to makePlanar the object in one axis and collect all vertices around the object and create shape from these selected vertices?
I know that it is not a proper way of creating shape from an object , but in my case it is OK , But I don’t know how to collect the vertices ( i mean the boundary vertices).
any help is* so appreciated
————–/////////////////////////////* Edit
Forget to mention that the object is not quadrified and doesn’t have proper topology
What if you switch it to Section Boundary mode?
Or you can slice object as you like and then create shape from the resulting edges.
Check if it works for you. I can only test it with 2014 max
max modify mode
BOUNDARY_ptr = for data in windows.getChildrenHWND #max where data[5] == "Section Boundary" do exit with data[1]
INFINITE_ptr = UIAccessor.GetPrevWindow BOUNDARY_ptr
OFF_ptr = UIAccessor.GetNextWindow BOUNDARY_ptr
windows.sendMessage BOUNDARY_ptr 0x201 0 0
windows.sendMessage BOUNDARY_ptr 0x202 0 0
fn createSectionShape mode:2 pos: length: width: = (
local obj = section()
if pos != unsupplied and isKindOf pos point3 do obj.pos = pos
if length != unsupplied do obj.length = length
if width != unsupplied do obj.width = width
select obj
max modify mode
BOUNDARY_ptr = for data in windows.getChildrenHWND #max where data[5] == "Section Boundary" do exit with data[1]
INFINITE_ptr = UIAccessor.GetPrevWindow BOUNDARY_ptr
OFF_ptr = UIAccessor.GetNextWindow BOUNDARY_ptr
local ptrs = #( INFINITE_ptr, BOUNDARY_ptr, OFF_ptr )
windows.sendMessage ptrs[mode] 0x201 0 0
windows.sendMessage ptrs[mode] 0x202 0 0
obj
)
delete objects
Teapot radius:20
shp = createSectionShape pos:[0,0,10]
convertTo shp SplineShape
ps. you may also look for a Contour Creator script on scriptspot
Thanks Serejah for the reply
and thanks for suggesting Contour* Script.
But for my curiosity,* having Max 2016 , your script doesn’t work in my Pc .
What actually does this script do?
Indeed it doesn’t work even in my max. There was a wrong variable name, I’ve edited my previous post you may check it again. Now it should work.
Script is creating Section Shape and then set it to bounded mode instead of default Infinity mode which is why it affects all the objects around.
Thanks again it works now But:
Is there any way to limit section to* just create a shape from selected object .
here in your script if you have 2 or more objects in the same position* the script create shape from both all obj in the defined* boundary of the section .