- BB.MakeFace(F, RefPlane, Precision::Confusion());
- BRepAlgo_NormalProjection nproj(F);
- nproj.Add(inpWire);
- nproj.SetDefaultParams();
- nproj.Build();
- if(!nproj.IsDone())
- return;
-
- TopoDS_Shape projRes = nproj.Projection();
-
- // unite all vertexes/edges from projected result
- BOPAlgo_Builder anAlgo;
- TopExp_Explorer exp(projRes, TopAbs_EDGE);
- for (;exp.More(); exp.Next())
- {
- const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
- if (E.Orientation() != TopAbs_INTERNAL)
- anAlgo.AddArgument(E);
- }
- anAlgo.Perform();
- int stat = anAlgo.ErrorStatus();
- TopoDS_Shape projResConn = anAlgo.Shape();
-
- // make wire => vertexes and edges should be untouched after this operation!
- exp.Init(projResConn, TopAbs_EDGE);
- //TopTools_ListOfShape llE;
- //TopoDS_Wire RW;
- //BRepLib_MakeWire WM;
-
- //for (;exp.More();exp.Next())
- // llE.Append(exp.Current());
- //
- //WM.Add(llE);
- //outWire = WM.Wire();
-
- //outWire.Orientation(inpWire.Orientation()); //take from the original wire
-
- //history mode: edge to projected edges
- if (E2PE)
- {
- TopExp_Explorer ex(inpWire, TopAbs_EDGE);
- for (;ex.More();ex.Next())
- {
- const TopoDS_Edge& CE = TopoDS::Edge(ex.Current());
- TopTools_ListOfShape NEL;
- const TopTools_ListOfShape& LS = nproj.Generated(CE);
- TopTools_ListIteratorOfListOfShape it(LS);
- for (;it.More();it.Next())
- {
- const TopoDS_Shape& PCE = it.Value();
- TopTools_ListOfShape PLS = anAlgo.Modified(PCE);
- if (PLS.IsEmpty())
- PLS.Append(PCE);
- TopTools_ListIteratorOfListOfShape itp(PLS);
- for (;itp.More();itp.Next())
- NEL.Append(itp.Value());
- }
-
- E2PE->Bind(CE, NEL);
- }
- }
-}
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-bool HYDROData_DTM::Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF,
- TopTools_SequenceOfShape* Boundr, std::set<int> ind )
-{
- //ind : set of indices (starts with 0). index == number of boundary (inlet, outlet, etc..)
- //in compound cmp.
- //if Boundr is not null => this method will return sequence of boundary wires (inlet, outlet...)
-