Class PoMeshCrossSection

  • All Implemented Interfaces:
    SafeDisposable

    public class PoMeshCrossSection
    extends PoMesh3D
    Representation of cross section of a volume mesh. Class to build a filled representation of a cross-section in a volume mesh.

    If the field PoMesh.valuesIndex is not defined (or if coloringType = COLOR_INHERITED), the representation uses only one inherited color. If the field PoMesh.valuesIndex is defined (and if coloringType != COLOR_INHERITED), the representation is colored by using the current data mapping applied to each mesh node value. (see PoMesh for more explanations about the current data-mapping).

    The vector data of the mesh for this representation is unused.

    When using the ISOSURFACE mode, the cross section can be generated by using either a triangle strip set or an indexed face set depending on the preference variable SoPreference.OIV_3DDATA_USE_TRIANGLE_STRIP_SET

    File format/default:

    PoMeshCrossSection {

      plane Z=0 plane
      valuesIndex -1
      coloringType COLOR_INHERITED
      vecsIndex -1
      valuesIndexForCellFilter -1
      moduleDataMapping NULL
    }

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <link REL="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> <title></title> </head> <BODY> <h1></h1> <h4> <A NAME="Heading1046">CATALOG PARTS</A></h4> <ul><b>PoMeshCrossSection</b> {</ul> <ul><ul><b>Separator</b> <tt>alternateRep</tt> (from PoBase) {<br> </ul></ul> <ul><ul><ul><b>AppearanceKit</b> <tt>appearance</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Specifies the appearance of all the kit. By default lightModel.model=PHONG. material.diffuseColor is set when the kit is rebuilt, if the field coloringType is different from COLOR_INHERITED.</i></ul></ul></ul> <ul><ul><ul><b>MatrixTransform</b> <tt>domainTransform</tt> (from PoBase)</ul></ul></ul> <ul><ul><ul><i>Corresponds to the domain transformation.</i></ul></ul></ul> <ul><ul><ul><ul></ul></ul></ul></ul> <ul><ul><ul><b>Group</b> <tt>groupCrossSection</tt></ul></ul></ul> <ul><ul><ul><i>Contains a SoQuadMesh shape for ParalCartesianGrid3D and RegularCartesianGrid3D meshes and when the cross section is perpendicular to the X, Y or Z axis,&nbsp; an indexed &nbsp; shape otherwise, to draw the cross section of the mesh.</i></ul></ul></ul> <ul><ul>}</ul></ul> <ul>}</ul> <ul><ul><br> </ul></ul> </body> </html>

    • Field Detail

      • plane

        public final SoSFPlane plane
        Position of the cross section. Z=0 plane by default.
    • Constructor Detail

      • PoMeshCrossSection

        public PoMeshCrossSection()
        Constructor.
    • Method Detail

      • setCrossSectionMethod

        public void setCrossSectionMethod()
        Calls setCrossSectionMethod(PoMeshCrossSection.CrossSectionMethods.valueOf( PoMeshCrossSection.CrossSectionMethods.DEFAULT.getValue() )).
      • setCrossSectionMethod

        public void setCrossSectionMethod​(PoMeshCrossSection.CrossSectionMethods method)
        Specifies the method used to build this shape. By default PoMeshCrossSection builds a shape by computing an isosurface on a non regular mesh. The node's data are the distances to the plane. This method is safe but it uses a significant amount of memory for each instance of PoMeshCrossSection.

        Calling setCrossSectionMethod(INTERSECTION) forces the use of the classic method. The classic method computes the shapes by intersecting each cell with the plane. However it can be risky as it assumes that each mesh's cell is convex and therefore that the intersection of a plane and a cell's face can produce only one edge. Using the classic method with concave faces may produce unpredictable results or an infinite loop.

        The environment variable OIV_3DDATA_CROSS_SECTION_METHOD can also be set to specify the method used to build this shape. It can take the values INTERSECTION or ISOSURFACE. However, calling setCrossSectionMethod overrides this environment variable.

        Parameters:
        method - DEFAULT by default.