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