Using CAD-Zilla

There is a scripting interface as well as the interactive user interface. The scripting interface is usable from the Jython Console module. See the Modelzilla Framework Scripting Interface and the CAD-Zilla Scripting Interface.

Purpose

CAD-Zilla is a geometrical modeling tool. (CAD stands for Computer Aided Design). Its purpose is to create geometric models where controling the specific shape is the goal. The input to CAD-Zilla is geometry, and the output is more geometry. When using CAD-Zilla, you are a world of geometry. If you need to create model as part of another model built in the Modelzilla universe, and a conception is essentially an abstract geometry, than CAD-Zilla may be the program for you.

CAD-Zilla is a very "low level" CAD program: although it contains some sophisticated geometrical modeling abilities, it does not contain high-level connections between ideas and geometry such as a door frame builder, or engine block builder. These types of features may be added in the future through specialized application modules. An example of an idea to geometry tool already in the Modelzilla family is VincentVanMol, a molecular graphics program that maps the ideas of macro molecular chemistry to geometrical models in a convenient and specialized way.

Typical users of a CAD program, mechanical engineers and architects, are farmiliar with the idea controling a geometric shape, because they design in shapes. CAD-Zilla is a powerfull builder of shapes. It can create anything AutoCAD v13 could and more. However, CAD-Zilla finds it self as a Modelzilla application, so its user might be a scientist that struggles with the idea of design. Visualization and presentation is what they want to do. Hopefully they will find CAD-Zilla a usefull tool when used together with other applications in the Modelzilla universe. One could design a presentation, an imagined physical model, or as a tool to prepare input to a more specialied tool. Geometry is everywhere, and CAD-Zilla is Modelzilla's most general tool.


Organization

CAD-Zilla has a very simple and consistent method of specifying geometries. Complex geometries are specified by simpler geometries. The simpler geometries become a piece of the more complex geometry when it is created. Simple geometry are specified by simple information like three-dimensional points, three-dimensional vectors, scalar values, integer values, and other simple self-contained values. For example a straight line is specified by the two end points. Complex geometries are specified by a combination of simple geometries and simple value types. For example, a solid of revolution is specified by a poygonal section, and axis, and angle of revolution. Every input specification in CAD-Zilla is a member of the Modelzilla database. Some input have a geometrical representation in the viewport, while others such as a scalar value, do not. But all are legitimate database nodes. Geometries that require no other geometry for their specification are sometimes called "primatives" in CAD circles. Geometries requiring one or more other geometries for their specification are called "constructions".

The principal types of geometry in CAD-Zilla are:

All geometrical objects in CAD-Zilla from polygons to solids are created within the current user coordinate system (UCS). This means that if the UCS is currently 50 units to the left and rotated to funny orientation, the new objects created with CAD-Zilla will have this transformation matrix copied to their coordinate system. Any specifying points, vectors etc. will be with respect to this coordinate system. This system is esspecially evident in planar polygons, which will not depend on any z value of the input points.

Most operations in CAD-Zilla result in a continued association between the input geometries and the resultant geometries. Resultant geometries are re-computed if the input objects are changed or moved. CAD-Zilla makes use of the dependancy tracking system of the Modelzilla database to achive this.


Interactive interface

Sequential Input Dialog

CAD-Zilla makes extensive use of the sequential input dialog built into Modelzilla. This dialog box asks for input for several pieces of data in turn. Using this dialog box has been a point of confusion for many people trying to learn CAD-Zilla, so we're going to try to make it clear right here. When the dialog box first comes up, it is accepting input for the first piece of data in it's list. There is a pre-defined kind of input entry device for every type of data. If the data is a three-dimensional point, a point entry device appears. If the data is a color, a color entry device will appears. When the entry devices is outlined in black, it is accepting input.

Value entry devices take input from a variety of sources. They may take mouse input from the viewport, looking at the mouse position to calculate a value. They may have a text entry field. They may have traditional scrollbar.

Data entry devices may have several methods of finalizing the value, causing the next entry device in the sequence to start. There are:

