本文整理汇总了C++中TopTools_ListOfShape::Last方法的典型用法代码示例。如果您正苦于以下问题:C++ TopTools_ListOfShape::Last方法的具体用法?C++ TopTools_ListOfShape::Last怎么用?C++ TopTools_ListOfShape::Last使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopTools_ListOfShape
的用法示例。
在下文中一共展示了TopTools_ListOfShape::Last方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindFacePairs
//=======================================================================
//function : IsInternalFace
//purpose :
//=======================================================================
Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
const TopTools_ListOfShape& theLF,
IntTools_Context& theContext)
{
Standard_Boolean bRet;
Standard_Boolean aNbF;
//
bRet=Standard_False;
//
aNbF=theLF.Extent();
if (aNbF==2) {
const TopoDS_Face& aF1=TopoDS::Face(theLF.First());
const TopoDS_Face& aF2=TopoDS::Face(theLF.Last());
bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext);
return bRet;
}
//
else {
NMTTools_ListOfCoupleOfShape aLCFF;
NMTTools_ListIteratorOfListOfCoupleOfShape aIt;
//
FindFacePairs(theEdge, theLF, aLCFF);
//
aIt.Initialize(aLCFF);
for (; aIt.More(); aIt.Next()) {
const NMTTools_CoupleOfShape& aCSFF=aIt.Value();
//
const TopoDS_Face& aF1=TopoDS::Face(aCSFF.Shape1());
const TopoDS_Face& aF2=TopoDS::Face(aCSFF.Shape2());
bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext);
if (bRet) {
return bRet;
}
}
}
return bRet;
}
示例2: DocumentObjectExecReturn
//.........这里部分代码省略.........
scalinglaw = s;
}*/
//build all shells
std::vector<TopoDS_Shape> shells;
std::vector<TopoDS_Wire> frontwires, backwires;
for(std::vector<TopoDS_Wire>& wires : wiresections) {
BRepOffsetAPI_MakePipeShell mkPS(TopoDS::Wire(path));
setupAlgorithm(mkPS, auxpath);
if(!scalinglaw) {
for(TopoDS_Wire& wire : wires) {
wire.Move(invObjLoc);
mkPS.Add(wire);
}
}
else {
for(TopoDS_Wire& wire : wires) {
wire.Move(invObjLoc);
mkPS.SetLaw(wire, scalinglaw);
}
}
if (!mkPS.IsReady())
return new App::DocumentObjectExecReturn("pipe could not be build");
//build the shell use simulate to get the top and bottom wires in an easy way
shells.push_back(mkPS.Shape());
TopTools_ListOfShape sim;
mkPS.Simulate(2, sim);
frontwires.push_back(TopoDS::Wire(sim.First()));
backwires.push_back(TopoDS::Wire(sim.Last()));
}
//build the top and bottom face, sew the shell and build the final solid
TopoDS_Shape front = makeFace(frontwires);
TopoDS_Shape back = makeFace(backwires);
BRepBuilderAPI_Sewing sewer;
sewer.SetTolerance(Precision::Confusion());
sewer.Add(front);
sewer.Add(back);
for(TopoDS_Shape& s : shells)
sewer.Add(s);
sewer.Perform();
//build the solid
BRepBuilderAPI_MakeSolid mkSolid;
mkSolid.Add(TopoDS::Shell(sewer.SewedShape()));
if(!mkSolid.IsDone())
return new App::DocumentObjectExecReturn("Result is not a solid");
TopoDS_Shape result = mkSolid.Shape();
BRepClass3d_SolidClassifier SC(result);
SC.PerformInfinitePoint(Precision::Confusion());
if ( SC.State() == TopAbs_IN) {
result.Reverse();
}
//result.Move(invObjLoc);
AddSubShape.setValue(result);
if(base.IsNull()) {