Class PoMeshContouring
- All Implemented Interfaces:
SafeDisposable
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:
| 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 |
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumControls the annotations of contour lines.static enumType of annotations path.Nested classes/interfaces inherited from class com.openinventor.meshviz.data.PoMesh
PoMesh.ColoringTypesNested classes/interfaces inherited from class com.openinventor.meshviz.graph.PoBase
PoBase.NodeWriteFormats, PoBase.TextTypes, PoBase.UpdateMethodTypesNested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoMFVec2fThis is a polygon where no annotations are present outside it.Controls the annotations and contour lines crossing.final SoSFFloatFont size factor of annotations of contour lines.final SoSFFloatFont size of annotations of contour lines.final SoSFFloatCurvilinear distance between two annotations of a same contour line.final SoSFBoolDefines if the annotations are framed by a background.final SoSFBoolDefines if the contour lines are clipped by the annotations.final SoSFBoolContour lines annotations visibility.Annotations path.final SoSFUShortDefines the first major contour lines.final SoSFUShortDefines the major and the minor contour lines.Fields inherited from class com.openinventor.meshviz.data.PoMesh2D
zValuesIndexFields inherited from class com.openinventor.meshviz.data.PoMesh
coloringType, creaseAngle, moduleDataMapping, smoothTextureContouring, valuesIndex, valuesIndexForCellFilter, vecsIndexFields inherited from class com.openinventor.inventor.nodekits.SoBaseKit
boundingBoxIgnoringFields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SoNodekitCatalogReturns theSoNodekitCatalogfor this class.Gets the reference to aPbNumericDisplayFormat.Gets a reference toPbMiscTextAttrobject.voidsetFormat(PbNumericDisplayFormat format) Sets a reference to aPbNumericDisplayFormatobject for the numerical display format for annotations of contour lines.voidsetMiscTextAttr(PbMiscTextAttr textAttr) Sets a reference toPbMiscTextAttrobject for miscellaneous text attributes of annotations of contour lines.Methods inherited from class com.openinventor.meshviz.data.PoMesh
getDataMapping, getIsovaluesList, getModuleDataMapping, setDataMapping, setIsovaluesList, setMesh, setModuleDataMappingMethods inherited from class com.openinventor.meshviz.graph.PoBase
addPostRebuildCallback, addPreRebuildCallback, getDomain, getNodeWriteFormat, getTextType, getUpdateMethod, isBuilt, isModified, isVRML2Mode, rebuild, setDomain, setNodeWriteFormat, setTextType, setUpdateMethod, setVRML2Mode, touchKitMethods inherited from class com.openinventor.inventor.nodekits.SoBaseKit
getNodekitCatalog, getPart, getPart, getPartString, getViewportIsEnabled, getViewportOrigin, getViewportSize, isSearchingChildren, set, set, setPart, setSearchingChildrenMethods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
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
Defines the first major contour lines. See also majorPeriod. By default, firstMajor = 1. -
annotIsVisible
Contour lines annotations visibility. By default, annotIsVisible = false -
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
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
Defines if the annotations are framed by a background. By default, annotIsBackground = false -
annotIsContourClip
Defines if the contour lines are clipped by the annotations. By default, annotIsContourClip = false -
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
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
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
Font size factor of annotations of contour lines. This field is only interpreted when anSoProjectionnode is applicable to contouring. By default, annotFontFactor = 1.
-
-
Constructor Details
-
PoMeshContouring
public PoMeshContouring()Constructor.
-
-
Method Details
-
setMiscTextAttr
Sets a reference toPbMiscTextAttrobject for miscellaneous text attributes of annotations of contour lines. If this method is not called the text attributes used are those of the default constructor ofPbMiscTextAttr. -
getMiscTextAttr
Gets a reference toPbMiscTextAttrobject. See setMiscTextAttr. -
getFormat
Gets the reference to aPbNumericDisplayFormat. See setFormat. -
getClassNodekitCatalog
Returns theSoNodekitCatalogfor this class. -
setFormat
Sets a reference to aPbNumericDisplayFormatobject for the numerical display format for annotations of contour lines. If this method is not called the format used is the one of the default constructor ofPbNumericDisplayFormat.
-