It is possible to specify the values in a sequential input dialogue out of order if you want to. Just select the entry device, enter the value and finalize it. Do this for each piece of information that needs specification. Although it is possible to specify a the values out of order, it is not recommended because in many cases the setup for entry device is effected by the values entered in the previous entries. For example, in the three dimensional rotator function, the "axis" entry comes before the "angle" entry because the "axis" entry specifies the plane in which angle is be drawn.

The cancel button in the sequential input dialog uses the undo system to remove the current object you building.

Point entry device

The point entry device specifies a three-dimensional point from a text entry, or by selecting a point from the viewport. To specify a point the via text entry, type the point as a comma separted tuple: "x, y, z", or just space separated: "x y z". The z is optional: "x y". To specify the point from the viewport, move the mouse to where you want to the point to be, and click the left mouse button. The viewport point specification is affected by the current point snap settings. It is possible to force the point to polygon verticies, polygon segment middle points, the intersection between a polygon to plane, the nearest point on a polygon, the intersection between to polygons, the center of a circle, a solid geometry vertex, or the nearest grid snap location. When picking points freely off the viewport, they are actually constrained to a picking plane. The point will be at the position in the X Y plane of the current user cordinate system that is directly under the mouse cursor. When picking points freely, it is recomended that you position the viewpoint so the UCS xy plane is aligned somewhat with the screen, or very large unexpcted point values will result.

Vector entry device

The vector entry device specifies a three-dimensional vector from a text entry, or by selecting two points from the viewport. To specify a vector via text entry, type the point as a comma separted tuple: "x, y, z", or just space separated: "x y z". The z is optional: "x y". The method of specifying the vector via the viewport is variable to the function the needs for vector. Usually it is specified by picking two points. If you expand the vector entry device, you will see it contains two point entry devices. Sometimes the function that needs the vector will automatically set the first of these points. Vector entry via viewport works by simply using the point entry twice in succession. You move the mouse, click the left mouse button, release left mouse button, move the mouse to a new location, and click and release again. Do not drag the mouse. If you have the "ortho" point snap setting on, you will be able to enter a factor that is pure X or pure Y.

Scalar entry device

The scalar entry device specifies a one-dimensional scalar value from a text entry, or from a scroll bar, or by selecting two points from the viewport. The entry device will offer a text entry or scroll bar depending on how was set up by the function that uses the scalar data. If you expand the scalar entry device you will see that it contains two point entry devices. These are used for specifing the scalar value from the viewport. The method of entry via viewport actually varies according to the function that is using the scalar value. Sometimes it is the distance between two points. It can also be the ratio between the distance between the first point and an automatically specified base point, and the distance between the second point the base point.

Object entry device

The object entry device specifies and objects set. Its use is described in the general Modelzilla documentation. Briefly, the object entry devices used by picking the objects you like to add to the list in the viewport with a mouse. It is also possible to enter the object's tag name in the text field, select from the network editor, of from the database tree. When picking objects from the viewport, clicking the right mouse button will finalize the object entry device. You pick the objects with the left mouse button, and say you're finished with the right mouse button.

Color entry device

The color entry device specifies a color from an RGB triplet, or an HSV tripplet. Changing the red and green or blue value will update the color and also update the hue, saturation and value. Chaning the hue, saturation or value will update the color and also update the red blue and green values. Is very easy to use.

Integer entry device

The integer entry device specifies integer from a text entry or a scroll bar. It is very easy to use.

Polygons

The simplest kind of geometry in CAD-Zilla are the polygon primatives. A polygon in CAD-Zilla is not necessarily planer. Is simply a sequence of connected lines. Some polygons have a smooth analytical form that one would normally not consider to be a polygon and all, such as a circle. These polygons are actually parametric curves turned into into polygons by sampling the function to generate a polygon of many small straight lines that for most practical purposes is smooth, and more imporantly, provides a consistent input to other CAD-Zilla operations. Most CAD-Zilla functions operate discreetly, meaning they are operating on a discrete polygon edges that results from a sampling of the analytical curve, rather than considering the analytical curve itself.

