JavaView© v3.95.000

jvx.geom
Class PwBoundary

java.lang.Object
  extended byjv.object.PsObject
      extended byjvx.project.PjWorkshop
          extended byjvx.geom.PwBoundary
All Implemented Interfaces:
java.lang.Cloneable, PjWorkshopIf, PsUpdateIf, java.io.Serializable

public class PwBoundary
extends PjWorkshop

Utility program for handling boundary polygons of PgElementSet.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jv.object.PsObject
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
 
Constructor Summary
PwBoundary()
          Constructor.
 
Method Summary
 void close()
          Close workshop and remove itself as listener from various classes.
 void init()
          Initialize and reset project, stops the running animation if any.
 boolean isEnabledMakeConstraints()
          Check if boundary constraints will be generate when boundary is created.
static void makeBoundary(PgElementSet elementSet)
          Generate boundary polygons for a PgElementSet.
static void makeBoundaryConstraint(PgElementSet geom, int bndIndex, double lineTol, double planeTol)
          Make boundary constraints for an existing PgBndPolygon.
 void makeBoundaryConstraints()
          Make boundary constraints for existing PgBndPolygons.
 void ok()
          Accept the current state of the geometry and close the workshop.
 void reset()
          Reset this workshop to its initial state from which computations can start.
 void setEnabledMakeConstraints(boolean flag)
          Set flag which determines if boundary constraints will be generate when boundary is created.
 boolean update(java.lang.Object event)
          Updates the geometry if this workshop has changed, i.e. if the event is this or null.
 
Methods inherited from class jvx.project.PjWorkshop
cancel, getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, 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
 

Constructor Detail

PwBoundary

public PwBoundary()
Constructor.

Method Detail

init

public void init()
Description copied from class: PjWorkshop
Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.

Overrides:
init in class PjWorkshop

reset

public void reset()
Reset this workshop to its initial state from which computations can start.

Overrides:
reset in class PjWorkshop

close

public void close()
Close workshop and remove itself as listener from various classes. The workshop will no longer be functional after this call.

Overrides:
close in class PjWorkshop

ok

public void ok()
Accept the current state of the geometry and close the workshop.

Overrides:
ok in class PjWorkshop

update

public boolean update(java.lang.Object event)
Description copied from class: PjWorkshop
Updates the geometry if this workshop has changed, i.e. if the event is this or null. Also propagates update() to superclass with the original argument event.

Some subclasses may register themself as update listener of the geometry of this workshop. In order to prevent an update loop, this method savely uses isUpdateSender() when updating the geometry.

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.

makeBoundary

public static void makeBoundary(PgElementSet elementSet)
Generate boundary polygons for a PgElementSet. Boundary polygons will start and end preferentially at vertices with tag PsObject.IS_SELECTED. This method requires correct neighbourhood informations.


isEnabledMakeConstraints

public boolean isEnabledMakeConstraints()
Check if boundary constraints will be generate when boundary is created.

Returns:
true if making of boundary constraints is enabled.

setEnabledMakeConstraints

public void setEnabledMakeConstraints(boolean flag)
Set flag which determines if boundary constraints will be generate when boundary is created.

Parameters:
flag - true to enable making of boundary constraints.

makeBoundaryConstraints

public void makeBoundaryConstraints()
Make boundary constraints for existing PgBndPolygons. Polygons get constrained to a straight line, if they contain at least three vertices and all vertices lie upon this straight line. Polygons get constrained to a plane or a circle, if they contain at least four vertices and all vertices lie upon the plane or circle. This is a non-static call for PjWorkshop use.


makeBoundaryConstraint

public static void makeBoundaryConstraint(PgElementSet geom,
                                          int bndIndex,
                                          double lineTol,
                                          double planeTol)
Make boundary constraints for an existing PgBndPolygon. The polygon gets constrained to a straight line, if it contains at least three vertices and all vertices lie upon this straight line. The polygon gets constrained to a plane or a circle, if it contains at least four vertices and all vertices lie upon the plane or circle.


JavaView© v3.95.000

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