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

  • 相关阅读:
    https://blog.csdn.net/nameofcsdn/article/details/53164652
    洛谷
    模板
    模板
    Gym 101911E "Painting the Fence"(线段树区间更新+双端队列)
    Gym 101911F “Tickets”
    图论:最小瓶颈生成树
    图论:次小生成树
    图论:费用流-SPFA+EK
    图论:Dinic算法
  • 原文地址:https://www.cnblogs.com/lizhengjin/p/4807172.html
Copyright © 2011-2022 走看看