jvx.geom

## Class PwModel

- java.lang.Object
- - jv.object.PsObject
  - - jvx.project.PjWorkshop
    - - jvx.geom.PwModel

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf

      public class PwModel
      extends PjWorkshop

  Utility programs for modeling operations on polyhedral surfaces. Contains static functions to, for example, shrink, truncate or stellate a polyhedral surface.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `EXTRUDE`
    `static int` | `EXTRUDE_SYMMETRIC`
    `static int` | `PUNCH`
    `static int` | `RHOMBIFICATE`
    `static int` | `SHRINK`
    `static int` | `STELLATE`
    `static int` | `TRUNCATE`
    `static int` | `TRUNCATEFILL`

    - ### Fields inherited from class jv.object.PsObject

      `HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS`

    - ### Fields inherited from interface jv.project.PjWorkshopIf

      `MODE_BUG, MODE_STANDARD, MODE_VALIDATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PwModel()` Constructor.
    `PwModel(PgElementSet geom)` Deprecated. use constructor prj=new PwModel();prj.setGeometry(geom);prj.reset();

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `compute()` Update the registered geometry based on the currently selected solid type.
    `static void` | `dual(PgElementSet geom)` Get the dual PgElementSet: Each vertex will be replaced by an element, having the center points of the adjacent elements as vertices; new boundary elements get two additional vertices at the boundary edge midpoints, if the vertex had only one adjacent element, the new element will contain also the old vertex.
    `static void` | `extrude(PgElementSet geom, double factor)` Reduplicate geometry with vertices at the tips of the vertex normals and fill the gaps at the boundaries with quadrilaterals.
    `static void` | `extrude(PgElementSet geom, double factor, boolean bExtrudeSymmetric)` Reduplicate geometry with vertices at the tips of the vertex normals and fill the gaps at the boundaries with quadrilaterals.
    `int` | `getModelingType()` Get the current modeling type.
    `void` | `init()` Initialisation.
    `boolean` | `isEnabledModeling()` Return flag whether to apply current modeling mode to the workshop's geometry.
    `static void` | `punch(PgElementSet geom, double factor)` Cut out a shrunken copy from every element; the remaining face gets divided into quadrilaterals, each containing one edge of the original element and of the cut-out shrunken copy.
    `void` | `reset()` Reset workshop and geometry to original state.
    `static void` | `rhombificate(PgElementSet geom, double par)` Cut all edges and vertices and fill the gaps with new elements.
    `static void` | `rhombiTruncate(PgElementSet geom, double faceFactor, double edgeFactor)` Rhombi-Truncate the surface.
    `void` | `setElementSet(PgElementSet geom)` Deprecated. use setGeometry(PgGeometry).
    `void` | `setEnabledModeling(boolean flag)` Define flag whether to apply current modeling mode to the workshop's geometry.
    `void` | `setGeometry(PgGeometry geom)` Overwrite the backup element set, on which the modeling tools will work.
    `void` | `setModelingType(int type)` Set the current modeling type.
    `static void` | `shrink(PgElementSet geom, double factor)` Shrink every face of ElementSet by a constant factor; every face gets its own edges and vertices, all neighbourhood information gets lost.
    `static void` | `snubTruncate(PgElementSet geom, double faceFactor, double edgeFactor)`
    `static void` | `stellate(PgElementSet geom, double h)` Replace every face by a pyramid.
    `static void` | `truncate(PgElementSet geom, double factor, boolean newFaces)` Truncate all vertices.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

    - ### Methods inherited from class jvx.project.PjWorkshop

      `cancel, close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, setDisplay, setDisplays, setModal, setMode, setStandalone, setViewer`

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jv.object.PsUpdateIf

      `getFather, getName, setParent`

