PDA

View Full Version : [LEARNING] Measure tool development


pixel9
08-22-2008, 07:04 AM
Hi there!

Again a question, on a not that easy task. ;)

Does anybody of you already thought about developing a tool that allows the user to aquire point to point distances or lengths of edges and volumes of objects with n-vertices?
The idea for this utility grew, as a collegue asked me whether it would be possible to measure point distances and volumes in 3ds max the same way, AutoCAD does.

The questions I have are concerning the initial planning and development of this script from the beginning.

Thoughts:
-- have an obj
-- snapshot as mesh
-- get edge
-- convert edge to vertex selection
-- distance $Vertex1 $Vertex2

-- have an obj
-- snapshot as mesh
-- for-loop to get all vertices and their positions as an array allvertices([1,1,1],[1,2,1]..n)
-- put all vertices into a specific mathematical calculation (volumes with vector-positions)


The pickPoint() function is a great tool, except the fact that you select "random" points in 3d space. Selecting specific vertices isn't possible in a meaningful manner.
What kind of possibilities are left for a selection?
I thought of virtually opening the snapshot object, switching to edge-mode and then converting the selection to vertices.

Would be nice, to get some tips and/or hints from you on how to develop this kind of tool.


Since I want to dig into MAXScript even further and not keep scratching the scripting surface forever, I wish to see this thread as a learning one. :D

martinB
08-22-2008, 11:26 PM
Why not use pickpoints() in combination with 3D vertex snapping?

-- MartinB

Bobo
08-22-2008, 11:32 PM
My Siggraph 2008 MasterClass had an example of Edge measuring which was inspired by something I wrote here on CGTalk:
http://forums.cgsociety.org/showpost.php?p=4817281&postcount=21

For volumes, the Measure Utility in the Utilities tab already does that, and I have published a function in the MAXScript Reference that replicates the Center Of Mass and Volume calculation.

CGTalk Moderation
08-22-2008, 11:32 PM
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.