The first step to create any polygon is to get the UCS in the right place. If you're going to create a planar polygon, it will live in the X Y plane of the current UCS.


Polygon primatives

Line from two points

This object is specified by two end points. To create a line interactively, pick the first point, and then pick the second point. You will see the line is being updated as you picked second point. Whenever possible, geometries in CAD-Zilla are updated if sufficient information has been specified. See line.

Polyline from point set

This object is specified by set of points. To create online interactively, enter points to add to the polygon. Use the close button to automatically close the polygon. See polyline.

Circle from center and raidus

This object is specified by by a center and radius. See circle.

Ellipse from center and two radii

This object is specified by a center and two radius values. See ellipse.

Arc from three circumference points

This object is specified the point where the arc begins, a point on the arc's circumference, and the point where the arc ends. See arc.

Arc from start direction and end

This object is specified by the point where the arc begins, a point on the tangent from the first point, and the point where the arc ends. See arcSTE.

Arc from start angle, end angle, center, radius

This object is specified by the start angle, end angle, center, and radius. See arcCRAA.

Rectangle from two points

This object is specified by opposite corner points of the rectangle. See rect.

Inscribed regular polygon

This object is specified by a center, raidus, and side count. See inscribed.

Circumscribed regular polygon

This object is specified by center, radius, and side count. See circumscribed.

Parametric polygon function

This is specified by a parametric function descring x, y and z across a range of s. See paramCurve. Note: This polygon type is currently not working because JPython support for Modelzilla may be removed. We plan on making more general system for this type of need, which would have the user write a small piece of Java code that they would have too keep with their model. If you're in love with JPython let us know.

Polygon contructions

Polygon join construction

The polygon join constructions connects together a number of polygons that were created separately. The polygon should be touching at the end points. The join the algorithm is looking for a minimum distance between the set of polygons in the join, so polygons do not actually have to be exactly touching, however endpoints that are not touching they may be moved in a surprising ways. The input polygons become a part of the join object. If the inputs are chaged the join will be changed as well. See joinPoly.

Break operation

The break operation takes a set of polygons and a set of boundaries. The given polygons are broken into multiple polygons where they intersect the boundary polygons. No relationships are keeped. See breakPoly.

Extend operation

The extend operation extends the end point of the polygon to the boundary. If the polygon has an analytical representation the extension will be added along the direction of the tangent at the end of the extended polygon. No relationships are keeped. See extendPoly.

Trim operation

The trim operation works something like a break operation, except it removes segments between boundaries. See trimPoly.

Extend to point operation

The extend to point operation extends input polygons to their extrapolated intersection point. No relationships are keeped. See intersectExtendPoly.

Smooth construction

The smooth construction makes a smooth polygon using B-Splines. The input polygon becomes a piece of the smooth polygon. If the input is changed the smooth polygon follows. See smoothPoly.

Fillet effector

The filled operation rounds the corner of a sharp polygon vertex. Note it is possible to select only a user vertex to fillet, as opposed to computed vertices, because computed verticies may come and go. The relationship is keped with a fillet effector object. The input polygon is not reparented. See filletPoly.

Offset construction

The offset construction creates a polygon offset object that is tangent everywhere to the source object. The input polygon becomes part of the offset. See offset.

The poly-curve function

This function is a convenient way to construct a variety of polygon types and automatically join them as they are drawn. See polyCurve.

Regions

A region is a two dimensional area. Regions are useful as input to other geometries, usually as the section for a sweep.

Region from polygon

This is a region specified by set of polygon boundaries. The only requirement is that the boundaries must not intersect and they must be approximatly in the same plane, because the z component will be ignored. The resulting region may be discontinuous and may have holes. The input polygons become a part of the region object. See region.

Region of union

This is a region specified by a union of other regions. The input region becomes part of the union object. The computed region will have area everywhere there was area in any (not all) of the input regions. The input regions become a part of the union object. See unionRegions.

Region of subtraction

This is a region specified by subtraction of other regions. Two distinct sets of regions are supplied as input: positive regions and negative regions. The computed region has area everywhere the positive regions have area in the negative regions do not have area. The input regions become part of the subtraction object. See subtractRegions

