3DS / DXF files reading (beta 2 syntax)

Syntax :

import {
data filename
[ scale_ratio scale_value ]
[ faces faces_flag ]
[ swap_faces swap_flag ]
[ thickness thickness_value ]
[ use_notex notex_flag ]
[ keyval_info keyval_flag ]
[ no_closing no_closing_flag ]
[ clean_micro micro_flag ]
[ write_to_file filename ]
[ direction vector ]
[ base vector ]
}

Tips :

The point about converting from 3DS, DXF (and also other formats) to MAP is translating a boundary representation to a volumic one, that is faces to brushes. The flags available with the script will give you some control over the process, and will also help you troubleshooting.

data : input files are recognized by there extension. MGS can read either dxf, 3ds, or wsurf custom file format.

faces : if set to 1, MGS will compute faces, and will not attempt to "glue" them together. You'll get an accurate representation of your model, but with many brushes. Better leave this for debugging.

swap_faces : Use this to swap the face orientation. Default is faces running CCW when viewed from outside. To find wether or not you have to use the swap_faces flag to change the orientation, simply import once with faces and no_tex flags set. This will tell you where is the inside and where is the outside.

thickness : use this value to set the thickness of the faces. Default is 4. You might have to change this value depending on the scale of your model.

use_notex : this flag will cause all interior faces on brushes (i.e the ones you should never see) to have a "no_tex" texture name. Use this for debugging.

keyval_info : this flag will cause MGS to output information about the surfaces in the func_group epairs. Usefull for data debugging.

no_closing : by default, MGS will automatically attempt to close some surfaces if the holes are simple (that is planar and convex). Use the flag to prevent this behaviour.

clean_micro : the main drawback of the algorithm is the possible output of microbrushes. You can remove these annoying things with the clean_micro flag. But then you will not get back exactly your input. This microbrushes issue will be fixed in later releases.

write_to_file : output the faces to MGS custom wsurf file format.

direction and base : you can output a set of faces by projecting them against a plane. direction is the outer normal of the plane, and base a point on the plane. If you only specify a direction vector, MGS will compute the best fitted base for you.


wsurf ASCII format

MGS also uses a custom ASCII format, with a very simple syntax :

{
{ (x1 y1 z1) (x2 y2 z2) [ ... ] } // one face
{ [ ... ] } // another
}

The faces are supposed to be convex, and run CCW when viewed from outside. See the MGS distribution for examples.