Documentation of 'jv.geom.PgBndPolygon' Java class
PgBndPolygon ("JavaView Reference Manual")
"JavaView? v5.03.003"
jv.geom

Class PgBndPolygon

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


    public class PgBndPolygon
    extends PgPolygon
    Boundary polygon of PgElementSets with reference to boundary vertices and elements. Polygon may have boundary constraints for variational problems.
    See Also:
    PgPointSet, Serialized Form
    Author:
    Konrad Polthier
    Version:
    22.04.17, 1.31 revised (kp) All helper methods documented.
    25.05.00, 1.30 revised (ur) Method getNumElements(): return value changed from m_elementInd.getSize() to getNumVertices()-1.
    03.09.98, 1.20 revised (kp) Non-conforming element set allowed, new instance variable m_neighbourLocInd added.
    02.09.98, 1.10 revised (kp) Vertices are no longer shared with element set.
    00.00.98, 1.00 created (kp)
    • Constructor Detail

      • PgBndPolygon

        public PgBndPolygon(int aVertexDim)
    • Method Detail

      • init

        public void init()
        Description copied from class: PgPolygon
        Initialize and reset instance variables after call to super.init().
        Overrides:
        init in class PgPolygon
      • 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.

        Link to associated element set is set to null.

        Specified by:
        clone in interface PgGeometryIf
        Overrides:
        clone in class PgPolygon
        See Also:
        copy(PsObject)
        Version:
        21.10.00, 1.20 revised (kp) Missing cloning of boundary constraints implements.
        21.10.00, 1.10 revised (kp) Bug removed: clear link of element set in clone rather than in source.
        05.07.00, 1.00 created (kp)
      • copy

        public void copy(PsObject object)
        Copies data from given boundary curve. Note: Reference to parent element set is not copied.

        The argument was changed from PgGeometry to PsObject since there were problems in J/Link which preferred to use PsObject#copy(PsObject) instead of PgGeometry#copy(PsObject).

        Overrides:
        copy in class PgPolygon
        See Also:
        PgPolygon.clone()
        Version:
        08.11.02, 1.10 revised (kp) Argument changed to PsObject from PgGeometry.
        02.09.99, 1.10 revised (kp) Vertices are no longer shared with element set and now really copied.
        31.08.99, 1.01 revised (kp) Super.copy() called at the end since references to old vertices used.
      • toString

        public java.lang.String toString()
        Create a multi-line string representation with detailed information about all instance variables.
        Specified by:
        toString in interface PgGeometryIf
        Overrides:
        toString in class PgPolygon
      • applyModelingMatrix

        public boolean applyModelingMatrix()
        Multiply the modeling matrix to all vertices and vectors. The modeling matrix of this geometry is set to the identity matrix.

        Here modeling matrix is applied to boundary constraints.

        Overrides:
        applyModelingMatrix in class PgPointSet
        Returns:
        true if operation was applied successfully.
        Since:
        JavaView 2.36
        Version:
        04.09.02, 1.00 created (kp)
      • getNumElements

        public int getNumElements()
        Get number of elements adjacent to the boundary.
        Version:
        27.04.02, 1.10 revised (kp) Bug with non-conforming meshes removed.
      • getVertexInd

        public PiVector getVertexInd()
      • setVertexInd

        public void setVertexInd(PiVector vertexInd)
      • getElementInd

        public PiVector getElementInd()
      • setElementInd

        public void setElementInd(PiVector elemInd)
      • getNeighbourLocInd

        public PiVector getNeighbourLocInd()
      • setNeighbourLocInd

        public void setNeighbourLocInd(PiVector neighInd)
      • getBndConstraint

        public PgBndConstraint getBndConstraint()
        Get constraints of this boundary polygon.
      • setBndConstraint

        public void setBndConstraint(PgBndConstraint bndConstraint)
        Assign constraints of this boundary polygon.
      • getGeometry

        public PgElementSet getGeometry()
        Get base geometry of this boundary polygon.
      • setGeometry

        public void setGeometry(PgElementSet geom)
        Assign base geometry of this boundary polygon.
      • getElementSet

        public PgElementSet getElementSet()
        Deprecated. since JavaView v3.98.003, use getGeometry() instead
        Get base geometry of this boundary polygon.
      • setElementSet

        public void setElementSet(PgElementSet geom)
        Deprecated. since JavaView v3.98.003, use setGeometry() instead
        Assign base geometry of this boundary polygon.
      • setMaxNumVertices

        public void setMaxNumVertices(int aNumVertices)
        Allocate given number of vertices, and allocate normals, colors etc. if they already exist. All vertex allocation is done in this method. Method should not be called directly unless a specific allocation is required. Usually, a user would specify the number of vertices via setNumVertices().
        Overrides:
        setMaxNumVertices in class PgPointSet
        Version:
        14.03.06, 3.00 revised (kp) Method made public to allow better control of allocations.
      • isConforming

        public boolean isConforming()
        Returns flag of boundary belongs to conforming element set.
        Returns:
        true if boundary belongs to conforming element set and boundary has been updated.
      • makeNonConforming

        public void makeNonConforming()
        Modify vertex indices of a boundary after elementSet has been made non-conforming.

        Method assumes that boundary has been setup for a conforming element set before, and, additionally, that the element set is already non-conforming. Number of boundary vertices is reduced by one.

        See Also:
        PnConjugate.makeConforming(jv.geom.PgElementSet), PnConjugate.makeNonConforming(jv.geom.PgElementSet)
        Author:
        Konrad Polthier
        Version:
        03.09.99, 1.00 revised (kp)
        03.09.99, 1.00 created (kp)
      • makeConforming

        public void makeConforming()
        Modify vertex indices of a boundary after elementSet has been made conforming again.

        Method assumes that boundary has been setup for a non-conforming element set before, and, additionally, that the element set is already conforming again. Number of boundary vertices is incremented by one.

        See Also:
        PnConjugate.makeConforming(jv.geom.PgElementSet), PnConjugate.makeNonConforming(jv.geom.PgElementSet)
        Author:
        Konrad Polthier
        Version:
        03.09.99, 1.00 revised (kp)
        03.09.99, 1.00 created (kp)
      • assignVertices

        public boolean assignVertices()
        Update the vertices of the polygon. It should be called when vertices of the elementSet have changed.

        Method assumes that boundary has been setup for an element set before.

        Returns:
        false if missing element set or void vertex index array, else true.
        Author:
        Konrad Polthier
        Version:
        12.02.00, 1.20 revised (kp) Additional check whether bnd refers to valid vertices.
        02.09.99, 1.10 revised (kp) Vertices are no longer shared with element set and now really copied.
        00.00.98, 1.00 created (kp)
      • makeElementInd

        public boolean makeElementInd()
        After the vertexInd have been assigned, this method fills the elementInd vector by asking the triangulation for edges. Additionally, the vertices are assigned.

        Method does not work for non-conforming element sets.

        The currently used algorithm performs a linear run over all elements to find the element index of the first edge. For all other boundary vertices, only their neighbourhood is checked. In case of non-manifold vertices, however, another linear run over all elements is performed.

        Returns:
        false if missing element set or edge not found, else true.
        Author:
        Konrad Polthier
        Version:
        13.07.07, 2.20 revised (ur) Bug removed.
        21.03.07, 2.10 revised (ah) Support for non-manifold surfaces.
        30.01.07, 2.00 revised (ah) Linearized.
        15.11.00, 1.20 revised (kp) Return false if edge not found.
        03.09.99, 1.10 revised (kp) m_neighbourLocInd incorporated.
        11.12.97, 1.00 created (kp)
      • bndsh

        public boolean bndsh(int n)
        Shifts vertices and neighbours from beginning of boundary polygon.
        Parameters:
        n - length of shift
        Returns:
        true on success
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bndinv

        public static boolean bndinv(int from,
                                     int to,
                                     int nedges,
                                     PgBndPolygon a,
                                     PgBndPolygon b)
        Copy part of bnd_curve in reverse order.
        Parameters:
        from - vertex position of beginning of source bnd_curve
        to - vertex position of end of destination bnd_curve
        nedges - number of edges to copy
        a - pointer on structure of source bnd_curve
        b - pointer on structure of destination bnd_curve
        Returns:
        true on success
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • invert

        public boolean invert()
        Invert bnd_curve to reverse order.
        Returns:
        true on success
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bndcp

        public static void bndcp(int from,
                                 int to,
                                 int nedges,
                                 PgBndPolygon a,
                                 PgBndPolygon b)
        Copy part of bnd_curve with number of edges = number of vertices-1.
        Parameters:
        from - vertex position of beginning of source bnd_curve
        to - vertex position of beginning of destination bnd_curve
        nedges - number of edges to copy
        a - pointer on structure of source bnd_curve
        b - pointer on structure of destination bnd_curve
        See Also:
        bndcpy(int, int, int, PgBndPolygon, PgBndPolygon)
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bndcpy

        public static void bndcpy(int from,
                                  int to,
                                  int nedges,
                                  PgBndPolygon a,
                                  PgBndPolygon b)
        Copy part of bnd_curve with number of edges = number of vertices.
        Parameters:
        from - vertex position of beginning of source bnd_curve
        to - vertex position of beginning of destination bnd_curve
        nedges - number of edges to copy
        a - pointer on structure of source bnd_curve
        b - pointer on structure of destination bnd_curve
        See Also:
        bndcp(int, int, int, PgBndPolygon, PgBndPolygon)
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bndcmp

        public int bndcmp(PgBndPolygon b,
                          double maxDist)
        Compares two boundary polygons.
        Parameters:
        b - boundary polygon to compare to this
        maxDist - tolerance distance of related boundary vertices
        Returns:
        0: boundaries are not equal 1: bnds are equal, a.m_vertexInd.m_data[i] = b.m_vertexInd.m_data[i] -1: bnds inverse equal, a.m_vertexInd.m_data[i] = b.m_vertexInd.m_data[nop-1-i]
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bndtst

        public int bndtst(double maxDist)
        Tests if all boundary vertices lie in close distance to first vertex.
        Parameters:
        maxDist - tolerance distance to first boundary vertex
        Returns:
        0: some vertices are equal 1: all vertices are equal -1: all vertices are different, or error
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bnd_shrink

        public boolean bnd_shrink()
        Shrinks a boundary curve to a single point. Method assumes that all referenced vertices are geometricly equal and replaces all vertex references with a reference to the first vertex in the boundary curve. Remaining vertices are marked PsObject#IS_DELETED. Boundary curve itself is marked deleted too. The boundary edges are removed from adjacent elements respectively elements with three edges are removed.
        Returns:
        true on success
        Version:
        17.12.00, 1.15 revised (kp) Bug removed, restore neighbour after call setDimOfElement().
        04.08.00, 1.10 revised (kp) Bug removed if elements have more than three edges.
        15.07.92, 1.00 created (kp) in Grape
      • bnd_id

        public boolean bnd_id(PgBndPolygon b,
                              int orient)
        Identify two inner boundary polygons (this and the given boundary polygon) by creating neighbourhood adjacency between both triangle strips. This method is used to remove inner boundaries if both polygons have same combinatorics and vertices are within close distance.
        Parameters:
        b - Boundary polygon to compare to this
        orient - orientation marker: orient >=0 : bnd's are equal, orient < 0 : bnd's are inverse equal
        Returns:
        true on success
        Version:
        29.12.97, 1.00 created (kp)
      • bnd_dist

        public double bnd_dist(PgBndPolygon b)
        Compute distance of two boundary polygons, i.e. the maximal distance of two related boundary points. Method checks if two curves are differently oriented.
        Parameters:
        b - Boundary polygon to compare to this
        Returns:
        maximal distance of two related boundary vertices; 1000 if mismatch
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bnd_cmp_paste

        public int bnd_cmp_paste(PgBndPolygon b,
                                 double maxDist)
        Compare two boundary polygons, e.g. before pasting resp. merging both curve.
         Possible return values:
            0: boundaries cannot be pasted, e.g.  angle > MAX_PASTE_ANGLE (in degrees)
           11: beginning of a and b may be pasted
           12: beginning of a and end of b may be pasted
           21: end of a and beginning of b may be pasted
           22: end of a and b may be pasted
         
        Parameters:
        b - boundary polygon to compare to this
        maxDist - tolerance distance of related boundary vertices
        Returns:
        integer value identifies possible configurations of both polygons.
        See Also:
        bnd_paste(PgBndPolygon, int)
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bnd_paste

        public boolean bnd_paste(PgBndPolygon b,
                                 int type)
        Paste resp. merge given boundary polygon at the end of this boundary polygon.
        Parameters:
        b - boundary polygon to paste resp. merge to this
        type - relative orientation, see return values of bnd_cmp_paste(PgBndPolygon, double)
        Returns:
        0: paste didn't work, 1: paste succeeded.
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • bnd_cmp_logic

        public int bnd_cmp_logic(PgBndPolygon b,
                                 double maxDist)
        Compare number of vertices, vertex distances and angle condition of this and given boundary polygon.
         Possible return values:
            0:  boundaries are not equal
            1:  bnd's are equal with
                   m_vertexInd.m_data[0] = b.m_vertexInd.m_data[0]
           -1: bnd's are inverse equal with
                   m_vertexInd.m_data[0] = b.m_vertexInd.m_data[nop-1]
         
        Parameters:
        b - boundary polygon to compare with
        maxDist - tolerance distance of related boundary vertices
        Returns:
        0: bnds are not equal, 1/-1: bnds are equal with same or inverse orientation
        Version:
        15.07.92, 1.00 created (kp) in Grape
      • isShowingIndividualMaterial

        public boolean isShowingIndividualMaterial()
        Get flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.
        Returns:
        true if individual material of this boundary polygon is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • showIndividualMaterial

        public void showIndividualMaterial(boolean flag)
        Set flag if this boundary polygon uses its own material properties instead of inheriting material properties of the base geometry.
        Parameters:
        flag - true if individual material of this boundary polygon is used
        Since:
        JavaView 2.49.005
        Version:
        23.01.03, 1.00 created (kp)
      • merge

        public boolean merge(PgBndPolygon b)
        Merge boundary polygon with current object into 'this' and identify last vertex of 'this' with first vertex of argument curve.
        Parameters:
        b - PgBndPolygon to be merged into 'this'
        Returns:
        true if merge was successfull
        Author:
        Konrad Polthier
        Version:
        29.12.97, 1.00 revised (kp)
        29.12.97, 1.00 created (kp)
      • blend

        public boolean blend(double s,
                             PgGeometry ag,
                             double t,
                             PgGeometry bg)
        Blend between two polygon using this = s*a + t*b.
        Specified by:
        blend in interface PgGeometryIf
        Overrides:
        blend in class PgPolygon
        Parameters:
        s - weight of vertices of first boundary polygon
        ag - first boundary polygon used for blending
        t - weight of vertices of second boundary polygon
        bg - second boundary polygon used for blending
        Returns:
        true on success
        Author:
        Konrad Polthier
        Version:
        10.11.01, 2.00 revised (kp) Interpolation of material properties enabled.
        31.12.97, 1.00 created (kp)
      • constrain

        public boolean constrain()
        Project boundary vertices of element set onto curves determined by boundary constraints. Then update vertices of boundary polygon too.
        Version:
        31.12.97, 1.00 created (kp)
"JavaView? v5.03.003"

"

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

You see the box below because you did not login.