harmonic.cad.manager
Class CAD

java.lang.Object
  |
  +--harmonic.mz.data.ModelNode
        |
        +--harmonic.mz.function.Module
              |
              +--harmonic.cad.manager.CAD
All Implemented Interfaces:
java.awt.event.ActionListener, harmonic.mz.data.DataNode, harmonic.mz.gui.Documentable, java.util.EventListener, harmonic.mz.data.Interpolater, harmonic.meshGeom.math.MarkableObject, harmonic.mz.event.NodeListener

public class CAD
extends harmonic.mz.function.Module

This is the central module object of the md (aka CAD-Zilla) extension.


Field Summary
static java.lang.String CURRENT_CIRCLE_EDGES
           
static java.lang.String CURRENT_DIM_FACTORS
           
static java.lang.String CURRENT_DIM_MATERIAL
           
static java.lang.String CURRENT_FILL_MATERIAL
           
static java.lang.String CURRENT_LINE_MATERIAL
           
static java.lang.String CURRENT_LINE_WIDTH
           
static java.lang.String CURRENT_MODEL_SCALE
           
static java.lang.String CURRENT_POINT_MARK_SIZE
           
static java.lang.String CURRENT_POINT_MARK_STYLE
           
static java.lang.String CURRENT_POINT_MATERIAL
           
static java.lang.String CURRENT_POLYGON_SPLINE_SUBDIVISION
           
static java.lang.String CURRENT_SURFACE
           
static java.lang.String CURRENT_SURFACE_SPLINE_SUBDIVISION
           
static MainDialog mainDialog
           
static java.lang.String MARK_GEOM
           
static CAD md
           
static int NO_INTERSECTION
           
static int NO_REQUIREMENTS
           
static java.lang.String POLY_TYPE
           
static java.lang.String REGION_TYPE
           
static java.lang.String SOLID_TYPE
           
static java.lang.String SURFACE_TYPE
           
 
Fields inherited from class harmonic.mz.function.Module
bBigImageBad, bigToolbarImage, bInterfaceSettingsInvalid, bPythonDone, className, functionRoot, functionTable, initFile, menu, menuRoot, publicName, pyRef, settings, startCheck, toolbarRoot, vptoolRoot, workingDir
 
Fields inherited from class harmonic.mz.data.ModelNode
_fileRoot_, _thread_, ATTRIB_CONTROL_WIDGET, ATTRIB_LISTABLE, ATTRIB_PRESENTABLE, ATTRIB_PRIVATE, ATTRIB_REMOVEABLE, ATTRIB_RENAMEABLE, ATTRIB_SHOW_CONTEXT_MENU, ATTRIB_TYPE_FILTER, ATTRIB_USERGROUP, ATTRIB_VALUE_GROUP, ATTRIB_VE_LISTENER, bCustomCS, bDebug, bValid, name
 
Constructor Summary
CAD()
           
 
Method Summary
 void addFunctions()
           
static void addInputDialog(java.awt.Component cmp)
           
static void addShape(harmonic.mz.data.ShapeNode def)
           
static int calcCirclePolygonization(boolean bRough, harmonic.mz.data.fields.IntField circleEdges, float radius)
           
 void createGUI()
           
 void createStandardLists(harmonic.mz.data.FileNode file)
           
static void disField(harmonic.mz.data.ModelNode node)
           
static PolygonShape extendPolygon(PolygonShape _def, int side, harmonic.meshGeom.math.Pnt3f to, int cmode, boolean bAddLine)
           
static int findNearestPolygonVertex(harmonic.viewer3D.PaintStruct p, harmonic.meshGeom.math.PickInfo pi, int x, int y, harmonic.viewer3D.Viewport view, harmonic.meshGeom.math.TMat ucsMat)
          This keep comming up.
 java.lang.String getHelpDir()
           
 java.lang.String getHelpFile(harmonic.mz.gui.Documentable helpMe)
           
 java.lang.String getResourceDir()
           
 java.lang.String getWorkingDir()
           
 boolean hasStandardLists(harmonic.mz.data.FileNode file)
           
 void installInFramework()
           
static void intersectCurveAndPoint(harmonic.meshGeom.math.Pnt3f rpoint, float[] rparam, PolygonShape curveDef, harmonic.meshGeom.math.Pnt3f pnt)
           
static int intersectCurves(harmonic.meshGeom.math.Pnt3f[] rpoint, float[] rparamA, float[] rparamB, PolygonShape curveDefA, PolygonShape curveDefB, harmonic.mz.util.ObjectRelater relator)
           
