JavaView® v2.12

jvx.geom
Class PwModel

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jvx.geom.PwModel
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public class PwModel
extends PsObject

Utility programs for modeling of PgElementSet. Contains static functions to shrink, truncate or stellate an PgElementSet.

Version:
24.09.01, 1.70 revised (ur) Now all methods adjust all vector fields and element and vertex textures.
17.09.01, 1.60 revised (ep) Added vector field support.
06.06.01, 1.50 revised (ur) New Method dooSabin added.
05.03.01, 1.41 revised (ur) Adjust element back colors.
02.03.01, 1.40 revised (ur) Enabled truncating of not oriented PgElementSets.
14.12.00, 1.30 revised (ur) New Method punch added, tiny changes in method stellate.
14.11.00, 1.20 revised (ur) Adjust vertex textures and element textures.
10.11.00, 1.10 revised (ur) Bug in maintaining boundary polygons removed, adjusting of
vertex and element colors enabled.
19.10.99, 1.02 revised (ur) TruncateFill modified to adjust boundary polygons to the new
surface, truncate and shrink to set geom.m_bndList.length to zero.
06.10.99, 1.01 revised (ur) TruncateFill modified to add faces at vertices with only one touching face.
26.07.99, 1.00 created (ur)
Author:
Ulrich Reitebuch
See Also:
Serialized Form

Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS
 
Constructor Summary
PwModel(PgElementSet anElementSet)
          Constructor
 
Method Summary
static void dooSabin(PgElementSet geom)
          Cut all edges and vertices and fill the gaps with new elements.
static PsDialog getDialog(PgElementSet anElementSet)
          Open dialog window and create a new instance of PwModel.
static void punch(PgElementSet geom, double factor)
          Cut out a shrinked copy from every element; the remaining face gets divided into quadrilaterals, each containing one edge of the original element and of the cut-out shrinked copy.
 void setElementSet(PgElementSet anElementSet)
          Overwrite the backup elementSet, on which the modeling tools will work.
static void shrink(PgElementSet geom, double factor)
          Shrink every face of ElementSet by a constant factor; every face gets it's own edges and vertices, all neighbourhood information gets lost.
static void stellate(PgElementSet geom, double h)
          Replace every face by a pyramide dimension of Elements gets set to 3.
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 jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PwModel

public PwModel(PgElementSet anElementSet)
Constructor
Method Detail

getDialog

public static PsDialog getDialog(PgElementSet anElementSet)
Open dialog window and create a new instance of PwModel.

setElementSet

public void setElementSet(PgElementSet anElementSet)
Overwrite the backup elementSet, on which the modeling tools will work.

update

public boolean update(java.lang.Object event)
Update the class whenever a child has changed. Method is usually invoked from the children.
Overrides:
update in class PsObject
Following copied from class: jv.object.PsObject
See Also:
PsObject.setParent(PsUpdateIf), PsObject.getFather(), PsObject.addUpdateListener(PsUpdateIf)

shrink

public static void shrink(PgElementSet geom,
                          double factor)
Shrink every face of ElementSet by a constant factor; every face gets it's 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 pyramide dimension of Elements gets set to 3.
Parameters:
h - height of pyramide

truncate

public static void truncate(PgElementSet geom,
                            double factor,
                            boolean newFaces)
Truncate all vertices
Parameters:
t - blend factor for Vertices
newFaces - true = replace truncated vertices with new faces

punch

public static void punch(PgElementSet geom,
                         double factor)
Cut out a shrinked copy from every element; the remaining face gets divided into quadrilaterals, each containing one edge of the original element and of the cut-out shrinked copy.
Parameters:
p - shrinking factor for the cut-out element.

dooSabin

public static void dooSabin(PgElementSet geom)
Cut all edges and vertices and fill the gaps with new elements. Each edge gets replaced ba a quadrilateral, original elements get shrinked and new n-gonal faces are inserted at vertices with n original faces touching.

JavaView® v2.12

The software JavaView® is copyright protected. All Rights Reserved.