Builders/Metalab/AoI MetaCAD
Contents
- 1 MetaCAD - A parametric solid modeling plugin for Art of Illusion
- 1.1 Intro
- 1.2 Download
- 1.3 How to Use
- 1.4 Reference
- 1.4.1 Primitives
- 1.4.2 Operations
- 1.4.2.1 union()
- 1.4.2.2 intersection()
- 1.4.2.3 difference()
- 1.4.2.4 move(x,y,z)
- 1.4.2.5 rotate(x_angle,y_angle,z_angle)
- 1.4.2.6 trans(x,y,z,x_angle,y_angle,z_angle)
- 1.4.2.7 scale(scale[, y_scale, z_scale])
- 1.4.2.8 group()
- 1.4.2.9 joincurves(join_ends, tolerance)
- 1.4.2.10 inset(distance)
- 1.4.2.11 loop(var=startvalue, condition, var=newexpression)
- 1.4.2.12 extrude(x, y, z, nr_of_segments, rotation)
- 1.4.2.13 lathe
- 1.4.3 Other Operations
MetaCAD - A parametric solid modeling plugin for Art of Illusion
Intro
Download
- TODO: The MetaCAD plugin can be installed from the Scripts and Plugins Manager from within Art of Illusion
- Alternatively, for manual install, copy this jar to the Plugins dir in your Art of Illusion installation dir:
- Source Code can be found here: http://reprap.svn.sourceforge.net/viewvc/reprap/trunk/reprap/miscellaneous/AoI/plugins/
How to Use
Activate the MetaCAD dialog by pressing m or by clicking Tools-MetaCAD...
Create MetaCAD Primitives (like a cube) by clicking one of the buttons in the Primitives tab of the MetaCAD dialog.
Create all other MetaCAD Operations (like union for example) by selecting the Objects the operation shouldbe performed on and click on one of the buttons in the CAD tab of the MetaCAD dialog.
You can change MetaCAD Objects and their parameters by editing their name-field. For the changes to take effect you need to select the Object and click the evaluate button on bottom ofthe MetaCAD dialog.
Reference
Primitives
Primitives have no children
cube(x_size, y_size, z_size)
cylinder(height, x_radius, z_radius)
the height of the cylinder extends in the y-direction (that's how AoI represents cylinders)
sphere(radius [, y_radius, z_radius])
Creates a sphere with the given radius. optionally radii for all three axis can be given to create an ellipsoid.
regular(n, xradius, yradius)
Creates a regular polygone in the xy plane entered around the origin with n sides scaled by xradius and optionally yradius.
star(n, r1, r2)
Creates a star shape with n spikes. the spikes have radius r1, the points between the spikes have radius r2.
roll(n, R, r, d)
creates an approximation of an Epitrochoid with n Vertices parametrized bt R,r and d as described here: http://en.wikipedia.org/wiki/Epitrochoid
file(filename)
filename is a string enclosed by double quotes like in most programming languages. This works only for dxf 2D files. Most often you will want to use joincurves (see below) to join individual line segments that have some points in common. example:
=joincurves() file("bracket.dxf")
Operations
Operations operate on their children
union()
intersection()
difference()
move(x,y,z)
offsets its children by the given vector
rotate(x_angle,y_angle,z_angle)
rotates its children around the origin by the given angles (in degrees)
trans(x,y,z,x_angle,y_angle,z_angle)
combined move and rotate
scale(scale[, y_scale, z_scale])
sclaes its children by the given factor. optionally three factors can be provided for the 3 axis.
group()
alias for move(0,0,0)
joincurves(join_ends, tolerance)
Joins linesegments of its children to form complete curves. Very useful for imported files (see file primitive above). If join_ends evaluates to true (default), we will create a closed loop of each curve found. tolerance gives the threshold (in mm) under which we consider points to be coincident.
inset(distance)
insets its children by the given distance. works only on polygons
loop(var=startvalue, condition, var=newexpression)
TODO: document me example:
=for(i=0, i<5, i=i+1) move(3*i, 0, 0) sphere(1)
extrude(x, y, z, nr_of_segments, rotation)
extrudes its children into the direction given by the vector x,y,z optionally a rotation (in degrees) and the number of segments that the extruded object should have can be given
lathe
TODO:document me
Other Operations
extract macro
takes the selected objects and creates a macro out of them
inline macro
converts the selected macro call into an object tree of the macro/usefull to debug and inspect intermediate results of macros