MaxScript Release 0.41b Beta Source FOR MAX 3 (6/14/1999)

Copyright (c) 1999 by Borislav Petrov, Bobo's Rendert**ls. 


Symmetry lets you transform vertices and faces on the one side of a symmetrical EditableMesh
and have the other side follow the same transformations.


Symmetry builds a database of mesh vertices and compares their local position relatively
to a specified local plane of symmetry. When one or more vertices or faces become selected,
the corresponding symmetrical vertices are searched and transformed when found.


Version 0.41b BETA (6/6/99)

You can now both select symmetrical faces and transform them (Move/Rotate/Scale).
Also the Capture... button has been made available in SO mode so you can rebuild the Vertex
Symmetry data after Face Extrude/Bevel and keep on working without going out and in.

Version 0.4 BETA (6/7/99)

This version lets you select faces on the one side of the symmetry plane - the corresponding
symmetrical faces on the other side become selected automatically.
This will let you Extrude and Bevel on both sides with a single click...

The problem: The faces should be REALLY symmetrical - you might need to Turn some Edges first.
You still cannot select a polygon and have a symmetrical polygon with the edge running in the wrong
direction become selected, too.

See the enclosed simple MAX scene - I created a cylinder and turned the edges on the left side to
make them symmetrical.
You can now go to Sub-Object/Face mode, select any number of faces and extrude or bevel them as

NOTE that you cannot move faces the same way you can move symmetrical vertices. The Face
Symmetry implements only FACE SELECTION, no transformations. To transform symmetrical faces,
please select their vertices and transform them instead.
(Please let me know if such functionality is important - I might implement it in the future...)

Btw, extruding faces generates new vertices. This means that the Vertex Symmetry
data becomes outdated.
You will have to exit SO mode and recapture the vertex state from time to time in order to have
access to the vertices of newly created beveled/extruded faces.
The Face Symmetry mode uses the same data base as the Vertex Symmetry.

Sorry for the inconvenience. I will try to find a way to improve this part.

Version 0.3 BETA (6/7/99)

*Implemented 3 new buttons:
-Select A selects all vertices with a Symmetry Pair whose coordinate is negative relatively to the Local
Symmetry Plane
-Select B selects all positive vertices.
(For example, if you are using YZ plane (symmetry ALONG the X axis), pressing Select A will select
all vertices in the Pairs whose X position value is negative (to the left of the plane)

-Swap will let you select the counterparts of any vertices you have selected. Vertices having a
symmetrical pair will be deselected and their counterpart will become selected. Vertices without a
counterpart will become deselected without selecting any other vertices.
This function lets you select some vertices on the object, transform them and their symmetrical verts
relatively to some snap point, and then go to the symmetrical vertices in order to transform relatively
to another snap point at the other side of the Symmetry plane.
It also lets you actually SEE where the symmetrical points are.

*Fixed the Symmetry Plane display to stay centered to the Bounding Box center while respecting the
local object origin in the direction of the Symmetry Plane normal.
This means that in the case of a default box, the YZ and XZ planes will be centered to the object,
while the XY plane will be aligned to the bottom of the box.

*Force LargeVertexDots display while in Interactive Symmetry mode. (User-controllable through a
variable - see source)
Vertex display modes are reset back to the original values when the Interactive button is depressed.

Version 0.2 BETA (6/7/99)

*When a mesh object with modifiers present is encountered, you will be prompted about collapsing.

*Made the Symmetry Plane Radio Buttons interactive - they will check for Symmetry automatically
unless you depress the new [Update] checkbutton (update can be SLOW with large meshes)

*Made the Capture Current State code twice as fast! (but it is still slow)

*Made all values intersession-sticky - floater position, Threshold value, Update state and Symmetry
Plane are saved to an INI file - when you start again, the last values are used.

*Implemented Symmetry Plane Display - a Plane will be displayed automatically when you Capture
the Symmetry State of a Mesh.
(NOTE: There can be only one plane in the scene. The last one you used will NOT be removed until
you use the utility on another object. There is currently no function to remove the last plane from the
scene, but I hope it does not stay in the way...)

Version 0.1 BETA (6/6/99)

*Download the ZIP file.
*Shut down MAX R3
*Unzip & Copy the BMPs into \UI, the .MS into \Scripts
*Start MAX R3
*Open the Source file (OPEN Script), read the notes in the source.
*Press Ctrl+E to Evaluate
*Select the Modeling Tab in the UI (or any other tab you would like)
*Right-click, Customize, find the Modeling Tools category in the list, Select the Symmetry entry
(should be the only one in the category)
*Drag the Icon to the Modeling Toolbar.

NOTE that MAX R3 creates a Copy of the Script file in the \UI\MACROSCRIPTS\ directory which will
be called "Modeling Tools-symmetry.mcr"
Next time you restart MAX, this copy will be evaluated automatically, and the icon will appear on the
tab you dragged it to.

The Symmetry Tool lets you Transform vertices at EditableMesh level and have their symmetrical
counterparts follow the transformations. For example you can select the finger's vertices on the left
hand of a character and move them to make the finger longer - the vertices on the right hand will
move in the other direction to keep the symmetry.

The tool uses the Local Object Space to define the Plane of Symmetry. Please read the notes in the
source of the script for more info.

To try the tool, do this:
*Create a simple box or sphere, select it.
*Press the Symmetry icon to open the tool's floater.
*Press the "Capture Current State" button
*Answer the prompt with yes to Collapse to EMesh
*Press the "Interactive..." button (which should be showing the name of the object now)
*Select a vertex (or some verts) on the one side of the box and move around - their symmetrical
counterparts should move, too.
(To use the XY plane as symmetry plane, please read the notes in the source of the script)

NOTE that the script will NOT work correctly with changing topology (like Face Extrude etc.) because
the vertex indices will change and the captured Symmetry Data might become outdated.
If you intend to change the number of vertices, depress the "Interactive..." button first, then modify
the Mesh, "Capture..." the state again and press the "Interactive..." button. If an error occurs while
working with the script, the interactivity will be disabled without any error messages.

The Threshold value is there to ensure the Symmetrical vertex can be detected correctly (some
rounding errors might occur in MAX and two symmetrical vertices might differ slightly in their


Version 0.41b BETA Source