NX/UG二次开发—3D BOX选择—内部类构造

在做某些项目时,经常需要获取某一对象的周围的对象,比如获取距离一个实体最近的实体,如果简单数模,遍历当前视图的实体逐一测量,获取最小值即为所求。但对于复杂数模,比如汽车前舱数模,包含发动机,那么这种方法就不适合了,速度会很慢。

 在新版UG中(本文使用的是NX1872),提供了3DBOX选择工具,可以快速选择一个对象盒子内的所有对象,还可以根据类型设定范围,工具如下:

但录制操作的时候,发现并不能录制,翻阅NXopen和ufun文档并未发现有相关使用的类。但在libugui.dll导出函数中,发现有名字相近的类名,经过测试,完全可以实现这个功能,在Blcok UI中即使存在选择控件,依然可以使用。

类名如下:Class UGS::SEL::BoxSelectBuilder,有兴趣的可以试试。

类成员函数如下:

void UGS::SEL::BoxSelectBuilder::AskBoxLength(double * const)
void UGS::SEL::BoxSelectBuilder::AskCenterPosition(struct UGS::Math::Point3 *)
int UGS::SEL::BoxSelectBuilder::AskClientScope(void)
bool UGS::SEL::BoxSelectBuilder::AskHandlesPosition(struct UGS::Math::Point3 * const,struct UGS::Math::Vector3 * const)
int UGS::SEL::BoxSelectBuilderClassId
bool UGS::SEL::BoxSelectBuilder::CalculateBoxSize(void)
bool UGS::SEL::BoxSelectBuilder::CalculateBoxSizeByObject(unsigned int *,int)
void UGS::SEL::BoxSelectBuilder::CleanupPKBodies(void)
bool UGS::SEL::BoxSelectBuilder::CreateBox(void)
class UGS::OM::Object * UGS::SEL::BoxSelectBuilder::CreateBoxSelectBuilderCallback(void *,int,void *)
bool UGS::SEL::BoxSelectBuilder::DeleteBox(void)
double const * UGS::SEL::BoxSelectBuilder::GetBoxPosition(void)
double UGS::SEL::BoxSelectBuilder::GetBoxPositionElement(int)
struct UGUI_selection_s * UGS::SEL::BoxSelectBuilder::GetClientContext(void)
class UGS::SEL::BoxSelectBuilder * UGS::SEL::BoxSelectBuilder::GetInstance(void)
double UGS::SEL::BoxSelectBuilder::GetOffsetNegativeX(void)
double UGS::SEL::BoxSelectBuilder::GetOffsetNegativeY(void)
double UGS::SEL::BoxSelectBuilder::GetOffsetNegativeZ(void)
double UGS::SEL::BoxSelectBuilder::GetOffsetPositiveX(void)
double UGS::SEL::BoxSelectBuilder::GetOffsetPositiveY(void)
double UGS::SEL::BoxSelectBuilder::GetOffsetPositiveZ(void)
class UGS::map<unsigned int,int,struct std::less<unsigned int> > * UGS::SEL::BoxSelectBuilder::GetPKBodyMap(void)
int UGS::SEL::BoxSelectBuilder::GetPKTagOfFacetBody(unsigned int)
int UGS::SEL::BoxSelectBuilder::GetSelectionRule(void)
void UGS::SEL::BoxSelectBuilder::InitCreate(void)
bool UGS::SEL::BoxSelectBuilder::IsActive(void)
bool UGS::SEL::BoxSelectBuilder::IsBoxSelectCommitted(void)
bool UGS::SEL::BoxSelectBuilder::IsOwnedByBox(unsigned int)
void UGS::SEL::BoxSelectBuilder::ProcessBoxSelection(struct UGUI_selection_s *,bool)
void UGS::SEL::BoxSelectBuilder::ProcessFlipSelection(struct UGUI_selection_s *)
void UGS::SEL::BoxSelectBuilder::SetBoxLength(double,double,double)
void UGS::SEL::BoxSelectBuilder::SetBoxPositionElement(int,double)
void UGS::SEL::BoxSelectBuilder::SetClientContext(struct UGUI_selection_s *)
void UGS::SEL::BoxSelectBuilder::SetManipulatorToBoxDirectionAndPosition(struct UGS::Math::Matrix3 *,struct UGS::Math::Point3 *)
void UGS::SEL::BoxSelectBuilder::SetOffsetNegativeX(double)
void UGS::SEL::BoxSelectBuilder::SetOffsetNegativeY(double)
void UGS::SEL::BoxSelectBuilder::SetOffsetNegativeZ(double)
void UGS::SEL::BoxSelectBuilder::SetOffsetPositiveX(double)
void UGS::SEL::BoxSelectBuilder::SetOffsetPositiveY(double)
void UGS::SEL::BoxSelectBuilder::SetOffsetPositiveZ(double)
void UGS::SEL::BoxSelectBuilder::SetPKBodyMap(class UGS::map<unsigned int,int,struct std::less<unsigned int> > *)
void UGS::SEL::BoxSelectBuilder::SetSelectedObjects(struct UGUI_selection_s *)
void UGS::SEL::BoxSelectBuilder::SetSelectionRule(int)
void UGS::SEL::BoxSelectBuilder::ShowBoxCenterLines(bool)
int & UGS::SEL::BoxSelectBuilder::ThisClassId
void UGS::SEL::BoxSelectBuilder::cascade_destroy(void)
void UGS::SEL::BoxSelectBuilder::destroy(void)
void UGS::SEL::BoxSelectBuilder::implement_destroy(void)
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_boxPositionAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_clientContextAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_offsetNegativeXAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_offsetNegativeYAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_offsetNegativeZAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_offsetPositiveXAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_offsetPositiveYAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_offsetPositiveZAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_pkbodyMapAttId
class UGS::OM::AttributeId UGS::SEL::BoxSelectBuilder::m_selectionRuleAttId

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

恩·艾克斯·红

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值