NX Open C++ Reference Guide
|
Represents the set of object preferences applicable to entire part. More...
Public Member Functions | |
NXOpen::Preferences::ViewVisualizationSpecialEffects::ColorRGB | ConvertColorNumberToRGBValue (int colorNumber) |
Converts color number to RGB constituents. | |
int | ConvertRGBValueToColorNumber (const NXOpen::Preferences::ViewVisualizationSpecialEffects::ColorRGB &fogColorRgbValue) |
Converts RGB color constituents to color number. | |
bool | FaceAnalysis () |
Returns the face analysis flag for Solid and Sheets Created in NX3.0.0. | |
int | GetColor (NXOpen::Preferences::PartObject::ObjectType type) |
Returns the current color value for specified type. | |
NXOpen::Preferences::PartObject::LineFontType | GetLineFont (NXOpen::Preferences::PartObject::ObjectType type) |
Returns the current line font for specified object type. | |
NXOpen::Preferences::PartObject::WidthType | GetWidth (NXOpen::Preferences::PartObject::ObjectType type) |
Returns the current width for specified object type. | |
bool | PartiallyShaded () |
Returns the partially shaded flag for Solid and Sheets Created in NX3.0.0. | |
void | SetColor (NXOpen::Preferences::PartObject::ObjectType type, int color) |
Sets the color. | |
void | SetFaceAnalysis (bool faceAnalysis) |
Sets the face analysis flag for Solid and Sheets Created in NX3.0.0. | |
void | SetLineFont (NXOpen::Preferences::PartObject::ObjectType type, NXOpen::Preferences::PartObject::LineFontType lineFont) |
Sets line font for specified object type Created in NX3.0.0. | |
void | SetPartiallyShaded (bool partiallyShaded) |
Sets the partially shaded flag for Solid and Sheets Created in NX3.0.0. | |
void | SetTranslucency (int translucency) |
Sets the translucency value Created in NX3.0.0. | |
void | SetWidth (NXOpen::Preferences::PartObject::ObjectType type, NXOpen::Preferences::PartObject::WidthType width) |
Sets width for specified object type Created in NX3.0.0. | |
tag_t | Tag () const |
Returns the tag of this object. | |
int | Translucency () |
Returns the translucency value Created in NX3.0.0. | |
Represents the set of object preferences applicable to entire part.
All the preferences available at UG GUI for object can be set by using this class except work layer. Work Layer should be set by using Layer::LayerManager class which holds a work layer property.
To obtain an instance of this class, refer to Preferences::PartPreferences
Created in NX3.0.0.
Describes all available Types for object selection.
ObjectTypeGeneral |
Default Type Value. |
ObjectTypeLine |
Line. |
ObjectTypeArc |
Arc. |
ObjectTypeConic | |
ObjectTypeSpline | |
ObjectTypeSolidbody |
Solid Body. |
ObjectTypeSheetbody |
Sheet Body. |
ObjectTypeDatum |
Datum. |
ObjectTypePoint | |
ObjectTypeCoordinateSystem |
Coordinate System. |
ObjectTypeAllButDefault |
All But Default. |
ObjectTypeDatumCsys |
Datum CSYS Feature. |
ObjectTypeTraceline | |
ObjectTypeInfiniteLine |
Infinite Line. |
Describes the available types for width.
NXOpen::Preferences::ViewVisualizationSpecialEffects::ColorRGB NXOpen::Preferences::PartObject::ConvertColorNumberToRGBValue | ( | int | colorNumber | ) |
Converts color number to RGB constituents.
The color number passed should be between 1 to 216
colorNumber | Color value |
int NXOpen::Preferences::PartObject::ConvertRGBValueToColorNumber | ( | const NXOpen::Preferences::ViewVisualizationSpecialEffects::ColorRGB & | fogColorRgbValue | ) |
Converts RGB color constituents to color number.
The Red, Green and Blue color constituents should be between 0 to 255.
fogColorRgbValue | fog color rgb value |
bool NXOpen::Preferences::PartObject::FaceAnalysis | ( | ) |
Returns the face analysis flag for Solid and Sheets
Created in NX3.0.0.
License requirements : None
int NXOpen::Preferences::PartObject::GetColor | ( | NXOpen::Preferences::PartObject::ObjectType | type | ) |
Returns the current color value for specified type.
The equivalent RGB values can be found by calling @link ConvertColorNumberToRGBValue ConvertColorNumberToRGBValue@endlink Red Component is ((((216 - color_number) % 36)/6)* 51) Green component is (((216 - color_number)/36) * 51) Blue is (((216 - color_number) % 6)* 51). So for example if returned color value is 47 then Red is ((((216 - 47) % 36)/6)* 51) = (((169 % 36)/6)* 51) = ((25/6)* 51) = 4*51 = 204 Green is (((216 - 47)/36) * 51) = ((169/36) * 51) = 4*51 = 204 Blue is (((216 - 47) % 6)* 51) = ((169 % 6)* 51) = 1*51 = 51 @return
Created in NX3.0.0.
License requirements : None
type | type |
NXOpen::Preferences::PartObject::LineFontType NXOpen::Preferences::PartObject::GetLineFont | ( | NXOpen::Preferences::PartObject::ObjectType | type | ) |
Returns the current line font for specified object type.
type | type |
NXOpen::Preferences::PartObject::WidthType NXOpen::Preferences::PartObject::GetWidth | ( | NXOpen::Preferences::PartObject::ObjectType | type | ) |
Returns the current width for specified object type.
type | type |
bool NXOpen::Preferences::PartObject::PartiallyShaded | ( | ) |
Returns the partially shaded flag for Solid and Sheets
Created in NX3.0.0.
License requirements : None
void NXOpen::Preferences::PartObject::SetColor | ( | NXOpen::Preferences::PartObject::ObjectType | type, |
int | color | ||
) |
Sets the color.
For Default color pass -2 as color value and for no change pass -1. For other color calculate the color in RGB format. If you pass R value of Red component G value of Green and B value of Blue the color will be: color = (((255-R)/51)*6 + ((255-G)/51)*36 + ((255-B)/51)*1) + 1 ; Where R G and B values are between 0 and 255 . So for Green (0,255,0)we will pass color = (((255-0)/51)*6 + ((255-255)/51)*36 + ((255-0)/51)*1) + 1 = 30+0+5+1 = 36 The equivalent color number value can be found by calling ConvertRGBValueToColorNumber
Created in NX3.0.0.
License requirements : None
type | type |
color | Specified Color |
void NXOpen::Preferences::PartObject::SetFaceAnalysis | ( | bool | faceAnalysis | ) |
Sets the face analysis flag for Solid and Sheets
Created in NX3.0.0.
License requirements : None
faceAnalysis | face analysis |
void NXOpen::Preferences::PartObject::SetLineFont | ( | NXOpen::Preferences::PartObject::ObjectType | type, |
NXOpen::Preferences::PartObject::LineFontType | lineFont | ||
) |
Sets line font for specified object type
Created in NX3.0.0.
License requirements : None
type | type |
lineFont | line font |
void NXOpen::Preferences::PartObject::SetPartiallyShaded | ( | bool | partiallyShaded | ) |
Sets the partially shaded flag for Solid and Sheets
Created in NX3.0.0.
License requirements : None
partiallyShaded | partially shaded |
void NXOpen::Preferences::PartObject::SetTranslucency | ( | int | translucency | ) |
Sets the translucency value
Created in NX3.0.0.
License requirements : None
translucency | translucency |
void NXOpen::Preferences::PartObject::SetWidth | ( | NXOpen::Preferences::PartObject::ObjectType | type, |
NXOpen::Preferences::PartObject::WidthType | width | ||
) |
Sets width for specified object type
Created in NX3.0.0.
License requirements : None
type | type |
width | width |
tag_t NXOpen::Preferences::PartObject::Tag | ( | ) | const |
Returns the tag of this object.
int NXOpen::Preferences::PartObject::Translucency | ( | ) |
Returns the translucency value
Created in NX3.0.0.
License requirements : None