Class PoMeshContouring

  • All Implemented Interfaces:
    SafeDisposable

    public class PoMeshContouring
    extends PoMesh2D
    Class to build contour lines on a 2D mesh. Builds contour lines on a 2D mesh. These contour lines are computed from a level values list and the nodes scalar values of the mesh. The level value list is defined by the PoMesh.setIsovaluesList() method or by the current PoIsovaluesList node during the traversal.

    All contour lines can have the same color (PoMesh.coloringType = COLOR_INHERITED) or can have a color depending on the values of the contouring lines (PoMesh.coloringType != COLOR_INHERITED).

    Contour lines are separated into 2 groups: major contour lines which can be annotated by their value, and minor contour lines which cannot be annotated. Major contour line are defined by the value of fields majorPeriod and firstMajor. They are annotated only if the field annotIsVisible is true. The way of putting annotations along contour lines is defined by the value of the fields annotPath, annotCrossStatus, annotGap and annotClippingPolygon.

    When the annotation are visible, the way of drawing the text of the level values depends on the current numeric display format and also on the current miscellaneous text attributes. If the method setFormat(format) is called, the current numerical display format is "format". Otherwise the current numerical display format is specified in the current inherited state (cf property node PoNumericDisplayFormat). If the method setMiscTextAttr(textAttr) is called, the current miscellaneous text attributes are defined by "textAttr". Otherwise the current miscellaneous text attributes are specified in the current inherited state (cf property node PoMiscTextAttr).

    Note: Contour line annotations are not displayed if the mesh is not defined in the XY plane. For example, if a 2D mesh is defined as follows: X coordinates are constant, Y coordinates vary, and Z coordinates vary, (and zValuesIndex set with a value different from -1), the contour lines will be not annotated. In order to annotate contour lines for a mesh not defined in the XY plane, define it in the XY plane and apply a rotation.

    File format/default:

    PoMeshContouring {

      valuesIndex -1
      coloringType COLOR_INHERITED
      zValuesIndex -1
      vecsIndex -1
      valuesIndexForCellFilter -1
      moduleDataMapping NULL
      majorPeriod 3
      firstMajor 1
      annotIsVisible false
      annotPath TANGENTIAL_PATH
      annotCrossStatus CROSS_CONTOUR
      annotIsBackground false
      annotIsContourClip false
      annotGap 1
      annotClippingPolygon 0 0
      annotFontSize 0
    }

    <!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="Heading1009">CATALOG PARTS</A></h4> <ul><b>PoMeshContouring</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=BASE_COLOR.</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><b>Separator</b> <tt>majorContourLineSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw major contour lines.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>majorContourLineApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of major contour lines.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>majorContourLine</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw major contour lines.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <b>Separator</b> <tt>minorContourLineSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw minor contour lines.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>minorContourLineApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of minor contour lines.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>minorContourLine</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw minor contour lines.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>annotBackgroundSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw background of annotations.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>annotBackgroundApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of background of annotations.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>annotBackground</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoFaceSet shape to draw background of annotations.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>annotBackgroundBorderSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw background border of annotations.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>annotBackgroundBorderApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of background border of annotations.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>annotBackgroundBorder</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a SoLineSet shape to draw background border of annotations.</i></ul></ul></ul></ul> <ul><ul><ul>}<br> <br> <b>Separator</b> <tt>annotTextSep</tt> {</ul></ul></ul> <ul><ul><ul><i>Contains properties and shapes to draw the text of annotations.</i></ul></ul></ul> <ul><ul><ul><ul><b>AppearanceKit</b> <tt>annotTexApp</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Specifies the appearance of the text of annotations. By default drawStyle.style=LINES. font.size and font.name are set when the kit is rebuilt.</i></ul></ul></ul></ul> <ul><ul><ul><ul><b>Group</b> <tt>annotText</tt></ul></ul></ul></ul> <ul><ul><ul><ul><i>Contains a list of SoAnnoText3 shapes to draw the text of annotations.</i></ul></ul></ul></ul> <ul><ul><ul>}</ul></ul></ul> <ul><ul>}</ul></ul> <ul>}</ul> <ul><ul><br> </ul></ul> </body> </html>

    • Field Detail

      • majorPeriod

        public final SoSFUShort majorPeriod
        Defines the major and the minor contour lines. majorPeriod is the period of major contour lines. Only major contour lines can be annotated. See also firstMajor. By default, majorPeriod = 3.
      • firstMajor

        public final SoSFUShort firstMajor
        Defines the first major contour lines. See also majorPeriod. By default, firstMajor = 1.
      • annotIsVisible

        public final SoSFBool annotIsVisible
        Contour lines annotations visibility. By default, annotIsVisible = false
      • annotPath

        public final SoSFEnum<PoMeshContouring.AnnotPaths> annotPath
        Annotations path.
        • TANGENTIAL_PATH, annotations are tangential to the contour lines.
        • HORIZONTAL_PATH, annotations are horizontal.
        • VERTICAL_PATH, annotations are vertical.

        By default, annotPath = TANGENTIAL_PATH.

      • annotCrossStatus

        public final SoSFEnum<PoMeshContouring.AnnotCrossStatusType> annotCrossStatus
        Controls the annotations and contour lines crossing.
        • CROSS_CONTOUR, annotations may cross contour lines.
        • CROSS_MINOR_CONTOUR, annotations may cross only minor contour lines (but not major contour lines).
        • DONT_CROSS_CONTOUR annotations do not cross any contour lines.

        By default, annotCrossStatus = CROSS_CONTOUR.

        Note that annotations may always cross the annotated contour line, however this field prevents annotations from crossing other contour lines.

      • annotIsBackground

        public final SoSFBool annotIsBackground
        Defines if the annotations are framed by a background. By default, annotIsBackground = false
      • annotIsContourClip

        public final SoSFBool annotIsContourClip
        Defines if the contour lines are clipped by the annotations. By default, annotIsContourClip = false
      • annotGap

        public final SoSFFloat annotGap
        Curvilinear distance between two annotations of a same contour line. It is a multiplicative factor of the domain size or of the clipping polygon size (if it is defined). The distance used is equal to annotGap * Ds, where Ds is the max of the width and the height of the domain or of the polygon. By default, annotGap = 1.
      • annotClippingPolygon

        public final SoMFVec2f annotClippingPolygon
        This is a polygon where no annotations are present outside it. If the point list is empty, the mesh limits will be used instead. By default, annotClippingPolygon = (0,0)
      • annotFontSize

        public final SoSFFloat annotFontSize
        Font size of annotations of contour lines. This value is a multiplicative factor of the domain size or of the clipping polygon size (if it is defined). The font size used is equal to annotFontSize * Ds, where Ds is the max of the width and the height of the domain or of the clipping polygon. If this value is <= 0, the annotations font size is fixed at 0.04. By default, annotFontSize = 0.
      • annotFontFactor

        public final SoSFFloat annotFontFactor
        Font size factor of annotations of contour lines. This field is only interpreted when an SoProjection node is applicable to contouring. By default, annotFontFactor = 1.
    • Constructor Detail

      • PoMeshContouring

        public PoMeshContouring()
        Constructor.