#include <Bnd_Box.hxx>
#include <BRep_Tool.hxx>
+#include <BRep_Builder.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAlgo.hxx>
#include <BRepAlgoAPI_BooleanOperation.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
-#include <TopOpeBRepBuild_HBuilder.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
-//modified by NIZNHY-PKV Fri Mar 22 16:48:13 2002 f
-//#include <BRepAlgo_Cut.hxx>
-//#include <BRepAlgo_Fuse.hxx>
-//modified by NIZNHY-PKV Fri Mar 22 16:48:16 2002 t
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
extern Standard_Boolean BRepFeat_GettraceFEATRIB();
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::LFPerform()" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::LFPerform()" << std::endl;
#endif
if (mySbase.IsNull() || myPbase.IsNull() || mySkface.IsNull()
|| myGShape.IsNull() || myLFMap.IsEmpty()) {
#ifdef OCCT_DEBUG
- cout << "Topological reconstruction is impossible" << endl;
- if (trc) cout << " Fields not initialized" << endl;
+ std::cout << "Topological reconstruction is impossible" << std::endl;
+ if (trc) std::cout << " Fields not initialized" << std::endl;
#endif
myStatusError = BRepFeat_NotInitialized;
NotDone();
(!Collage)) {
theOpe = 2;
#ifdef OCCT_DEBUG
- cout << "Passage to topological operations" << endl;
+ std::cout << "Passage to topological operations" << std::endl;
#endif
}
}
else {
theOpe = 2;
#ifdef OCCT_DEBUG
- cout << "Passage to topologic operation" << endl;
+ std::cout << "Passage to topologic operation" << std::endl;
#endif
}
}
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::Modified" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::Modified" << std::endl;
#endif
if (myMap.IsBound(F)) {
static TopTools_ListOfShape list;
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::Generated" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::Generated" << std::endl;
#endif
if(S.ShapeType() != TopAbs_FACE) {
myGenerated.Clear();
}
}
-//=======================================================================
-//function : UpdateDescendants
-//purpose :
-//=======================================================================
- void BRepFeat_RibSlot::UpdateDescendants (const Handle(TopOpeBRepBuild_HBuilder)& B,
- const TopoDS_Shape& S,
- const Standard_Boolean SkipFace)
-{
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdm;
- TopTools_ListIteratorOfListOfShape it,it2;
- TopTools_MapIteratorOfMapOfShape itm;
- TopExp_Explorer exp;
-
- for (itdm.Initialize(myMap);itdm.More();itdm.Next()) {
- const TopoDS_Shape& orig = itdm.Key();
- if (SkipFace && orig.ShapeType() == TopAbs_FACE) {
- continue;
- }
- TopTools_MapOfShape newdsc;
- for (it.Initialize(itdm.Value());it.More();it.Next()) {
- const TopoDS_Shape& sh = it.Value();
- if(sh.ShapeType() != TopAbs_FACE) continue;
- const TopoDS_Face& fdsc = TopoDS::Face(it.Value());
- for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
- if (exp.Current().IsSame(fdsc)) { // preserved
- newdsc.Add(fdsc);
- break;
- }
- }
- if (!exp.More()) {
- if (B->IsSplit(fdsc, TopAbs_OUT)) {
- for (it2.Initialize(B->Splits(fdsc,TopAbs_OUT));
- it2.More();it2.Next()) {
- newdsc.Add(it2.Value());
- }
- }
- if (B->IsSplit(fdsc, TopAbs_IN)) {
- for (it2.Initialize(B->Splits(fdsc,TopAbs_IN));
- it2.More();it2.Next()) {
- newdsc.Add(it2.Value());
- }
- }
- if (B->IsSplit(fdsc, TopAbs_ON)) {
- for (it2.Initialize(B->Splits(fdsc,TopAbs_ON));
- it2.More();it2.Next()) {
- newdsc.Add(it2.Value());
- }
- }
- if (B->IsMerged(fdsc, TopAbs_OUT)) {
- for (it2.Initialize(B->Merged(fdsc,TopAbs_OUT));
- it2.More();it2.Next()) {
- newdsc.Add(it2.Value());
- }
- }
- if (B->IsMerged(fdsc, TopAbs_IN)) {
- for (it2.Initialize(B->Merged(fdsc,TopAbs_IN));
- it2.More();it2.Next()) {
- newdsc.Add(it2.Value());
- }
- }
- if (B->IsMerged(fdsc, TopAbs_ON)) {
- for (it2.Initialize(B->Merged(fdsc,TopAbs_ON));
- it2.More();it2.Next()) {
- newdsc.Add(it2.Value());
- }
- }
- }
- }
- myMap.ChangeFind(orig).Clear();
- for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
- // check the belonging to the shape...
- for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
- if (exp.Current().IsSame(itm.Key())) {
- myMap.ChangeFind(orig).Append(itm.Key());
- break;
- }
- }
- }
- }
-}
-
-
//=======================================================================
//function : FirstShape
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEATRIB();
- if (trc) cout << "BRepFeat_RibSlot::CheckPoint" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::CheckPoint" << std::endl;
#endif
// Vector product : normal to plane X direction Wire
// -> gives the material side
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEATRIB();
- if (trc) cout << "BRepFeat_RibSlot::Normal" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::Normal" << std::endl;
#endif
Standard_Real U, V;
gp_Pnt pt;
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::EdgeExtention" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::EdgeExtention" << std::endl;
#endif
Standard_Real f, l;
Handle(Geom_Curve) cu = BRep_Tool::Curve(e, f, l);
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEATRIB();
- if (trc) cout << "BRepFeat_RibSlot::ChoiceOfFaces" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::ChoiceOfFaces" << std::endl;
#endif
TopoDS_Face FFF;
if(!ASI.IsDone()) continue;
for(Standard_Integer jj = 1; jj<=Counter; jj++) {
if(ASI.NbPoints(jj) >= 1) {
- Standard_Real app = ASI.Point(jj,1).Parameter();//modified by NIZNHY-PKV Fri Mar 22 17:05:23 2002 pp
+ Standard_Real app = ASI.Point(jj,1).Parameter();
if(app >= 0 && app < Par) {
Par = app;
FFF = f;
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEATRIB();
- if (trc) cout << "BRepFeat_RibSlot::HeightMax" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::HeightMax" << std::endl;
#endif
Bnd_Box Box;
BRepBndLib::Add(theSbase,Box);
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::ExtremeFaces" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::ExtremeFaces" << std::endl;
#endif
Standard_Boolean Data = Standard_True;
FirstFace.Nullify();
// ---the wire includes only one edge
if(NumberOfEdges == 1) {
#ifdef OCCT_DEBUG
- if (trc) cout << " One Edge" << endl;
+ if (trc) std::cout << " One Edge" << std::endl;
#endif
exp.ReInit();
Standard_Real f, l;//, f1, l1, temp;
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
- const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:04 2002 fx instead f
+ const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_EDGE);
for(; ex5.More(); ex5.Next()) {
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
- const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:36 2002 fx instead of f
+ const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_VERTEX);
for(; ex5.More(); ex5.Next()) {
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
- const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:36 2002 fx instead of f
+ const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_EDGE);
for(; ex5.More(); ex5.Next()) {
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
- const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:36 2002 fx instead of f
+ const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_VERTEX);
for(; ex5.More(); ex5.Next()) {
//--- FirstFace or LastFace was not found
#ifdef OCCT_DEBUG
- if (trc) cout << " FirstFace or LastFace null" << endl;
+ if (trc) std::cout << " FirstFace or LastFace null" << std::endl;
#endif
LocOpe_CSIntersector ASI(mySbase);
TColGeom_SequenceOfCurve scur;
}
else {
#ifdef OCCT_DEBUG
- if (trc) cout << " Less than 2 intersection points" << endl;
+ if (trc) std::cout << " Less than 2 intersection points" << std::endl;
#endif
Data = Standard_False;
return Data;
if(FirstFace.IsNull() || LastFace.IsNull()) {
#ifdef OCCT_DEBUG
- if (trc) cout << " First or Last Faces still null" << endl;
+ if (trc) std::cout << " First or Last Faces still null" << std::endl;
#endif
Data = Standard_False;
}
else {
#ifdef OCCT_DEBUG
- if (trc) cout << " FirstFace and LastFace OK" << endl;
+ if (trc) std::cout << " FirstFace and LastFace OK" << std::endl;
#endif
Data = Standard_True;
}
// ---The wire consists of several edges
else {
#ifdef OCCT_DEBUG
- if (trc) cout << " Multiple Edges" << endl;
+ if (trc) std::cout << " Multiple Edges" << std::endl;
#endif
BRepTools_WireExplorer ex(myWire);
for(; ex.More(); ex.Next()) {
Handle(Geom_TrimmedCurve) curve;
curve = new Geom_TrimmedCurve(Cur, f, l, Standard_True);
#ifdef OCCT_DEBUG
- gp_Pnt P1 =
+ gp_Pnt P1 = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); (void)P1;
#endif
- BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True));
gp_Pnt P2 = BRep_Tool::Pnt(TopExp::LastVertex(E,Standard_True));
ex1.Init(mySbase, TopAbs_FACE);
TopoDS_Vertex theVertex;
TopoDS_Vertex OnVertex;
Standard_Real intpar;
for(; ex1.More(); ex1.Next()) {
- const TopoDS_Face& f = TopoDS::Face(ex1.Current());
+ const TopoDS_Face& aCurFace = TopoDS::Face(ex1.Current());
GeomAdaptor_Curve aGAC (curve);
- inter.Init (f, aGAC, BRep_Tool::Tolerance(f));
+ inter.Init (aCurFace, aGAC, BRep_Tool::Tolerance(aCurFace));
if(!inter.More()) continue;
for(; inter.More(); inter.Next()) {
gp_Pnt thePoint = inter.Pnt();
if(!FirstVertex.IsNull()) {
gp_Pnt point = BRep_Tool::Pnt(FirstVertex);
- if(point.Distance(thePoint) <= BRep_Tool::Tolerance(f)) {
+ if(point.Distance(thePoint) <= BRep_Tool::Tolerance(aCurFace)) {
continue;
}
}
intpar = IntPar(curve, thePoint);
theEdge = E;
- theFace = f;
+ theFace = aCurFace;
B.MakeVertex(theVertex, thePoint, Precision::Confusion());
if(!FirstOK) {
if(thePoint.Distance(P2) <= Precision::Confusion()) {
}
// ---Find thepoint on an edge or a vertex of face f
- PtOnEdgeVertex(RevolRib, f, thePoint, FirstVertex, LastVertex,
+ PtOnEdgeVertex(RevolRib, aCurFace, thePoint, FirstVertex, LastVertex,
PtOnEdge,OnEdge,PtOnVertex,OnVertex);
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
- TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:16:44 2002 fx/f
+ TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_EDGE);
for(; ex3.More(); ex3.Next()) {
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
- TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:13:08 2002 fx/f
+ TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_VERTEX);
for(; ex3.More(); ex3.Next()) {
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
- TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:12:06 2002 fx/f
+ TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_EDGE);
for(; ex3.More(); ex3.Next()) {
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
- TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:11:36 2002 fx/f
+ TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_VERTEX);
for(; ex3.More(); ex3.Next()) {
}
else {
#ifdef OCCT_DEBUG
- if (trc) cout << " First or Last not OK" << endl;
+ if (trc) std::cout << " First or Last not OK" << std::endl;
#endif
return Standard_False;
}
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEATRIB();
- if (trc) cout << "BRepFeat_RibSlot::PtOnEdgeVertex" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::PtOnEdgeVertex" << std::endl;
#endif
Standard_Boolean TestOK;
// PtOnEdge = Standard_False;
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::SlidingProfile" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::SlidingProfile" << std::endl;
#endif
Standard_Boolean ProfileOK = Standard_True;
// --case of sliding : construction of the wire of the profile
if(BndEdge1.IsNull() || BndEdge2.IsNull()) {
#ifdef OCCT_DEBUG
- if (trc) cout << " Null bounding edge" << endl;
+ if (trc) std::cout << " Null bounding edge" << std::endl;
#endif
ProfileOK = Standard_False;
return ProfileOK;
Standard_Real lpar = IntPar(FirstCurve, myLastPnt);
Handle(Geom_Curve) c;
if(fpar > lpar)
- c = Handle(Geom_Curve)::DownCast(FirstCurve->Reversed());
+ c = FirstCurve->Reversed();
else
c = FirstCurve;
if (!BRepAlgo::IsValid(fac)) {
#ifdef OCCT_DEBUG
- if (trc) cout << " Invalid Face" << endl;
+ if (trc) std::cout << " Invalid Face" << std::endl;
#endif
ProfileOK = Standard_False;
return ProfileOK;
gp_Pnt2d checkpnt2d(u, v);
if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) {
// If face is not the correct part of BndFace take the complementary
- //modified by NIZNHY-PKV Fri Mar 22 16:46:20 2002 f
- //BRepAlgo_Cut c(BndFace, fac);
BRepAlgoAPI_Cut c(BndFace, fac);
- //modified by NIZNHY-PKV Fri Mar 22 16:46:23 2002 t
TopExp_Explorer exp(c.Shape(), TopAbs_WIRE);
const TopoDS_Wire& w = TopoDS::Wire(exp.Current());
- BRepLib_MakeFace ffx(w);//modified by NIZNHY-PKV Fri Mar 22 17:10:43 2002 ffx/ff
+ BRepLib_MakeFace ffx(w);
Prof = TopoDS::Face(ffx.Shape());
}
else {
if (!BRepAlgo::IsValid(Prof)) {
#ifdef OCCT_DEBUG
- if (trc) cout << " Invalid Face Profile" << endl;
+ if (trc) std::cout << " Invalid Face Profile" << std::endl;
#endif
ProfileOK = Standard_False;
return ProfileOK;
{
#ifdef OCCT_DEBUG
Standard_Boolean trc = BRepFeat_GettraceFEAT();
- if (trc) cout << "BRepFeat_RibSlot::NoSlidingProfile" << endl;
+ if (trc) std::cout << "BRepFeat_RibSlot::NoSlidingProfile" << std::endl;
#endif
Standard_Boolean ProfileOK = Standard_True;
if(BndEdge1.IsNull() || BndEdge2.IsNull()) {
#ifdef OCCT_DEBUG
- if (trc) cout << " Null bounding edge" << endl;
+ if (trc) std::cout << " Null bounding edge" << std::endl;
#endif
ProfileOK = Standard_False;
return ProfileOK;
if (!BRepAlgo::IsValid(fac)) {
#ifdef OCCT_DEBUG
- if (trc) cout << " Invalid Face" << endl;
+ if (trc) std::cout << " Invalid Face" << std::endl;
#endif
ProfileOK = Standard_False;
return ProfileOK;
ElSLib::Parameters(myPln->Pln(), CheckPnt, u, v);
gp_Pnt2d checkpnt2d(u, v);
if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) {
- //modified by NIZNHY-PKV Fri Mar 22 16:47:06 2002 f
- //BRepAlgo_Cut c(BndFace, fac);
BRepAlgoAPI_Cut c(BndFace, fac);
- //modified by NIZNHY-PKV Fri Mar 22 16:47:09 2002 t
TopExp_Explorer exp(c.Shape(), TopAbs_WIRE);
- //modified by NIZNHY-PKV Fri Mar 22 16:47:23 2002 f
- //UpdateDescendants(c.Builder(), c.Shape(), Standard_False);
UpdateDescendants(c, c.Shape(), Standard_False);
- //modified by NIZNHY-PKV Fri Mar 22 16:47:28 2002 t
- const TopoDS_Wire& ww = TopoDS::Wire(exp.Current());//modified by NIZNHY-PKV Fri Mar 22 17:10:16 2002 ww/w
+ const TopoDS_Wire& ww = TopoDS::Wire(exp.Current());
BRepLib_MakeFace ff(ww);
Prof = TopoDS::Face(ff.Shape());
}
if (!BRepAlgo::IsValid(Prof)) {
#ifdef OCCT_DEBUG
- if (trc) cout << " Invalid Face Profile" << endl;
+ if (trc) std::cout << " Invalid Face Profile" << std::endl;
#endif
ProfileOK = Standard_False;
return ProfileOK;
return ProfileOK;
}
-//modified by NIZNHY-PKV Thu Mar 21 18:43:18 2002 f
//=======================================================================
//function : UpdateDescendants
//purpose :
}
}
}
-//modified by NIZNHY-PKV Thu Mar 21 18:43:36 2002 t