Region of intersection

This works just like the union and subtraction, except at the computed region will have area where all (not any) input regions have area. The input regions become part of the subtraction object. See intersectRegions.


Solids

Solids are closed volumes bound by polyhedra. These geometries are usually the end goal of a CAD-Zilla model. They are the most true to life geometry that CAD-Zilla offers. The solid geometries of CAD-Zilla can interact with models created by other Modelzilla applications. CAD-Zilla can perform solid operations on any solid geometry whether not it was created by CAD-Zilla. For example you might be interested in making a slab of a molecular surface of a transmembrane protein that as it channel through it. Or you might be interested in subtracting holes from a physical tmodel where you want to attach magnets. You might be interested in determining which of the set of atoms are within a volume specified by CAD-Zilla. This was an option that was previously unavailable to most people doing molecular modeling. The possibility will hopefully find its uses.


Solid primatives

The solid primitives provide a convenient way create some of the most simple solids. All of these are reproducible be a sweeping techniques, however these simple geometries may prove to be more reliable.

Box from rectangle and height

This is specified by two corner points on the base plane, and the height. See box.

Wedge from rectangle and height

This is specified by two corner points on the base plane, and the height. See wedge.

Sphere from center radius

This is specified by center point and a radius. See sweep.

Cylinder from center, raidus, and height

This is specified by center and a radius on a base plane, and a height. See cylinder.

Torus from center and two radii

This is specified by center and a radius on a base plane, and a tube radius. See torus.

Cone from center, raidus, height

This is specified by center and a radius on a base plane, and a height. See cone.

Solid constructions

Solid constructions the define solid geometries given input polygons, regions, and solids. The solid constructions are usually the last step in creating your geometrical model.

Solid of extrusion object

This is specifed by a set of section objects that can be polygons or regions, and a path vector. The solid is generated by sweeping the sections along a straight line. The inputs become part of the resulting solid. See extrusion.

Solid of revolution object

The solid of revolution is specifed by a set of section objects that can be polygons or regions, and an axis and angle. The solid is generated by sweeping the sesctions along a circle arc. The inputs become part of the resulting solid. See revolution.

Solid by general path sweep object

The solid by general past sweep is specifed by a set of section objects that can be polygons or regions, and a path object that must be polygon. The solid is generated by sweeping sections along a polygon. The path polygon should usually be smooth. If the path polygon is a line this function is the same as the solid the extrusion. If the path polygon is a circle arc this function is the same as the solid of revolution. The inputs become part of the resulting solid. See sweep.

Solid by multi section sweep object

The multi section sweep operation is specifed by a set of section objects that must be polygons, a path object that must be polygon, and guide points that indicates the connectivity between sections. The path takes the sweep from one section to the next. Intermediate sections are calculated as blends of the input sections. The inputs become part of the resulting solid. See msSweep.

Ruled sweep object

The ruled sweep operation generates a solid from several sections and several paths. The paths should approximately intersect the sections. The paths and the sections essentially have the same relationship as the chord and span framing of an airplane wing. The inputs become part of the resulting solid. See ruledSurface.

Solid of union object

The solid of union is specifed by a set of solids. It generates a solid that has volume everywhere any of the input solids have volume. The input solids become part of the resulting union. See union.

Solid of sutraction object

The solid of subtraction is specifed by a set of positive solids, and negative solids. It generates a solid that has volume everywhere the positive input solids has volume, and the negative input solids do not have volume. The input solids become part of the resulting subtraction. See subtraction.

Solid of interseciton object

The solid of intersection is specifed by a set of solids. It generates a solid that has volume everywhere all input solids have volume. The input solids become part of the resulting. See intersectRegions.

Solid by cleaving object

This is specifed by a set of solids and a cleaving plane. It generate a solid by cutting an existing solid into with a plane. This is the same as subtracting a very large box from a solid, but it may be faster to use and compute. See cleave.


Dimensioning

CAD-Zilla can generate some line based geometries that show traditional dimension labels.