本文整理汇总了C++中ON_Brep::FlipLoop方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_Brep::FlipLoop方法的具体用法?C++ ON_Brep::FlipLoop怎么用?C++ ON_Brep::FlipLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_Brep
的用法示例。
在下文中一共展示了ON_Brep::FlipLoop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ON_BrepExtrudeHelper_MakeCap
static
bool ON_BrepExtrudeHelper_MakeCap(
ON_Brep& brep,
int bottom_loop_index,
const ON_3dVector path_vector,
const int* side_face_index
)
{
bool bCap = true;
// make cap
if ( !ON_BrepExtrudeHelper_CheckLoop( brep, bottom_loop_index ) )
return false;
brep.m_F.Reserve(brep.m_F.Count() + 1);
brep.m_L.Reserve(brep.m_L.Count() + 1);
const ON_BrepLoop& bottom_loop = brep.m_L[bottom_loop_index];
const ON_BrepFace& bottom_face = brep.m_F[bottom_loop.m_fi];
const ON_Surface* bottom_surface = bottom_face.SurfaceOf();
ON_Surface* top_surface = bottom_surface->Duplicate();
top_surface->Translate( path_vector );
int top_surface_index = brep.AddSurface( top_surface );
ON_BrepFace& top_face = brep.NewFace( top_surface_index );
bCap = ON_BrepExtrudeHelper_MakeTopLoop( brep, top_face, bottom_loop_index, path_vector, side_face_index );
if ( bCap )
{
ON_BrepLoop& top_loop = brep.m_L[brep.m_L.Count()-1];
if ( bottom_loop.m_type == ON_BrepLoop::inner )
{
// we capped an inner boundary
// top_loop.m_type = ON_BrepLoop::outer; // done in ON_BrepExtrudeHelper_MakeTopLoop
brep.FlipLoop(top_loop);
}
else if ( bottom_loop.m_type == ON_BrepLoop::outer )
{
// we capped an outer boundary
// top_loop.m_type = ON_BrepLoop::outer; // done in ON_BrepExtrudeHelper_MakeTopLoop
brep.FlipFace(top_face);
}
}
else
{
// delete partially made cap face
brep.DeleteFace( top_face, false );
delete brep.m_S[top_surface_index];
brep.m_S[top_surface_index] = 0;
}
return bCap;
}