当前位置: 首页>>代码示例>>C++>>正文


C++ ON_Curve::Reverse方法代码示例

本文整理汇总了C++中ON_Curve::Reverse方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_Curve::Reverse方法的具体用法?C++ ON_Curve::Reverse怎么用?C++ ON_Curve::Reverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ON_Curve的用法示例。


在下文中一共展示了ON_Curve::Reverse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ON_Brep_DuplicateEdgeCurves

RH_C_FUNCTION void ON_Brep_DuplicateEdgeCurves(const ON_Brep* pBrep, ON_SimpleArray<ON_Curve*>* pOutCurves, bool nakedOnly)
{
  if (pBrep && pOutCurves)
  {
    for(int i = 0; i < pBrep->m_E.Count(); i++)
    {
      const ON_BrepEdge& edge = pBrep->m_E[i];
      if( nakedOnly && edge.m_ti.Count()!=1 )
        continue;

      ON_Curve* curve = edge.DuplicateCurve();
      if(curve)
      {
        // From RhinoScript:
        // make the curve direction go in the natural boundary loop direction
        // so that the curve directions come out consistantly
        if( pBrep->m_T[edge.m_ti[0]].m_bRev3d )
          curve->Reverse();
        if( pBrep->m_T[edge.m_ti[0]].Face()->m_bRev )
          curve->Reverse();

        pOutCurves->Append(curve);
      }
    }
  }
}
开发者ID:HanselYan,项目名称:rhinocommon,代码行数:26,代码来源:on_brep.cpp

示例2: ON_Brep_DuplicateEdgeCurves

RH_C_FUNCTION void ON_Brep_DuplicateEdgeCurves(const ON_Brep* pConstBrep, ON_SimpleArray<ON_Curve*>* pOutCurves, bool nakedOnly, bool nakedOuter, bool nakedInner)
{
  if (pConstBrep && pOutCurves)
  {
    for(int i = 0; i < pConstBrep->m_E.Count(); i++)
    {
      const ON_BrepEdge& edge = pConstBrep->m_E[i];
      if( nakedOnly )
      {
        if( edge.m_ti.Count() != 1 )
          continue;

        const ON_BrepTrim& trim = pConstBrep->m_T[edge.m_ti[0]];
        const ON_BrepLoop& loop = pConstBrep->m_L[trim.m_li];

        bool acceptable = (nakedOuter && loop.m_type == ON_BrepLoop::outer) ||
                          (nakedInner && loop.m_type == ON_BrepLoop::inner);
        if( !acceptable )
          continue;
      }

      ON_Curve* curve = edge.DuplicateCurve();
      if(curve)
      {
        // From RhinoScript:
        // make the curve direction go in the natural boundary loop direction
        // so that the curve directions come out consistantly
        if( pConstBrep->m_T[edge.m_ti[0]].m_bRev3d )
          curve->Reverse();
        if( pConstBrep->m_T[edge.m_ti[0]].Face()->m_bRev )
          curve->Reverse();

        pOutCurves->Append(curve);
      }
    }
  }
}
开发者ID:Crashnorun,项目名称:rhinocommon,代码行数:37,代码来源:on_brep.cpp


注:本文中的ON_Curve::Reverse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。