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


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

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


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

示例1: SetCurve

bool ON_HatchLoop::SetCurve( const ON_Curve& curve)
{
  ON_Curve* pC = curve.DuplicateCurve();
  if( pC)
  {
    if( m_p2dCurve)
      delete m_p2dCurve;
    m_p2dCurve = pC;
  }
  return true;
}
开发者ID:cciechad,项目名称:brlcad,代码行数:11,代码来源:opennurbs_hatch.cpp

示例2: switch

ON_Surface::ISO
ON_SurfaceProxy::IsIsoparametric( // returns isoparametric status of 2d curve
    const ON_Curve& crv,
    const ON_Interval* subdomain
) const
{
    // this is a virtual overide of an ON_Surface::IsIsoparametric

    const ON_Curve* pC = &crv;
    ON_Curve* pTranC = NULL;
    if(m_bTransposed)
    {
        pTranC = crv.DuplicateCurve();
        pTranC->SwapCoordinates(0,1);
        pC = pTranC;
    }

    ON_Surface::ISO iso = m_surface->IsIsoparametric( *pC, subdomain);

    if (pTranC)
    {
        switch(iso)
        {
        case x_iso:
            iso = y_iso;
            break;
        case y_iso:
            iso = x_iso;
            break;
        case W_iso:
            iso = S_iso;
            break;
        case S_iso:
            iso = W_iso;
            break;
        case N_iso:
            iso = E_iso;
            break;
        case E_iso:
            iso = N_iso;
            break;
        default:
            // intentionally ignoring other ON_Surface::ISO enum values
            break;
        }
        delete pTranC;
    }

    return iso;
}
开发者ID:fanxiaochen,项目名称:OpenNurbsFit,代码行数:50,代码来源:opennurbs_surfaceproxy.cpp

示例3: SetCurve

bool ON_HatchLoop::SetCurve( const ON_Curve& curve)
{
  ON_Curve* pC = curve.DuplicateCurve();
  if( pC)
  {
    if(pC->Dimension() == 3 && !pC->ChangeDimension(2))
      return false;

    if( m_p2dCurve)
      delete m_p2dCurve;
    m_p2dCurve = pC;
  }
  return true;
}
开发者ID:ToMadoRe,项目名称:v4r,代码行数:14,代码来源:opennurbs_hatch.cpp

示例4: ON_BrepExtrude


//.........这里部分代码省略.........
        }
        int bottomvi1 = bottome.m_vi[1];
        if ( bottomvi1 < 0 || bottomvi1 >= vcount0 )
        {
          bOK = false;
          break;
        }
        if ( !topvimap[bottomvi0] )
        {
          const ON_BrepVertex& bottomv = brep.m_V[bottomvi0];
          ON_BrepVertex& topv = brep.NewVertex(bottomv.point+height,bottomv.m_tolerance);
          topvimap[bottomvi0] = topv.m_vertex_index;
        }
        if ( !topvimap[bottomvi1] )
        {
          const ON_BrepVertex& bottomv = brep.m_V[bottomvi1];
          ON_BrepVertex& topv = brep.NewVertex(bottomv.point+height,bottomv.m_tolerance);
          topvimap[bottomvi1] = topv.m_vertex_index;
        }
      }
    }
  }

  // build top edges
  int* topeimap = ws.GetIntMemory(ecount0);
  memset(topeimap,0,ecount0*sizeof(topeimap[0]));
  if ( bOK ) for ( ei = 0; ei < ecount0; ei++ )
  {
    if ( bCap || bSideEdge[ei] )
    {
      const ON_BrepEdge& bottome = brep.m_E[ei];
      ON_BrepVertex& topv0 = brep.m_V[topvimap[bottome.m_vi[0]]];
      ON_BrepVertex& topv1 = brep.m_V[topvimap[bottome.m_vi[1]]];
      ON_Curve* c3 = bottome.DuplicateCurve();
      if ( !c3 )
      {
        bOK = false;
        break;
      }
      c3->Transform(tr);
      int c3i = brep.AddEdgeCurve(c3);
      ON_BrepEdge& tope = brep.NewEdge(topv0,topv1,c3i,0,bottome.m_tolerance);
      topeimap[ei] = tope.m_edge_index;
    }
  }

  // build side edges
  int* sideveimap = ws.GetIntMemory(vcount0);
  memset(sideveimap,0,vcount0*sizeof(sideveimap[0]));
  if ( bOK ) for ( vi = 0; vi < vcount0; vi++ )
  {
    ON_BrepVertex& bottomv = brep.m_V[vi];
    for ( int vei = 0; vei < bottomv.m_ei.Count(); vei++ )
    {
      if ( bSideEdge[bottomv.m_ei[vei]] && topvimap[vi] )
      {
        ON_BrepVertex& topv = brep.m_V[topvimap[vi]];
        ON_Curve* c3 = path_curve.DuplicateCurve();
        if ( !c3 )
        {
          bOK = false;
        }
        else
        {
          ON_3dVector D = bottomv.point - PathStart;
          c3->Translate(D);
开发者ID:ToMadoRe,项目名称:v4r,代码行数:67,代码来源:opennurbs_brep_extrude.cpp


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