零件对象首选项
更多...
#include <Preferences_PartObject.hxx>
|
| enum | ColorSelection { ColorSelectionNoChange
, ColorSelectionDefaultColor
, ColorSelectionColor
} |
| enum | LineFontType {
LineFontTypePartDefault = 1
, LineFontTypeSolid
, LineFontTypeDashed
, LineFontTypePhantom
,
LineFontTypeCenterline
, LineFontTypeDotted
, LineFontTypeLongDashed
, LineFontTypeDottedDashed
,
LineFontTypeEight
, LineFontTypeNine
, LineFontTypeTen
, LineFontTypeEleven
} |
| enum | ObjectType {
ObjectTypeGeneral
, ObjectTypeLine
, ObjectTypeArc
, ObjectTypeConic
,
ObjectTypeSpline
, ObjectTypeSolidbody
, ObjectTypeSheetbody
, ObjectTypeDatum
,
ObjectTypePoint
, ObjectTypeCoordinateSystem
, ObjectTypeAllButDefault
, ObjectTypeDatumCsys
,
ObjectTypeTraceline
, ObjectTypeInfiniteLine
, ObjectTypePointCloud
} |
| enum | WidthType {
WidthTypePartDefault = 1
, WidthTypeThinWidth
, WidthTypeNormalWidth
, WidthTypeThickWidth
,
WidthTypeWidthOne
, WidthTypeWidthTwo
, WidthTypeWidthThree
, WidthTypeWidthFour
,
WidthTypeWidthFive
, WidthTypeWidthSix
, WidthTypeWidthSeven
, WidthTypeWidthEight
,
WidthTypeWidthNine
} |
零件对象首选项
表示适用于整个部件的对象首选项集合。除工作层外,UG界面中所有对象相关首选项均可通过此类设置。 工作层需通过 NXOpen::Layer::LayerManager 类设置,该类包含工作层属性。
要获取此类实例,请参考 NXOpen::Preferences::PartPreferences
在NX3.0.0版本创建。
◆ ColorSelection
描述对象颜色状态:不修改、使用默认颜色或使用用户定义颜色
| 枚举值 |
|---|
| ColorSelectionNoChange | 不修改
|
| ColorSelectionDefaultColor | 默认颜色
|
| ColorSelectionColor | 用户定义颜色
|
◆ LineFontType
表示可用的线型类型
| 枚举值 |
|---|
| LineFontTypePartDefault | 部件默认值
|
| LineFontTypeSolid | 实线
|
| LineFontTypeDashed | 虚线
|
| LineFontTypePhantom | 双点划线
|
| LineFontTypeCenterline | 中心线
|
| LineFontTypeDotted | 点线
|
| LineFontTypeLongDashed | 长虚线
|
| LineFontTypeDottedDashed | 点划线
|
| LineFontTypeEight | 长双点划线(默认字体)
|
| LineFontTypeNine | 长点划线(默认字体)/波浪线(造船字体)
|
| LineFontTypeTen | 长三点划线(默认字体)/锯齿线(造船字体)
|
| LineFontTypeEleven | 长短双划线(默认字体)/铁路线(造船字体)
|
◆ ObjectType
描述所有可用的对象选择类型
| 枚举值 |
|---|
| ObjectTypeGeneral | 默认类型值
|
| ObjectTypeLine | 直线
|
| ObjectTypeArc | 圆弧
|
| ObjectTypeConic | 圆锥曲线
|
| ObjectTypeSpline | 样条曲线
|
| ObjectTypeSolidbody | 实体
|
| ObjectTypeSheetbody | 片体
|
| ObjectTypeDatum | 基准
|
| ObjectTypePoint | 点
|
| ObjectTypeCoordinateSystem | 坐标系
|
| ObjectTypeAllButDefault | 除默认外全部
|
| ObjectTypeDatumCsys | 基准坐标系特征
|
| ObjectTypeTraceline | 轨迹线
|
| ObjectTypeInfiniteLine | 无限长直线
|
| ObjectTypePointCloud | 点云
|
◆ WidthType
表示可用的线宽类型
| 枚举值 |
|---|
| WidthTypePartDefault | 部件默认值
|
| WidthTypeThinWidth | 细线宽
|
| WidthTypeNormalWidth | 正常线宽
|
| WidthTypeThickWidth | 粗线宽
|
| WidthTypeWidthOne | 线宽1
|
| WidthTypeWidthTwo | 线宽2
|
| WidthTypeWidthThree | 线宽3
|
| WidthTypeWidthFour | 线宽4
|
| WidthTypeWidthFive | 线宽5
|
| WidthTypeWidthSix | 线宽6
|
| WidthTypeWidthSeven | 线宽7
|
| WidthTypeWidthEight | 线宽8
|
| WidthTypeWidthNine | 线宽9
|
◆ ConvertColorNumberToRGBValue()
将颜色编号转换为RGB分量。传入的颜色编号需在1到216之间
- 返回
- 对应的RGB分量
版本:NX3.0.0
许可要求:无
- 参数
-
◆ ConvertRGBValueToColorNumber()
将RGB颜色分量转换为颜色编号。红、绿、蓝分量需在0到255之间
- 返回
- 对应的颜色编号
版本:NX3.0.0
许可要求:无
- 参数
-
◆ FaceAnalysis()
| bool NXOpen::Preferences::PartObject::FaceAnalysis |
( |
| ) |
|
获取实体和曲面的面分析标志
版本:NX3.0.0
许可要求:无
◆ GetLegacyLineWidthMap()
◆ GetLineFont()
返回指定对象类型的当前线型
- 返回
创建于NX3.0.0。
许可要求:无
- 参数
-
◆ GetObjectColor()
返回指定类型的当前颜色值。 可调用ConvertColorNumberToRGBValue 获取对应的RGB值。 红色分量计算公式:((((216 - color_number) % 36)/6)* 51) 绿色分量计算公式:(((216 - color_number)/36) * 51) 蓝色分量计算公式:(((216 - color_number) % 6)* 51)。 例如,若返回的颜色值为47: 红色 = ((((216 - 47) % 36)/6)* 51) = (((169 % 36)/6)* 51) = ((25/6)* 51) = 4*51 = 204 绿色 = (((216 - 47)/36) * 51) = ((169/36) * 51) = 4*51 = 204 蓝色 = (((216 - 47) % 6)* 51) = ((169 % 6)* 51) = 1*51 = 51
- 返回
- 弃用
- 在NX2312.0.0中废弃。请使用NXOpen::Preferences::PartObject::GetObjectColor
创建于NX3.0.0。
许可要求:无
类型 设置颜色。传入-2表示默认颜色,传入-1表示不修改颜色。 其他颜色需按RGB格式计算。 若传入红色分量R、绿色分量G、蓝色分量B,颜色值计算公式为: color = (((255-R)/51)*6 + ((255-G)/51)*36 + ((255-B)/51)*1) + 1 ; 其中R、G、B取值范围为0到255。例如绿色(0,255,0)的计算: color = (((255-0)/51)*6 + ((255-255)/51)*36 + ((255-0)/51)*1) + 1 = 30+0+5+1 = 36 可调用ConvertRGBValueToColorNumber 获取对应的颜色编号。
- 弃用
- 在NX2312.0.0中废弃。请使用NXOpen::Preferences::PartObject::SetObjectColor
创建于NX3.0.0。
许可要求:无
类型 指定颜色 返回指定类型的当前颜色值。 可调用ConvertColorNumberToRGBValue 获取对应的RGB值。 红色分量计算公式:((((216 - color_number) % 36)/6)* 51) 绿色分量计算公式:(((216 - color_number)/36) * 51) 蓝色分量计算公式:(((216 - color_number) % 6)* 51)。 例如,若返回的颜色值为47: 红色 = ((((216 - 47) % 36)/6)* 51) = (((169 % 36)/6)* 51) = ((25/6)* 51) = 4*51 = 204 绿色 = (((216 - 47)/36) * 51) = ((169/36) * 51) = 4*51 = 204 蓝色 = (((216 - 47) % 6)* 51) = ((169 % 6)* 51) = 1*51 = 51
- 返回
创建于NX2312.0.0。
许可要求:无
- 参数
-
| type | 类型 |
| colorSelection | 颜色选择 |
◆ GetWidth()
返回指定对象类型的当前线宽
- 返回
创建于NX3.0.0。
许可要求:无
- 参数
-
◆ MigrateLegacyLineWidths()
| bool NXOpen::Preferences::PartObject::MigrateLegacyLineWidths |
( |
| ) |
|
◆ PartiallyShaded()
| bool NXOpen::Preferences::PartObject::PartiallyShaded |
( |
| ) |
|
获取实体和曲面的半着色标志
版本:NX3.0.0
许可要求:无
◆ PointSymbol()
| int NXOpen::Preferences::PartObject::PointSymbol |
( |
| ) |
|
获取点的点符号
创建于NX1872.0.0。
许可要求:无
◆ SetFaceAnalysis()
| void NXOpen::Preferences::PartObject::SetFaceAnalysis |
( |
bool | faceAnalysis | ) |
|
设置实体和曲面的面分析标志
版本:NX3.0.0
许可要求:无
- 参数
-
◆ SetLegacyLineWidthMap()
◆ SetLineFont()
设置指定对象类型的线型
创建于NX3.0.0。
许可要求:无
- 参数
-
◆ SetObjectColor()
◆ SetPartiallyShaded()
| void NXOpen::Preferences::PartObject::SetPartiallyShaded |
( |
bool | partiallyShaded | ) |
|
设置实体和曲面的半着色标志
版本:NX3.0.0
许可要求:无
- 参数
-
◆ SetPointSymbol()
| void NXOpen::Preferences::PartObject::SetPointSymbol |
( |
int | pointSymbol | ) |
|
设置点的点符号
创建于NX1872.0.0。
许可要求:无
- 参数
-
◆ SetTranslucency()
| void NXOpen::Preferences::PartObject::SetTranslucency |
( |
int | translucency | ) |
|
设置透明度值
版本:NX3.0.0
许可要求:无
- 参数
-
◆ SetWidth()
设置指定对象类型的线宽
版本:NX3.0.0
许可要求:无
- 参数
-
◆ Tag()
| tag_t NXOpen::Preferences::PartObject::Tag |
( |
| ) |
const |
◆ Translucency()
| int NXOpen::Preferences::PartObject::Translucency |
( |
| ) |
|