jv.geom

## Class PgBndConstraint

- java.lang.Object
- - jv.object.PsObject
  - - jv.geom.PgBndConstraint

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

      public class PgBndConstraint
      extends PsObject

  Descriptor for boundary constraints used in variational problems. The member variables have different meanings depending on the shape of the boundary curve. The following describes their meaning and shows how to generate a curve for given constraints.

              if (hasShape(FIX_STRAIGHT)) {
                 // m_start     = start point on line;
          // m_end       = end point on line;
          // m_dir       = unit length direction of line;
          // To compute the line:
          for (j=0; j<bndLen; j++) {
             v = (double)j / (double)(bndLen-1.);
             m_vertex[j].blend(1.-v, p, v, q);
          }
          // To constrain the line:
          for (j=0; j<bndLen; j++) {
             m_vertex[j].projectPointToLine(m_vertex[j], m_start, m_dir);
          }
              } else if (hasShape(FIX_PLANE)) {
          // m_start     = start point of planar curve;
          // m_end       = end point of planar curve;
          // m_dir       = unit length normal of plane;
          // m_startDir  = direction along m_start may vary;
          // m_endDir    = direction along m_end may vary;
          // m_startDir and m_endDir are addtn'l contraints depending on the adjacent boundaries
          // Each vector determines a line along which the corresponding start and end point
          // is allowed to vary. This is used if either of the two adjacent boundary curves
          // is of type FIX_PLANE too.
          // Both vectors might be null if boundary curve is closed.
          // To compute the plane:
          // To constrain the line:
          for (j=0; j<bndLen; j++) {
             m_vertex[j].projectPointToPlane(m_vertex[j], m_start, m_dir);
          }
              } else if (hasShape(FIX_CIRCLE)) {
          // m_start     = start point on circle;
          // m_end       = end point on circle;
          // m_vec1      = mid point of circle;
          // m_vec2      = orient, i.e. normal of circle;
          // To compute the circle:
          for (j=0; j<bndLen; j++) {
             v = (double)j / (double)(bndLen-1.);
             m_vertex[j].evalCircle(mid, orient, start, end, v);
          }
          // To constrain the circle:
          radius = m_vec1.dist(m_start);
          for (j=0; j<bndLen; j++) {
             m_vertex[j].projectPointToCircle(m_vertex[j], m_vec1, m_vec2, radius);
          }
              } else if (hasShape(FIX_HELIX)) {
          // m_start     = start point on helix;
          // m_end       = end point on helix;
          // m_vec1      = axis bottom of helix;
          // m_vec2      = axis direction of helix;
          // To compute the helix:
          for (j=0; j<bndLen; j++) {
             v = (double)j / (double)(bndLen-1.);
             m_vertex[j].evalHelix(bot, axisDir, start, end, v);
          }
              else if (m_bndShapeBits[anInd].get(PgBndConstraint.FIX_SPLINE)) {
          // m_start     = start point on spline;
          // m_end       = end point on spline;
          // m_vec1      = tangent of spline at start point;
          // m_vec2      = tangent of spline at end point;
          // To compute the spline:
          for (j=0; j<bndLen; j++) {
             v = (double)j / (double)(bndLen-1.);
             m_vertex[j].evalSpline(m_vec1, m_vec2, m_start, m_end, v);
          }
              }

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `EDGE_CIRCLE`
    `static int` | `EDGE_HELIX`
    `static int` | `EDGE_SPLINE`
    `static int` | `EDGE_STRAIGHT`
    `static int` | `FIX_CIRCLE` Vertices are constrained to lie on a circle.
    `static int` | `FIX_CURVE` Vertices are fixed, i.e.
    `static int` | `FIX_HELIX` Vertices are constrained to lie on a helix.
    `static int` | `FIX_PLANE` Vertices are constrained to a plane.
    `static int` | `FIX_POLYGON` Vertices are constrained to lie on a polygon.
    `static int` | `FIX_STRAIGHT` Vertices are constrained to a straight line.
    `static int` | `FIX_THREAD` Distance between vertices is fixed, i.e. the thread of constant length.
    `PdVector` | `m_dir` Unit direction of constraining line or unit normal of constraining plane.
    `PdVector` | `m_end` End point of boundary, last vertex.
    `PdVector` | `m_endDir` Special constraint for the last point of boundary, for example, two adjacent planar curves force the common vertex to lie on the straight line along which both plane intersect.
    `PdVector` | `m_start` Start point of boundary, first vertex.
    `PdVector` | `m_startDir` Special constraint for the first point of boundary, for example, two adjacent planar curves force the common vertex to lie on the straight line along which both plane intersect.
    `PdVector` | `m_vec1` Additional control vertex, meaning depends on current shape.
    `PdVector` | `m_vec2` Additional control vertex, meaning depends on current shape.

    - ### 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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgBndConstraint(int dim)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `applyModelingMatrix(PdMatrix modelMatrix)` Multiply the modeling matrix to all vertices and vectors.
    `void` | `clearShape(int aBit)` Remove shape constraint.
    `java.lang.Object` | `clone()` Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners.
    `void` | `copy(PsObject object)` Copy argument object into this object by recursively copying all instance variables.
    `int` | `getDim()` Get dim of vertex constraints.
    `boolean` | `hasShape(int aBit)` Check whether shape constraint is set.
    `void` | `init()` Initializes and resets instance.
    `void` | `setShape(java.util.BitSet shape)` Set shape constraint.
    `void` | `setShape(int aBit)` Set shape constraint.
    `java.lang.String` | `toString()` Create a multi-line string representation with detailed information about all instance variables.

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

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

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

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

- - ### Field Detail

    - #### FIX_CURVE

          public static final int FIX_CURVE

      Vertices are fixed, i.e. Dirichlet conditions.
      See Also:
        Constant Field Values

    - #### FIX_STRAIGHT

          public static final int FIX_STRAIGHT

      Vertices are constrained to a straight line.
      See Also:
        Constant Field Values

    - #### FIX_PLANE

          public static final int FIX_PLANE

      Vertices are constrained to a plane.
      See Also:
        Constant Field Values

    - #### FIX_THREAD

          public static final int FIX_THREAD

      Distance between vertices is fixed, i.e. the thread of constant length.
      See Also:
        Constant Field Values

    - #### EDGE_STRAIGHT

          public static final int EDGE_STRAIGHT

      See Also:
        Constant Field Values

    - #### EDGE_CIRCLE

          public static final int EDGE_CIRCLE

      See Also:
        Constant Field Values

    - #### EDGE_HELIX

          public static final int EDGE_HELIX

      See Also:
        Constant Field Values

    - #### EDGE_SPLINE

          public static final int EDGE_SPLINE

      See Also:
        Constant Field Values

    - #### FIX_CIRCLE

          public static final int FIX_CIRCLE

      Vertices are constrained to lie on a circle. Not yet supported by *bd files and JavaView.
      See Also:
        Constant Field Values

    - #### FIX_HELIX

          public static final int FIX_HELIX

      Vertices are constrained to lie on a helix. Not yet supported by *bd files and JavaView.
      See Also:
        Constant Field Values

    - #### FIX_POLYGON

          public static final int FIX_POLYGON

      Vertices are constrained to lie on a polygon. Not yet supported by *bd files and JavaView.
      See Also:
        Constant Field Values

    - #### m_start

          public PdVector m_start

      Start point of boundary, first vertex.

    - #### m_end

          public PdVector m_end

      End point of boundary, last vertex.

    - #### m_vec1

          public PdVector m_vec1

      Additional control vertex, meaning depends on current shape.

    - #### m_vec2

          public PdVector m_vec2

      Additional control vertex, meaning depends on current shape.

    - #### m_dir

          public PdVector m_dir

      Unit direction of constraining line or unit normal of constraining plane.

    - #### m_startDir

          public PdVector m_startDir

      Special constraint for the first point of boundary, for example, two adjacent planar curves force the common vertex to lie on the straight line along which both plane intersect. If this instance variable is null, then there is no constraint.

    - #### m_endDir

          public PdVector m_endDir

      Special constraint for the last point of boundary, for example, two adjacent planar curves force the common vertex to lie on the straight line along which both plane intersect. If this instance variable is null, then there is no constraint.

  - ### Constructor Detail

    - #### PgBndConstraint

          public PgBndConstraint(int dim)

  - ### Method Detail

    - #### init

          public void init()

      Initializes and resets instance.
      Overrides:
        `init` in class `PsObject`

    - #### clone

          public java.lang.Object clone()

      Duplicate geometry by recursively cloning all instance variables except inspector panels and lists of registered listeners. The parent relationship is maintained only within this class but not to external classes. In general, all links of the clone to external objects are set to `null`.

      Display list is not cloned but set to null. Method menu is cloned.

      Overrides:
        `clone` in class `PsObject`
      See Also:
        `copy(PsObject)`

    - #### copy

          public void copy(PsObject object)

      Copy argument object into this object by recursively copying all instance variables.
      Overrides:
        `copy` in class `PsObject`
      See Also:
        `PsObject.clone()`

    - #### applyModelingMatrix

          public boolean applyModelingMatrix(PdMatrix modelMatrix)

      Multiply the modeling matrix to all vertices and vectors. The modeling matrix of this geometry is set to the identity matrix.
      Returns:
        `true` if operation was applied successfully.
      Since:
        JavaView 2.36

    - #### clearShape

          public void clearShape(int aBit)

      Remove shape constraint. For possible shapes see `PgBndConstraint`.

    - #### hasShape

          public boolean hasShape(int aBit)

      Check whether shape constraint is set. For possible shapes see `PgBndConstraint`.

    - #### setShape

          public void setShape(int aBit)

      Set shape constraint. For possible shapes see `PgBndConstraint`.

    - #### setShape

          public void setShape(java.util.BitSet shape)

      Set shape constraint. If possible assign individual bits using setShape(int).
      See Also:
        `setShape(int)`

    - #### toString

          public java.lang.String toString()

      Create a multi-line string representation with detailed information about all instance variables.
      Overrides:
        `toString` in class `PsObject`

    - #### getDim

          public int getDim()

      Get dim of vertex constraints.

"

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