Isosurface
-
class
cee.ug.Isosurface() Specification of an isosurface (both parameters and attributes) in a
RemoteModel.Use this object to control the settings and attributes of an isosurface. The isosurface is defined by specifying the scalar to compute from (with
isoScalarResultId) and the value to compute the surface for (withisoValue). The result is a surface within the model containing all points where the scalar result has the given value.You can map any scalar result onto the isosurface with
mapScalarResultIdand also map a vector result withmapVectorResultId. The settings for the mapped results can be controlled with theScalarSettingsandVectorSettingsobjects.To create an isosurface, use
RemoteModel.addIsosurface.Example: Show an isosurface
var modelDir = myModel.modelDirectory; // Add iso surface if we have a scalar result if (modelDir.scalarResultArray.length > 0) { var iso = myModel.addIsosurface(); iso.isoScalarResultId = modelDir.scalarResultArray[0].id; if (myModel.getScalarResultMinimumValue(iso.isoScalarResultId) != undefined) { iso.isoValue = (myModel.getScalarResultMinimumValue(iso.isoScalarResultId) + myModel.getScalarResultMaximumValue(iso.isoScalarResultId))/2; } else { iso.isoValue = 0.5; } if (modelDir.scalarResultArray.length > 1) { iso.mapScalarResultId = modelDir.scalarResultArray[1].id; } else { iso.mapScalarResultId = modelDir.scalarResultArray[0].id; } } // Set model to outline to show the cutting planes myModel.setDrawStyleAllParts(cee.ug.DrawStyle.OUTLINE);
This code sample produces the following image in the 3D Viewer:
Accessors
-
cee.ug.Isosurface.computeFromVisibleParts() - get computeFromVisibleParts(): boolean
If set to true, the isosurface will be computed from only the visible parts. Any part that is not visible will not contribute to the isosurface.
Returns: boolean
set computeFromVisibleParts(visiblePartsOnly: boolean): voidParameters
visiblePartsOnly: booleanReturns: void
-
cee.ug.Isosurface.highlight() - get highlight(): boolean
Whether the isosurface should be highlighted.
Returns: boolean
set highlight(highlight: boolean): voidParameters
highlight: booleanReturns: void
-
cee.ug.Isosurface.id() - get id(): number
The id of the isosurface. This is assigned by the system when you call
RemoteModel.addIsosurfaceand is used to identify the isosurface.Returns: number
-
cee.ug.Isosurface.isoScalarResultId() - get isoScalarResultId(): number
The scalar result to compute the isosurface from. This property is mandatory and must refer to one of the scalar results in
ModelDirectory.scalarResultArray.Returns: number
set isoScalarResultId(isoScalarResultId: number): voidParameters
isoScalarResultId: numberReturns: void
-
cee.ug.Isosurface.isoValue() - get isoValue(): number
The value to compute the isosurface from. The value of the scalar result with id
isoScalarResultIdwill be equal to this value at all points on the isosurface.Returns: number
set isoValue(isoValue: number): voidParameters
isoValue: numberReturns: void
-
cee.ug.Isosurface.isPrecomputed() - get isPrecomputed(): boolean
Is true if the isosurface is precomputed and cannot be changed
Returns: boolean
-
cee.ug.Isosurface.mapContourLinesResultId() - get mapContourLinesResultId(): number
The id of the contour lines result to show on the isosurface.
This id must refer to one of the scalar results in
ModelDirectory.scalarLinesResultArray.Set to -1 to show no contour lines on the isosurface.
Returns: number
set mapContourLinesResultId(mapContourLinesResultId: number): voidParameters
mapContourLinesResultId: numberReturns: void
-
cee.ug.Isosurface.mapScalarResultId() - get mapScalarResultId(): number
The id of the scalar result to show on the isosurface.
This id must refer to one of the scalar results in
ModelDirectory.scalarResultArray. You can change the settings for the scalar with theScalarSettingsobject.Set to -1 to show no scalars on the isosurface.
Returns: number
set mapScalarResultId(mapScalarResultId: number): voidParameters
mapScalarResultId: numberReturns: void
-
cee.ug.Isosurface.mapVectorResultId() - get mapVectorResultId(): number
The id of the vector result to show on the isosurface. One vector will be shown in each node of the surface.
This id must refer to one of the vector results in
ModelDirectory.vectorResultArray. The settings for the vector arrows can be changed with theVectorSettingsobject.Set to -1 to show no vectors on the isosurface.
Returns: number
set mapVectorResultId(mapVectorResultId: number): voidParameters
mapVectorResultId: numberReturns: void
-
cee.ug.Isosurface.opacity() - get opacity(): number
Opacity of the isosurface. 0.0 means fully transparent (invisible), 1.0 means fully opaque.
Returns: number
set opacity(opacity: number): voidParameters
opacity: numberReturns: void
-
cee.ug.Isosurface.surfaceColor() - get surfaceColor():
Color3LikeThe color of the isosurface if not showing a result (mapScalarResultId = -1)
Returns:
Color3Likeset surfaceColor(clr:Color3Like): voidParameters
clr:Color3LikeReturns: void
-
cee.ug.Isosurface.visible() - get visible(): boolean
Visibility of the isosurface. Use this to show or hide an isosurface in the 3D Viewer.
Returns: boolean
set visible(visible: boolean): voidParameters
visible: booleanReturns: void
Methods
-
cee.ug.Isosurface.getAsProperties() - getAsProperties():
IsosurfacePropertiesGets the settings for this isosurface as a Plain Old JavaScript Object (POJO).
Returns:
IsosurfaceProperties
-
cee.ug.Isosurface.setFromProperties() - setFromProperties(props: Partial): void
Applies the settings in the given properties object to this isosurface.
Parameters
props: PartialReturns: void