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在一个模式下,所有可以选择的实体
}

上一篇:Python实现八大排序(基数排序、归并排序、堆排序、简单选择排序、直接插入排序、希尔排序、快速排序、冒泡排序)


下一篇:SpringSecurity数据库中存储用户、角色、资源