static int intersectPolygons(harmonic.meshGeom.math.Pnt3f[] rpoint, float[] rparamA, float[] rparamB, harmonic.meshGeom.geom.PolygonGeom curveA, harmonic.meshGeom.geom.PolygonGeom curveB)
           
static boolean intersectRayAndCurve(harmonic.meshGeom.math.Pnt3f rpoint, harmonic.meshGeom.math.Pnt3f raya, harmonic.meshGeom.math.Pnt3f rayb, PolygonShape curveDef)
           
static boolean isSolid(harmonic.mz.data.DataNode def)
           
static void pickPointOnLine(harmonic.meshGeom.math.Pnt3f ret, int x, int y, harmonic.viewer3D.Viewport view, harmonic.meshGeom.math.Pnt3f a, harmonic.meshGeom.math.Pnt3f b)
          Returns the point in global coordinates where the picking ray is closest to the line
static void pointOnPlane(harmonic.meshGeom.math.Pnt3f ret, int x, int y, harmonic.viewer3D.Viewport view, harmonic.meshGeom.math.TMat ucsMat)
          Returns the point in ucs coordinates intersected by the picking ray.
static harmonic.meshGeom.geom.PolygonGeom[] polygonsFromRegion(harmonic.meshGeom.geom.RegionGeom geom)
           
static harmonic.meshGeom.geom.RegionGeom regionFromPolygons(harmonic.meshGeom.geom.PolygonGeom[] polygons)
           
 void removeGUI()
           
static void removeInputDialog(java.awt.Component cmp)
           
static harmonic.meshGeom.geom.PolygonGeom resamplePolygon(PolygonShape def, int nVert, float offsetParam)
           
 
Methods inherited from class harmonic.mz.function.Module
addFSFunction, addFunction, addFunction, execute, getFunction, getFunctionTable, getInstallDir, macroGUI, modelLoaded, modelUnloaded, readSettings, writeSettings
 
Methods inherited from class harmonic.mz.data.ModelNode
actionPerformed, addAll, addAlphaed, addField, addField, addField, addFields, addNetworkInput, addNetworkOutput, addNode, addNodeListener, addNodeListener, addNodes, addNodes, addToCurrent, addToGlobals, addToNetworkEditor, addToTemps, addWithUndo, allFieldsAreFinal, applyDataTransfer, areFieldsValid, assignFromMetaFields, assignFromXMLAttributes, assignFromXMLString, assignToMetaFields, assignToXMLAttributes, assignToXMLString, at, bind, canSelect, castSelection, checkFileRead, checkNetworkInput, childCount, clean, clearAttrib, clearNotified, compare, copyFrom, createControlWidget, createCopy, createXMLElement, deepCopy, defeatNodeEvents, disableEvents, enableEvents, expectedValidationTime, fileRoot, finalize, findFieldElement, findNode, fromXMLNodes, getAttrib, getBound, getCatagory, getControlWidget, getCurrentNames, getDataTransfer, getDataTransferTypes, getDeleted, getDirectInputs, getDirectOutputs, getEffectors, getEntryListener, getErrorState, getFilterType, getFullName, getHandles, getInstanceURL, getInterpolater, getIsLeaf, getListable, getMark, getMetaFields, getName, getNodeChildren_V, getNodeChildren, getNodeID, getNodeParent, getObjectRep, getPresentable, getPrivate, getReferencePoolName, getRemoteOwner, getRemoveable, getRenameable, getSaveable, getSavedChildren, getSelect, getSeparateDirectInputs, getSeparateDirectOutputs, getSequenced, getSerialNo, getTags, getTentativeSelect, getTransformable, getTransformableParent, getTransient, getTreeName, getTypeImage, getTypeURL, getUnfoldedChildren, getUpdateTime, getUserGroup, getValidates, getValue, getXMLNodes, hasDependants, hasExternalRef, hashKey, hasValidationLock, hideControlWidget, indexOf, initControlWidget, insertNode, interpolate_Linear, interpolate_Quadratic, invalidate, isField, isFinal, isInSubtree, isInTree, isLinked, isNotified, isPurged, isSet, isTemporary, isValid, linkedTo, linksChildren, makeContextMenu, makeFixed, makePrototype, makeReferenced, makeUnreferenced, makeVisibleInGUI, markNotified, mayValidate, nodeChanged, notifyListeners, postAssignFromXMLElement, preAssignToXMLElement, printChildren, printTags, printTree, printTree, purge, purgeFinal, pythonString, remove, removeAll, removeAll, removeHandles, removeNetworkInput, removeNetworkOutput, removeNode, removeNode, removeNode, removeNodeListener, replace, selfNodeChanged, set, setActualName, setAttrib, setBound, setCatagory, setChildrenExcept, setCoordSystem, setCurrentControlWidget, setCurrentNames, setDeleted, setEntryListener, setErrorState, setFromPrototype, setIsField, setIsLeaf, setIsSet, setListable, setMark, setMetaFields, setName, setNodeParent, setPresentable, setPrivate, setRemoteOwner, setRemoveable, setRenameable, setSaveable, setSelect, setSelect, setSequenced, setSerialNo, setTentativeSelect, setTentativeSelect, setToLink, setTransient, setTransientChildren, setUpdateTime, setUserGroup, setValidates, setValidationLock, setValue, setValueGroup, showControlWidget, showControlWidget, showControlWidget, showHandles, startRename, tag, toString, unlinkListeners, unmarkNotified, untag, updateBindable, valChanged, valChanged, validate, valueString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

