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


C++ ON_Brep::Create方法代码示例

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


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

示例1: BrepForm

ON_Brep* ON_Surface::BrepForm( ON_Brep* brep ) const
{
  ON_Brep* pBrep = NULL;
  if ( brep )
    brep->Destroy();
  // 26 August 2008 Dale Lear - fixed bug
  //    When this function was called on an ON_SurfaceProxy
  //ON_Surface* pSurface = Duplicate();
  ON_Surface* pSurface = DuplicateSurface();
  if ( pSurface )
  {
    if ( brep )
      pBrep = brep;
    else
      pBrep = new ON_Brep();
    if ( !pBrep->Create(pSurface) )
    {
      if ( pSurface )
      {
        delete pSurface;
        pSurface = NULL;
      }
      if ( !brep )
        delete pBrep;
      pBrep = NULL;
    }
  }
  return pBrep;
}
开发者ID:Bastl34,项目名称:PCL,代码行数:29,代码来源:opennurbs_surface.cpp

示例2: RunCommand

CRhinoCommand::result CCommandTestHistoryExample::RunCommand( const CRhinoCommandContext& context )
{
  CRhinoCommand::result rc  = CRhinoCommand::failure; 

  CRhinoGetObject go;
  go.SetCommandPrompt(L"Pick two curves");
  go.SetGeometryFilter(CRhinoGetObject::curve_object);
  go.GetObjects(2,2);
  if( go.Result()== CRhinoGet::object && 
      go.ObjectCount()==2)
  {
    CRhinoObjRef CObj0 = go.Object(0);
    CRhinoObjRef CObj1 = go.Object(1);
    const ON_Curve* c0 = CObj0.Curve();
    const ON_Curve* c1 = CObj1.Curve();
    if( c0 && c1)
    {
      ON_Surface* pSrf = MakeBilinearSurface( *c0, *c1);
      ON_Brep brep;
      if(pSrf && brep.Create(pSrf))
      {
        CRhinoHistory history(*this);
        WriteHistory(history,  CObj0, CObj1);
        context.m_doc.AddBrepObject(brep,NULL,&history);
        rc  = CRhinoCommand::success; 
      }
    }

  }

  return rc;
}
开发者ID:buonmethuoc,项目名称:Rhino4Samples_CPP,代码行数:32,代码来源:cmdTestHistoryExample.cpp

示例3: ON_Brep_FromSurface

RH_C_FUNCTION ON_Brep* ON_Brep_FromSurface( const ON_Surface* pConstSurface )
{
  ON_Brep* rc = NULL;
  if( pConstSurface )
  {
    ON_Brep* pNewBrep = ON_Brep::New();
    if( pNewBrep )
    {
      ON_Surface* pNewSurface = pConstSurface->DuplicateSurface();
      if( pNewSurface )
      {
        if( pNewBrep->Create(pNewSurface) )
          rc = pNewBrep;

        if( NULL==rc )
          delete pNewSurface;
      }
      if( NULL==rc )
        delete pNewBrep;
    }
  }
  return rc;
}
开发者ID:HanselYan,项目名称:rhinocommon,代码行数:23,代码来源:on_brep.cpp


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