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