POLY_TYPE

public static java.lang.String POLY_TYPE

REGION_TYPE

public static java.lang.String REGION_TYPE

SURFACE_TYPE

public static java.lang.String SURFACE_TYPE

SOLID_TYPE

public static java.lang.String SOLID_TYPE

MARK_GEOM

public static final java.lang.String MARK_GEOM
See Also:
Constant Field Values

NO_REQUIREMENTS

public static final int NO_REQUIREMENTS
See Also:
Constant Field Values

NO_INTERSECTION

public static final int NO_INTERSECTION
See Also:
Constant Field Values

CURRENT_FILL_MATERIAL

public static final java.lang.String CURRENT_FILL_MATERIAL
See Also:
Constant Field Values

CURRENT_LINE_MATERIAL

public static final java.lang.String CURRENT_LINE_MATERIAL
See Also:
Constant Field Values

CURRENT_POINT_MATERIAL

public static final java.lang.String CURRENT_POINT_MATERIAL
See Also:
Constant Field Values

CURRENT_DIM_MATERIAL

public static final java.lang.String CURRENT_DIM_MATERIAL
See Also:
Constant Field Values

CURRENT_DIM_FACTORS

public static final java.lang.String CURRENT_DIM_FACTORS
See Also:
Constant Field Values

CURRENT_SURFACE

public static final java.lang.String CURRENT_SURFACE
See Also:
Constant Field Values

CURRENT_LINE_WIDTH

public static final java.lang.String CURRENT_LINE_WIDTH
See Also:
Constant Field Values

CURRENT_CIRCLE_EDGES

public static final java.lang.String CURRENT_CIRCLE_EDGES
See Also:
Constant Field Values

CURRENT_POLYGON_SPLINE_SUBDIVISION

public static final java.lang.String CURRENT_POLYGON_SPLINE_SUBDIVISION
See Also:
Constant Field Values

CURRENT_SURFACE_SPLINE_SUBDIVISION

public static final java.lang.String CURRENT_SURFACE_SPLINE_SUBDIVISION
See Also:
Constant Field Values

CURRENT_MODEL_SCALE

public static final java.lang.String CURRENT_MODEL_SCALE
See Also:
Constant Field Values

CURRENT_POINT_MARK_SIZE

public static final java.lang.String CURRENT_POINT_MARK_SIZE
See Also:
Constant Field Values

CURRENT_POINT_MARK_STYLE

public static final java.lang.String CURRENT_POINT_MARK_STYLE
See Also:
Constant Field Values

md

public static CAD md

mainDialog

public static MainDialog mainDialog
Constructor Detail

CAD

public CAD()
Method Detail

getResourceDir

public java.lang.String getResourceDir()
Overrides:
getResourceDir in class harmonic.mz.function.Module

getHelpDir

public java.lang.String getHelpDir()
Overrides:
getHelpDir in class harmonic.mz.function.Module

getWorkingDir

public java.lang.String getWorkingDir()
Overrides:
getWorkingDir in class harmonic.mz.function.Module

getHelpFile

public java.lang.String getHelpFile(harmonic.mz.gui.Documentable helpMe)
Overrides:
getHelpFile in class harmonic.mz.function.Module

addInputDialog

public static void addInputDialog(java.awt.Component cmp)

removeInputDialog

public static void removeInputDialog(java.awt.Component cmp)

installInFramework

