jvx.geom
Class PwBoundary
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.project.PjWorkshop
-
- jvx.geom.PwBoundary
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PjWorkshopIf
public class PwBoundary extends PjWorkshop
Utility program for handling boundary polygons of PgElementSet.- See Also:
- Serialized Form
- Author:
- Ulrich Reitebuch
- Version:
- 19.06.07, 2.00 revised (kp) Reorganization and improved API.
17.04.02, 1.10 revised (kp) Tolerance and constraints handling modified.
08.04.02, 1.00 created (ur)
-
-
Field Summary
-
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 PwBoundary()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close workshop and remove itself as listener from various classes.doublegetCornerAngle()Get maximal corner angle in [0,360] such that smaller vertex angles along the boundary are identified as sharp boundary vertices.doublegetLineTol()Get tolerance allowed for points to vary from a line.doublegetPlaneTol()Get tolerance allowed for points to vary from a plane.voidinit()Initialize and reset project, stops the running animation if any.booleanisEnabledMakeConstraints()Check if boundary constraints will be generate when boundary is created.voidmakeBoundary()Generate boundary polygons for a PgElementSet.static voidmakeBoundary(PgElementSet elemSet)Generate boundary polygons for a PgElementSet.static voidmakeBoundaryConstraint(PgElementSet elemSet, int bndIndex, double lineTol, double planeTol)Make boundary constraints for an existing PgBndPolygon.voidmakeBoundaryConstraints()Make boundary constraints for existing PgBndPolygons.voidok()Accept the current state of the geometry and close the workshop.voidremoveBoundary()Remove boundary from the registered geometry.voidreset()Reset this workshop to its initial state from which computations can start.voidsetCornerAngle(double angle)Set maximal corner angle in [0,360] such that smaller vertex angles along the boundary are identified as sharp boundary vertices.voidsetEnabledMakeConstraints(boolean flag)Set flag which determines if boundary constraints will be generate when boundary is created.voidsetGeometry(PgGeometry geom)Assign a geometry, on which the workshop operates.voidsetLineTol(double lineTol)Set tolerance allowed for points to vary from a line.voidsetPlaneTol(double planeTol)Set tolerance allowed for points to vary from a plane.booleanupdate(java.lang.Object event)Update workshop and geometry.-
Methods inherited from class jvx.project.PjWorkshop
cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, 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
-
-
-
-
Method Detail
-
init
public void init()
Description copied from class:PjWorkshopInitialize 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:
initin classPjWorkshop
-
reset
public void reset()
Reset this workshop to its initial state from which computations can start.- Overrides:
resetin classPjWorkshop
-
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:
closein classPjWorkshop
-
ok
public void ok()
Accept the current state of the geometry and close the workshop.- Overrides:
okin classPjWorkshop
-
update
public boolean update(java.lang.Object event)
Update workshop and geometry.- Specified by:
updatein interfacePsUpdateIf- Overrides:
updatein classPjWorkshop- 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)
-
setGeometry
public void setGeometry(PgGeometry geom)
Assign a geometry, on which the workshop operates.- Specified by:
setGeometryin interfacePjWorkshopIf- Overrides:
setGeometryin classPjWorkshop- Parameters:
geom- the workshop modifies this geometry.
-
removeBoundary
public void removeBoundary()
Remove boundary from the registered geometry.
-
makeBoundary
public void makeBoundary()
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. This is a non-static call for PjWorkshop use.
-
getCornerAngle
public double getCornerAngle()
Get maximal corner angle in [0,360] such that smaller vertex angles along the boundary are identified as sharp boundary vertices.
-
setCornerAngle
public void setCornerAngle(double angle)
Set maximal corner angle in [0,360] such that smaller vertex angles along the boundary are identified as sharp boundary vertices.
-
getLineTol
public double getLineTol()
Get tolerance allowed for points to vary from a line.
-
setLineTol
public void setLineTol(double lineTol)
Set tolerance allowed for points to vary from a line.
-
getPlaneTol
public double getPlaneTol()
Get tolerance allowed for points to vary from a plane.
-
setPlaneTol
public void setPlaneTol(double planeTol)
Set tolerance allowed for points to vary from a plane.
-
makeBoundary
public static void makeBoundary(PgElementSet elemSet)
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 information.- Author:
- Ulrich Reitebuch
- Version:
- 20.06.07, 1.30 revised (ur) Bug removed - polygonSet must know elementSet's vertex selections.
23.01.07, 1.20 revised (ah) Speed improvements.
08.04.02, 1.10 revised (ur) Method moved from PwCleanMesh to PwBoundary.
10.10.01, 1.00 created (ur)
-
isEnabledMakeConstraints
public boolean isEnabledMakeConstraints()
Check if boundary constraints will be generate when boundary is created.- Returns:
trueif 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-trueto 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 elemSet, 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.- Author:
- Ulrich Reitebuch, Konrad Polthier
- Version:
- 08.04.02, 1.60 revised (ur) Method moved from PwCleanMesh to PwBoundary.
12.03.02, 1.50 revised (kp) Implementation of boundary constraints continued.
12.02.02, 1.00 created (ur)
-
-
"