本文整理汇总了C++中ON_Brep::DeleteVertex方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_Brep::DeleteVertex方法的具体用法?C++ ON_Brep::DeleteVertex怎么用?C++ ON_Brep::DeleteVertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_Brep
的用法示例。
在下文中一共展示了ON_Brep::DeleteVertex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ON_BrepExtrude
//.........这里部分代码省略.........
bOK = false;
break;
}
int c2i = brep.AddTrimCurve(c2);
ON_BrepTrim* topt = 0;
if ( bottomt.m_ei >= 0 )
{
ON_BrepEdge& tope = brep.m_E[topeimap[bottomt.m_ei]];
topt = &brep.NewTrim(tope,bottomt.m_bRev3d,topl,c2i);
}
else
{
// singular trim
ON_BrepVertex& topv = brep.m_V[topvimap[bottomt.m_vi[0]]];
topt = &brep.NewSingularTrim(topv,topl,bottomt.m_iso,c2i);
}
topt->m_tolerance[0] = bottomt.m_tolerance[0];
topt->m_tolerance[1] = bottomt.m_tolerance[1];
topt->m_pbox = bottomt.m_pbox;
topt->m_type = bottomt.m_type;
topt->m_iso = bottomt.m_iso;
}
topl.m_pbox = bottoml.m_pbox;
}
}
}
// build sides
int bRev3d[4] = {0,0,1,1};
int vid[4], eid[4];
if( bOK ) for ( ei = 0; ei < ecount0; ei++ )
{
if ( bSideEdge[ei] && topeimap[ei] )
{
ON_BrepEdge& bottome = brep.m_E[ei];
ON_BrepEdge& tope = brep.m_E[topeimap[ei]];
vid[0] = bottome.m_vi[0];
vid[1] = bottome.m_vi[1];
vid[2] = topvimap[vid[1]];
vid[3] = topvimap[vid[0]];
if ( sideveimap[vid[0]] && sideveimap[vid[1]] )
{
ON_BrepEdge& leftedge = brep.m_E[sideveimap[vid[0]]];
ON_BrepEdge& rightedge = brep.m_E[sideveimap[vid[1]]];
ON_Curve* cx = bottome.DuplicateCurve();
if ( !cx )
{
bOK = false;
break;
}
ON_Curve* cy = leftedge.DuplicateCurve();
if ( !cy )
{
delete cx;
bOK = false;
break;
}
ON_SumSurface* srf = new ON_SumSurface();
srf->m_curve[0] = cx;
srf->m_curve[1] = cy;
srf->m_basepoint = srf->m_curve[1]->PointAtStart();
srf->m_basepoint.x = -srf->m_basepoint.x;
srf->m_basepoint.y = -srf->m_basepoint.y;
srf->m_basepoint.z = -srf->m_basepoint.z;
eid[0] = bottome.m_edge_index;
eid[1] = rightedge.m_edge_index;
eid[2] = tope.m_edge_index;
eid[3] = leftedge.m_edge_index;
ON_BrepFace* face = brep.NewFace(srf,vid,eid,bRev3d);
if ( !face )
{
bOK = false;
break;
}
else if ( bottome.m_ti.Count() == 2 )
{
const ON_BrepTrim& trim0 = brep.m_T[bottome.m_ti[0]];
const ON_BrepTrim& trim1 = brep.m_T[bottome.m_ti[1]];
const ON_BrepLoop& loop0 = brep.m_L[trim0.m_li];
const ON_BrepLoop& loop1 = brep.m_L[trim1.m_li];
bool bBottomFaceRev = brep.m_F[(loop0.m_fi != face->m_face_index) ? loop0.m_fi : loop1.m_fi].m_bRev;
bool bSideFaceRev = ( trim0.m_bRev3d != trim1.m_bRev3d )
? bBottomFaceRev
: !bBottomFaceRev;
face->m_bRev = bSideFaceRev;
}
}
}
}
if ( !bOK )
{
for ( vi = brep.m_V.Count(); vi >= vcount0; vi-- )
{
brep.DeleteVertex(brep.m_V[vi]);
}
}
return bOK;
}