- - ### Field Detail

    - #### SHRINK

          public static final int SHRINK

      See Also:
        Constant Field Values

    - #### TRUNCATE

          public static final int TRUNCATE

      See Also:
        Constant Field Values

    - #### STELLATE

          public static final int STELLATE

      See Also:
        Constant Field Values

    - #### TRUNCATEFILL

          public static final int TRUNCATEFILL

      See Also:
        Constant Field Values

    - #### PUNCH

          public static final int PUNCH

      See Also:
        Constant Field Values

    - #### EXTRUDE

          public static final int EXTRUDE

      See Also:
        Constant Field Values

    - #### EXTRUDE_SYMMETRIC

          public static final int EXTRUDE_SYMMETRIC

      See Also:
        Constant Field Values

    - #### RHOMBIFICATE

          public static final int RHOMBIFICATE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PwModel

          public PwModel(PgElementSet geom)

      Deprecated. use constructor prj=new PwModel();prj.setGeometry(geom);prj.reset();
      Constructor.

    - #### PwModel

          public PwModel()

      Constructor.

  - ### Method Detail

    - #### init

          public void init()

      Initialisation.
      Overrides:
        `init` in class `PjWorkshop`

    - #### reset

          public void reset()

      Reset workshop and geometry to original state.
      Overrides:
        `reset` in class `PjWorkshop`

    - #### update

          public boolean update(java.lang.Object event)

      Update the class whenever a child has changed. Method is usually invoked from the children.
      Specified by:
        `update` in interface `PsUpdateIf`
      Overrides:
        `update` in class `PjWorkshop`
      Parameters:
        `event` - sender of this update.
      Returns:
        true if update was correctly handled by superclass.
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### compute

          public boolean compute()

      Update the registered geometry based on the currently selected solid type.
      See Also:
        `setGeometry(PgGeometry)`, `setModelingType(int)`

    - #### setGeometry

          public void setGeometry(PgGeometry geom)

      Overwrite the backup element set, on which the modeling tools will work.
      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      Parameters:
        `geom` - the workshop modifies this geometry.

    - #### setElementSet

          public void setElementSet(PgElementSet geom)

      Deprecated. use setGeometry(PgGeometry).
      Overwrite the backup elementSet, on which the modeling tools will work.

    - #### getModelingType

          public int getModelingType()

      Get the current modeling type.

    - #### setModelingType

          public void setModelingType(int type)

      Set the current modeling type. At the same time the parameter bounds of the previous modeling type are saved to the max/min values.

    - #### setEnabledModeling

          public void setEnabledModeling(boolean flag)

      Define flag whether to apply current modeling mode to the workshop's geometry.

    - #### isEnabledModeling

          public boolean isEnabledModeling()

      Return flag whether to apply current modeling mode to the workshop's geometry.

    - #### shrink

          public static void shrink(PgElementSet geom,
                    double factor)

      Shrink every face of ElementSet by a constant factor; every face gets its own edges and vertices, all neighbourhood information gets lost.
      Parameters:
        `factor` - shrinking factor

    - #### stellate

          public static void stellate(PgElementSet geom,
                      double h)

      Replace every face by a pyramid. Dimension of Elements will be set to 3.
      Parameters:
        `h` - height of pyramid

    - #### truncate

          public static void truncate(PgElementSet geom,
                      double factor,
                      boolean newFaces)

      Truncate all vertices.
      Parameters:
        `geom` - Geometry to operate on.
        `factor` - blend factor for Vertices
        `newFaces` - true = replace truncated vertices with new faces

    - #### rhombificate

          public static void rhombificate(PgElementSet geom,
                          double par)

      Cut all edges and vertices and fill the gaps with new elements. Each edge will be replaced by a quadrilateral, original elements are shrunken and new n-gonal faces are inserted at vertices with n original faces touching.

    - #### snubTruncate

          public static void snubTruncate(PgElementSet geom,
                          double faceFactor,
                          double edgeFactor)

    - #### rhombiTruncate

          public static void rhombiTruncate(PgElementSet geom,
                            double faceFactor,
                            double edgeFactor)

      Rhombi-Truncate the surface. Each n-face of the geometry will be replaced by a 2n-face, each valence n vertex by a 2n-face and each edge by a quadrilateral.
      Parameters:
        `geom` - Geometry to operate on.
        `faceFactor` - factor to move vertices to the face center
        `edgeFactor` - factor to move vertices to the edge center

    - #### punch

          public static void punch(PgElementSet geom,
                   double factor)

      Cut out a shrunken copy from every element; the remaining face gets divided into quadrilaterals, each containing one edge of the original element and of the cut-out shrunken copy.
      Parameters:
        `factor` - shrinking factor for the cut-out element.

    - #### dual

          public static void dual(PgElementSet geom)

      Get the dual PgElementSet: Each vertex will be replaced by an element, having the center points of the adjacent elements as vertices; new boundary elements get two additional vertices at the boundary edge midpoints, if the vertex had only one adjacent element, the new element will contain also the old vertex. Each element will be replaced by a vertex at its center.

      Create new boundary only when original geometry has boundary.

    - #### extrude

          public static void extrude(PgElementSet geom,
                     double factor)

      Reduplicate geometry with vertices at the tips of the vertex normals and fill the gaps at the boundaries with quadrilaterals.
      Parameters:
        `factor` - Factor to multiply vertex normals with.

    - #### extrude

          public static void extrude(PgElementSet geom,
                     double factor,
                     boolean bExtrudeSymmetric)

      Reduplicate geometry with vertices at the tips of the vertex normals and fill the gaps at the boundaries with quadrilaterals.
      Parameters:
        `factor` - Factor to multiply vertex normals with.
        `bExtrudeSymmetric` - Specify if the original vertices shall be moved in -normal direction.

"

The software JavaView? is copyright protected. All Rights Reserved.
"