zoukankan      html  css  js  c++  java
  • 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在一个模式下,所有可以选择的实体
    }

  • 相关阅读:
    统计创建对象个数
    动手动脑
    开学第一周心得
    放假第五周总结
    放假第四周总结
    第一周总结
    04-异常处理-动手动脑
    03-继承与多态-动手动脑
    02-类和对象-跟踪类对象创建个数
    02-类和对象-动手动脑
  • 原文地址:https://www.cnblogs.com/lizhengjin/p/4807172.html
Copyright © 2011-2022 走看看