PartSettings
-
class
cee.ug.PartSettings() Specification of the visual appearance of a part in a RemoteModel
Use this object to control how the part will be rendered in the 3D viewer. You can set whether the part is
visible, thedrawStyle,color,opacity, and if the part should besmoothor flat shaded. You can also setshowFringesto specify if the part should show the current scalar result (if a scalar result is specified in theModelSpec) and setshowVectorsto specify if vector arrows should be drawn for the surface of this part (if a vector result is specified in theModelSpec).You can access PartSettings objects with
RemoteModel.getPartSettingsAt.Example: Show all parts as transparent
for (var i = 0; i < myModel.partCount; ++i) { var partSettings = myModel.getPartSettingsAt(i); partSettings.drawStyle = cee.ug.DrawStyle.SURFACE; partSettings.opacity = 0.5; }
or
for (var ps of myModel.getPartSettingsArray()) { ps.drawStyle = cee.ug.DrawStyle.SURFACE; ps.opacity = 0.5; }
Accessors
-
cee.ug.PartSettings.color() - get color():
Color3LikeThe color of the part.
Returns:
Color3Likeset color(clr:Color3Like): voidParameters
clr:Color3LikeReturns: void
-
cee.ug.PartSettings.disableElementSetFiltering() - get disableElementSetFiltering(): boolean
Disables element set filtering for this part. See
ModelSpec.visibleSetIdArrayReturns: boolean
set disableElementSetFiltering(disable: boolean): voidParameters
disable: booleanReturns: void
-
cee.ug.PartSettings.disableExpandElements() - get disableExpandElements(): boolean
Disables element expansion for this part. Beams will be shown as lines regardless of if they have cross section data defined or not.
Returns: boolean
set disableExpandElements(disable: boolean): voidParameters
disable: booleanReturns: void
-
cee.ug.PartSettings.disableFeatureExtraction() - get disableFeatureExtraction(): boolean
Disables feature extraction for this part. It will be excluded when computing e.g. isosurfaces.
Returns: boolean
set disableFeatureExtraction(disable: boolean): voidParameters
disable: booleanReturns: void
-
cee.ug.PartSettings.disableMirroring() - get disableMirroring(): boolean
Disable mirroring for this part.
If set to true, this part will not be included in the mirroring of the model.
Returns: boolean
set disableMirroring(disable: boolean): voidParameters
disable: booleanReturns: void
-
cee.ug.PartSettings.drawStyle() - get drawStyle():
DrawStyleThe specification of how to render the part (surface, lines, points, mesh, etc).
Returns:
DrawStyleset drawStyle(drawStyle:DrawStyle): voidParameters
drawStyle:DrawStyleReturns: void
-
cee.ug.PartSettings.eyeLift() - get eyeLift():
EyeLiftThe eye lift mode to use for this part.
Eye lift can be used when facing z fighting issues (triangles rendered in the same plane). By applying eye lift to one part, it will be moved slightly towards the eye, resolving the z fighting issues. The current version offers 3 eye lift factors to choose from.
Returns:
EyeLiftset eyeLift(mode:EyeLift): voidParameters
mode:EyeLiftReturns: void
-
cee.ug.PartSettings.geometryIndex() - get geometryIndex(): number
The zero-based geometryIndex of the part. A RemoteModel might have more than one geometry, but in most cases there is only one. The combination of geometryIndex and partId uniquely identifies the part.
Returns: number
-
cee.ug.PartSettings.highlight() - get highlight(): boolean
Whether the part should be highlighted.
Returns: boolean
set highlight(highlight: boolean): voidParameters
highlight: booleanReturns: void
-
cee.ug.PartSettings.opacity() - get opacity(): number
The opacity of the part. 1.0 is fully opaque, 0.0 if fully transparent (invisible).
Returns: number
set opacity(opacity: number): voidParameters
opacity: numberReturns: void
-
cee.ug.PartSettings.partId() - get partId(): number
The id of the part. The id is >=0 and unique within the part’s geometry. The combination of geometryIndex and partId uniquely identifies the part.
Returns: number
-
cee.ug.PartSettings.showFringes() - get showFringes(): boolean
Whether scalar fringes (filled contours) should be shown on this part. This flag only applies if the
ModelSpec.fringesResultIdis set to a valid scalar result id.Returns: boolean
set showFringes(show: boolean): voidParameters
show: booleanReturns: void
-
cee.ug.PartSettings.showVectors() - get showVectors(): boolean
Whether vector arrows should be rendered on the surface of this part. This flag only applies if the
ModelSpec.vectorResultIdArrayis set to valid vector result id(s).Returns: boolean
set showVectors(show: boolean): voidParameters
show: booleanReturns: void
-
cee.ug.PartSettings.smooth() - get smooth(): boolean
Flag controlling the shading model of the part.
If true, smooth shading will be used for the part, where it is rendered with a smoothed out surface with a per pixel lighting. If false, a flat shading rendering will be applied where the surface of an element is rendered with the same color.
Returns: boolean
set smooth(smooth: boolean): voidParameters
smooth: booleanReturns: void
-
cee.ug.PartSettings.visible() - get visible(): boolean
Visibility of the part. Use this to show or hide a part in the 3D Viewer.
Returns: boolean
set visible(visible: boolean): voidParameters
visible: booleanReturns: void
Methods
-
cee.ug.PartSettings.getAsProperties() - getAsProperties():
PartSettingsPropertiesGets the settings for this part as a Plain Old JavaScript Object (POJO).
Returns:
PartSettingsProperties
-
cee.ug.PartSettings.setFromProperties() - setFromProperties(props: Partial): void
Applies the settings in the given properties object to this part
Parameters
props: PartialReturns: void