• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
lizhengjin
博客园    首页    新随笔    联系   管理    订阅  订阅
occ添加新的捕捉模式

Load (theSelection,
theShape,
theType,
theDeflection,
theDeviationAngle,
isAutoTriangulation,
thePriority,
theNbPOnEdge,
theMaxParam);

// loading of selectables...
for (theSelection->Init(); theSelection->More(); theSelection->Next())
{
Handle(SelectMgr_EntityOwner) anOwner
= Handle(SelectMgr_EntityOwner)::DownCast (theSelection->Sensitive()->OwnerId());
anOwner->Set (theSelectableObj);
}

 

每一种捕捉模式都对应一个the Selection->Next()

如果想加入垂足捕捉,切点捕捉,则重新加入一种模式就可以了

 

 myStdFilters[IMode] = new StdSelect_ShapeTypeFilter(aType);  

加入一种新的挑选模式

 

void SelectMgr_Selection
::Add (const Handle(SelectBasics_SensitiveEntity)& aprimitive)
{
// if input is null:
// in debug mode raise exception
Standard_NullObject_Raise_if
(aprimitive.IsNull(), "Null sensitive entity is added to the selection");
// in release mode do not add
if (!aprimitive.IsNull())
myentities.Append(aprimitive);  myEntities在一个模式下,所有可以选择的实体
}

posted on 2015-09-14 14:58  lizhengjin  阅读(560)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3