PDA

View Full Version : need help in maxscript(some simple questions)


rozbeh
09-24-2006, 06:45 AM
Well i am actually very new to maxscript.
1.I come to this problem that i have created a "section" shape,it has a "create shape" button,which creates a section shape based on where this section is placed,how can i call it?is there any direct way to call that?

2.Beside that i reached to a script in help,that does the same thing it is like this:
meshSelected = sphere() -- object to create contours of
minZ = meshSelected.min.z -- get min and max Z positions
maxZ = meshSelected.max.z
numLevels = 10 -- the number of contours
delta = (maxZ - minZ) / (numLevels + 1) -- the number of steps
for currentZ = minZ to maxZ by delta do -- start loop...
(
s = section pos:[0, 0, currentZ] -- create Section
max views redraw -- this line is needed to get around the problem
convertToSplineShape s -- convert Section to SplineShape
s.renderable = true -- set to renderable
)
but my object unlike this spheare is not that simple,so apart from location i need to tell forexample how much to rotate and....

so how can i for example make this new section coordinates to be like the one i created -$section01- including location,rotation,etc?

3.apart from all this,imagine now i hace a section-created from a complex object-how can i read the max (y) value of a given x coordinate?

4.any good tuturial on learning max?

reagards,
roozbeh

antonv
09-25-2006, 02:59 PM
Why don't you try to use a Slice modifier?

Bobo
09-26-2006, 07:33 AM
Well i am actually very new to maxscript.
1.I come to this problem that i have created a "section" shape,it has a "create shape" button,which creates a section shape based on where this section is placed,how can i call it?is there any direct way to call that?


No direct way, but the example from the Reference you posted does just that by collapsing the object to SplineShape.


2.Beside that i reached to a script in help,that does the same thing it is like this:

but my object unlike this spheare is not that simple,so apart from location i need to tell forexample how much to rotate and....

so how can i for example make this new section coordinates to be like the one i created -$section01- including location,rotation,etc?


You could assign the .transform of your object to the .transform property of the section object. This will make position, rotation and scale identical. You can then use IN COORDSYS to move/rotate the section object in the coordinate system of the object to create the section from...


3.apart from all this,imagine now i hace a section-created from a complex object-how can i read the max (y) value of a given x coordinate?


Not getting you here. Can you explain again what you meant? Or show an example?



4.any good tuturial on learning max?


This implies you have already tried all the "bad" ones? The Usual Suspects are the tutorials that ship with it. Then search the web...

CGTalk Moderation
09-26-2006, 07:33 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.