本文整理汇总了C++中TopoDS_Shape::Free方法的典型用法代码示例。如果您正苦于以下问题:C++ TopoDS_Shape::Free方法的具体用法?C++ TopoDS_Shape::Free怎么用?C++ TopoDS_Shape::Free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopoDS_Shape
的用法示例。
在下文中一共展示了TopoDS_Shape::Free方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateExtrusionOrRevolution
HeeksObj* CreateExtrusionOrRevolution(std::list<HeeksObj*> list, double height_or_angle, bool solid_if_possible, bool revolution_not_extrusion, double taper_angle_for_extrusion, bool add_new_objects)
{
std::list<TopoDS_Shape> faces_or_wires;
ConvertToFaceOrWire(list, faces_or_wires, (fabs(taper_angle_for_extrusion) <= 0.0000001) && solid_if_possible);
std::list<TopoDS_Shape> new_shapes;
gp_Trsf trsf = wxGetApp().GetDrawMatrix(false);
if(revolution_not_extrusion)
{
CreateRevolutions(faces_or_wires, new_shapes, gp_Ax1(gp_Pnt(0, 0, 0).Transformed(trsf), gp_Vec(1, 0, 0).Transformed(trsf)), height_or_angle);
}
else
{
CreateExtrusions(faces_or_wires, new_shapes, gp_Vec(0, 0, height_or_angle).Transformed(trsf), taper_angle_for_extrusion, solid_if_possible);
}
HeeksObj* new_object = 0;
if(new_shapes.size() > 0)
{
for(std::list<TopoDS_Shape>::iterator It = new_shapes.begin(); It != new_shapes.end(); It++){
TopoDS_Shape& shape = *It;
new_object = CShape::MakeObject(shape, revolution_not_extrusion ? _("Revolved Solid") : _("Extruded Solid"), SOLID_TYPE_UNKNOWN, wxGetApp().current_color, 1.0f);
if(add_new_objects)
wxGetApp().AddUndoably(new_object, NULL, NULL);
else
break;
}
}
for(std::list<TopoDS_Shape>::iterator It = faces_or_wires.begin(); It != faces_or_wires.end(); It++)
{
TopoDS_Shape shape = *It;
shape.Free();
}
return new_object;
}