本文整理汇总了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;
}
示例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;
}
示例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;
}