MAXScript is a simple, object orientated programming language which runs within Discreet's 3D Studio MAX, GMAX and Autodesk VIZ, utilizing and extending their existing functionality.


Mesh Drape, now replaced by Wrapper.

Wraps one object around another.

Example: Wrapper Mesh, Test Text (Red object) has been extruded and placed above a squashed GeoSphere. 'Straight Projection' on left, 'Curve to Surface' on right with an offset.

See Wrapper

 

 

Contour Creator:

Creates a series of contours from a selected mesh.
Has the option of combining all contours and welding any vertices within the Threshold amount which although slow, gives a far better end result as otherwise the contours are composed of many small splines with coincident vertices.
If "Weld all Contours ?" is left unchecked, a selection set of contour lines will be created. You can always use the weld function in the next script to add and weld these together.


Fuse n' Weld:

Takes all vertices in a shape, compares them to their closest neighbor and moves them to an average position if within the threshold.
"Fuse" moves only, "Weld" moves and welds.
If many vertices are within the threshold, it only operates on the closest so it may be necessary to run the script a couple of times.
If multiple shapes are selected then all shapes are combined.

 

 

Refine Spline:

Adaptively adds extra points to a shape while retaining the shape's existing points and curvature. Most useful if a curve's vertices are converted to corner, or if in our case you're doing point to point machining.
In the example to the left, the top test curve is the original, the middle is the same curve with its vertices converted to corners, the bottom curve has had Refine Spline applied to it prior to the vertices being converted to corners.

 

 

Optimize Spline:

Adaptively removes points from a curve while retaining the shape's existing curvature.
In the example on left, compare the top and bottom test curves, while the lower curve contains around a third less vertices, it still retains the original shape. Experiment with the variables to get the best results.

 

 

 

Project Spline:

Projects a spline onto the surface of a mesh.

 

Spline Intersection:

Finds where a spline crosses over itself or another spline.

 

 

Preview Toolpath:

Previews finished CNC cut for a given path, tool and material block
Can be very important for checking how a design will machine.
This version uses Boolean operation which is too slow for production use.

Status: Under Development

 

I'd like to thank and acknowledge the help and encouragement of Doug McNabb who wrote an HPGL import function which was the starting point for everything else.
I'd also like to thank Swami Lama for the amount of time he has spent corresponding via email on numerous MAXScript issues, offering code and advice, and of course Bobo for making so much of his MAXScript code public. For general info on MAX or MAXScript, please visit a few of the links below.

Links to other sites you may find of interest.

MAX 3D - Info and news on 3D Studio MAX

Scriptspot - Great site with database of MAXScripts along with info and links

Bobo's Page - MAXScript site

Paul Bourke - Explanations and code examples of many graphic concepts

Geometry in Action

Algorithm Archive

Computational Geometry Resources

comp.graphics.algorithms FAQs

Directory of Computational Geometry Software

CGAL

Graphic Gems - Great source of example code

Computational Geometry Pages

The Geometry Junkyard

Desktop CNC Links Page

CAD / CAM World

CNC Retro-Fit Links Page

BOFH -- Alternative approach to technical support

 

Here's some new links passed on from Swami Lama on the subject of bezier curves:

"Bezier Curves"

"Bézier curves"

"Don Lancaster's Guru's Lair - Cubic Spline Library"

"2.8: Bezier curves"

"Finding All Intersections of Two Bezier Curves "

"On-Line Computer Graphics Notes"

Links to the rest of our own site:
CNC Home

Rainnea Graphics Home - Clothing - Jewellery - Accessories - Custom Gifts - Ordering
Clothing and Accessories Gallery - Mousemat and Wallet Gallery - Portfolio - Links