public void installInFramework()
Overrides:
installInFramework in class harmonic.mz.function.Module

addFunctions

public void addFunctions()

createGUI

public void createGUI()

removeGUI

public void removeGUI()
Overrides:
removeGUI in class harmonic.mz.function.Module

hasStandardLists

public boolean hasStandardLists(harmonic.mz.data.FileNode file)
Overrides:
hasStandardLists in class harmonic.mz.function.Module

createStandardLists

public void createStandardLists(harmonic.mz.data.FileNode file)
Overrides:
createStandardLists in class harmonic.mz.function.Module

addShape

public static void addShape(harmonic.mz.data.ShapeNode def)

disField

public static void disField(harmonic.mz.data.ModelNode node)

calcCirclePolygonization

public static int calcCirclePolygonization(boolean bRough,
                                           harmonic.mz.data.fields.IntField circleEdges,
                                           float radius)

resamplePolygon

public static harmonic.meshGeom.geom.PolygonGeom resamplePolygon(PolygonShape def,
                                                                 int nVert,
                                                                 float offsetParam)

polygonsFromRegion

public static harmonic.meshGeom.geom.PolygonGeom[] polygonsFromRegion(harmonic.meshGeom.geom.RegionGeom geom)

regionFromPolygons

public static harmonic.meshGeom.geom.RegionGeom regionFromPolygons(harmonic.meshGeom.geom.PolygonGeom[] polygons)

findNearestPolygonVertex

public static int findNearestPolygonVertex(harmonic.viewer3D.PaintStruct p,
                                           harmonic.meshGeom.math.PickInfo pi,
                                           int x,
                                           int y,
                                           harmonic.viewer3D.Viewport view,
                                           harmonic.meshGeom.math.TMat ucsMat)
This keep comming up. Find closest point picked on polygon. Function will get all it needs except the painter.


pointOnPlane

public static void pointOnPlane(harmonic.meshGeom.math.Pnt3f ret,
                                int x,
                                int y,
                                harmonic.viewer3D.Viewport view,
                                harmonic.meshGeom.math.TMat ucsMat)
Returns the point in ucs coordinates intersected by the picking ray.

Parameters:
ret - Return point
x - Pixel x in viewport (to define picking ray)
y - Pixel y in viewport (to define picking ray)
view - Viewport to pick in
ucsMat - Matrix that defines picking plane (plane is the matricies xy plane)

pickPointOnLine

public static void pickPointOnLine(harmonic.meshGeom.math.Pnt3f ret,
                                   int x,
                                   int y,
                                   harmonic.viewer3D.Viewport view,
                                   harmonic.meshGeom.math.Pnt3f a,
                                   harmonic.meshGeom.math.Pnt3f b)
Returns the point in global coordinates where the picking ray is closest to the line

Parameters:
ret - Return point
x - Pixel x in viewport (to define picking ray)
y - Pixel y in viewport (to define picking ray)
view - Viewport to pick in
a - First point of line (in global coordinates)
b - Second point of line (in global coordinates)

extendPolygon

public static PolygonShape extendPolygon(PolygonShape _def,
                                         int side,
                                         harmonic.meshGeom.math.Pnt3f to,
                                         int cmode,
                                         boolean bAddLine)

intersectRayAndCurve

public static boolean intersectRayAndCurve(harmonic.meshGeom.math.Pnt3f rpoint,
                                           harmonic.meshGeom.math.Pnt3f raya,
                                           harmonic.meshGeom.math.Pnt3f rayb,
                                           PolygonShape curveDef)

intersectPolygons

public static int intersectPolygons(harmonic.meshGeom.math.Pnt3f[] rpoint,
                                    float[] rparamA,
                                    float[] rparamB,
                                    harmonic.meshGeom.geom.PolygonGeom curveA,
                                    harmonic.meshGeom.geom.PolygonGeom curveB)

intersectCurves

public static int intersectCurves(harmonic.meshGeom.math.Pnt3f[] rpoint,
                                  float[] rparamA,
                                  float[] rparamB,
                                  PolygonShape curveDefA,
                                  PolygonShape curveDefB,
                                  harmonic.mz.util.ObjectRelater relator)

intersectCurveAndPoint

public static void intersectCurveAndPoint(harmonic.meshGeom.math.Pnt3f rpoint,
                                          float[] rparam,
                                          PolygonShape curveDef,
                                          harmonic.meshGeom.math.Pnt3f pnt)

isSolid

public static boolean isSolid(harmonic.mz.data.DataNode def)