Builders/Metalab/AoI MetaCAD

From RepRap
Jump to: navigation, search

MetaCAD - A parametric solid modeling plugin for Art of Illusion

MetaCAD dialog.png MetaCAD dialog 2.png MetaCAD dialog 3.png



Important: You must install AoI with JOGL support selected for parts of Metacad to work (like DXF meshing)

  • 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:

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.

Note: The current version of AoI (2.7.2 has some bugs in the Boolean Operations like union, differnce and intersection that sometimeslead to ArrayIndexOutOfBounds Exceptions. If this happens either use AoI version 2.7 (which works better but is much solwer too :( or move around the parts a little bit (the bug might go away)



Primitives have no children

cube(x_size[, y_size, z_size])

The size parameters defaults to 1

cylinder(height, x_radius, z_radius, top_to_bottom__radius_ratio)

the height of the cylinder extends in the y-direction (that's how AoI represents cylinders). To make a cone or capped cone, change the last ratio parameters. Defaults to cylinder(1, 1, 1, 1)

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.

Defaults to sphere(1, 1, 1).

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:


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 operate on their children


offsets its children by the given vector


rotates its children around the origin by the given angles (in degrees)


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.


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.


Creates a triangle mesh from one or more child curves (polygons). Polygons with holes are supported automatically. Self-intersecting curves and curves intersecting other curves are also supported using the "odd winding rule" technique.


insets its children by the given distance. works only on curves (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(axis, sweep_angle, radius)

Revolves a flat object around an axis to form a revolution volume. axis specifies around which axis to revolve (X, Y or Z enums - defaults to X). sweep_angle specifies the angle to revolve in degrees (defaults to 360) radius is the radius of revolution (defaults to 0)

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