1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00

0026470: BRepFill_Evolved: exception and invalid result

Test-cases for issue 
This commit is contained in:
ifv 2015-10-20 12:18:26 +03:00 committed by bugmaster
parent 98a4340017
commit df573a26ed
6 changed files with 1291 additions and 1227 deletions

@ -97,6 +97,14 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML)
MP.SetPoint2d(3, PF2); MP.SetPoint2d(3, PF2);
MLS.SetValue (1, MP); MLS.SetValue (1, MP);
#ifdef DUMP_ML
i = 1;
cout << "--Point " << i << endl;
cout << "P3d: " << P3d.X() << " " << P3d.Y() << " " << P3d.Z() << endl;
cout << "P2d1;2: " << PF1.X() << " " << PF1.Y() << " ; " << PF2.X() << " " << PF2.Y() << endl;
#endif
Standard_Real DCorde = Length / ( NbPoints - 1); Standard_Real DCorde = Length / ( NbPoints - 1);
Standard_Real Corde = DCorde; Standard_Real Corde = DCorde;
Standard_Integer Index = 1; Standard_Integer Index = 1;
@ -107,6 +115,11 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML)
U = LP(Index-1).Y() + Alpha * ( LP(Index).Y() - LP(Index-1).Y()); U = LP(Index-1).Y() + Alpha * ( LP(Index).Y() - LP(Index-1).Y());
AppDef_MultiPointConstraint MPC( 1, 2); AppDef_MultiPointConstraint MPC( 1, 2);
ML.Value3dOnF1OnF2(U,P3d,PF1,PF2); ML.Value3dOnF1OnF2(U,P3d,PF1,PF2);
#ifdef DUMP_ML
cout << "--Point " << i << endl;
cout << "P3d: " << P3d.X() << " " << P3d.Y() << " " << P3d.Z() << endl;
cout << "P2d1;2: " << PF1.X() << " " << PF1.Y() << " ; " << PF2.X() << " " << PF2.Y() << endl;
#endif
MPC.SetPoint (1, P3d); MPC.SetPoint (1, P3d);
MPC.SetPoint2d(2, PF1); MPC.SetPoint2d(2, PF1);
MPC.SetPoint2d(3, PF2); MPC.SetPoint2d(3, PF2);
@ -115,6 +128,12 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML)
} }
AppDef_MultiPointConstraint MPE( 1, 2); AppDef_MultiPointConstraint MPE( 1, 2);
ML.Value3dOnF1OnF2(U2,P3d,PF1,PF2); ML.Value3dOnF1OnF2(U2,P3d,PF1,PF2);
#ifdef DUMP_ML
i = NbPoints;
cout << "--Point " << i << endl;
cout << "P3d: " << P3d.X() << " " << P3d.Y() << " " << P3d.Z() << endl;
cout << "P2d1;2: " << PF1.X() << " " << PF1.Y() << " ; " << PF2.X() << " " << PF2.Y() << endl;
#endif
MPE.SetPoint (1, P3d); MPE.SetPoint (1, P3d);
MPE.SetPoint2d(2, PF1); MPE.SetPoint2d(2, PF1);
MPE.SetPoint2d(3, PF2); MPE.SetPoint2d(3, PF2);

@ -113,6 +113,7 @@
#include <TopTools_ListIteratorOfListOfShape.hxx> #include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx> #include <TopTools_SequenceOfShape.hxx>
//#define DRAW
#ifdef DRAW #ifdef DRAW
#include <DBRep.hxx> #include <DBRep.hxx>
#include <DrawTrSurf.hxx> #include <DrawTrSurf.hxx>
@ -193,7 +194,7 @@ static void CutEdgeProf (const TopoDS_Edge& E,
TopTools_DataMapOfShapeShape& MapVerRefMoved); TopTools_DataMapOfShapeShape& MapVerRefMoved);
static Standard_Integer VertexFromNode static Standard_Integer VertexFromNode
(const Handle(MAT_Node)& aNode, (const Handle(MAT_Node)& aNode,
const TopoDS_Edge& E, const TopoDS_Edge& E,
const TopoDS_Vertex& VF, const TopoDS_Vertex& VF,
const TopoDS_Vertex& VL, const TopoDS_Vertex& VL,
@ -223,9 +224,9 @@ static void EdgeVertices (const TopoDS_Edge& E,
//======================================================================= //=======================================================================
BRepFill_Evolved::BRepFill_Evolved() BRepFill_Evolved::BRepFill_Evolved()
: :
myIsDone (Standard_False), myIsDone (Standard_False),
mySpineType(Standard_True) mySpineType(Standard_True)
{ {
} }
@ -241,7 +242,7 @@ BRepFill_Evolved::BRepFill_Evolved(const TopoDS_Wire& Spine,
const GeomAbs_JoinType Join, const GeomAbs_JoinType Join,
const Standard_Boolean Solid) const Standard_Boolean Solid)
: myIsDone(Standard_False) : myIsDone(Standard_False)
{ {
Perform( Spine, Profile, AxeProf, Join, Solid); Perform( Spine, Profile, AxeProf, Join, Solid);
} }
@ -257,7 +258,7 @@ BRepFill_Evolved::BRepFill_Evolved(const TopoDS_Face& Spine,
const gp_Ax3& AxeProf, const gp_Ax3& AxeProf,
const GeomAbs_JoinType Join, const GeomAbs_JoinType Join,
const Standard_Boolean Solid) const Standard_Boolean Solid)
: myIsDone(Standard_False) : myIsDone(Standard_False)
{ {
Perform( Spine, Profile, AxeProf, Join, Solid); Perform( Spine, Profile, AxeProf, Join, Solid);
} }
@ -387,10 +388,10 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine,
{ {
TopoDS_Shape aLocalShape = Spine.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShape = Spine.Oriented(TopAbs_FORWARD);
mySpine = TopoDS::Face(aLocalShape); mySpine = TopoDS::Face(aLocalShape);
// mySpine = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD)); // mySpine = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD));
aLocalShape = Profile.Oriented(TopAbs_FORWARD); aLocalShape = Profile.Oriented(TopAbs_FORWARD);
myProfile = TopoDS::Wire(aLocalShape); myProfile = TopoDS::Wire(aLocalShape);
// myProfile = TopoDS::Wire(Profile.Oriented(TopAbs_FORWARD)); // myProfile = TopoDS::Wire(Profile.Oriented(TopAbs_FORWARD));
myJoinType = Join; myJoinType = Join;
myMap.Clear(); myMap.Clear();
@ -504,7 +505,7 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine,
BRepLib_MakeFace B(gp_Pln(0.,0.,1.,0.)); BRepLib_MakeFace B(gp_Pln(0.,0.,1.,0.));
TopoDS_Shape aLocalShapeRev = SpineExp.Current().Reversed(); TopoDS_Shape aLocalShapeRev = SpineExp.Current().Reversed();
B.Add(TopoDS::Wire(aLocalShapeRev)); B.Add(TopoDS::Wire(aLocalShapeRev));
// B.Add(TopoDS::Wire(SpineExp.Current().Reversed())); // B.Add(TopoDS::Wire(SpineExp.Current().Reversed()));
Face = B.Face(); Face = B.Face();
BRepMAT2d_Explorer Exp(Face); BRepMAT2d_Explorer Exp(Face);
Locus.Compute(Exp,1,MAT_Left); Locus.Compute(Exp,1,MAT_Left);
@ -555,9 +556,9 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine,
//Orientation of the solid. //Orientation of the solid.
if (Solid) MakeSolid(); if (Solid) MakeSolid();
// modified by NIZHNY-EAP Mon Jan 24 11:26:48 2000 ___BEGIN___ // modified by NIZHNY-EAP Mon Jan 24 11:26:48 2000 ___BEGIN___
BRepLib::UpdateTolerances(myShape,Standard_False); BRepLib::UpdateTolerances(myShape,Standard_False);
// modified by NIZHNY-EAP Mon Jan 24 11:26:50 2000 ___END___ // modified by NIZHNY-EAP Mon Jan 24 11:26:50 2000 ___END___
myIsDone = Standard_True; myIsDone = Standard_True;
} }
@ -678,7 +679,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
#endif #endif
TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD);
mySpine = TopoDS::Face(aLocalShape); mySpine = TopoDS::Face(aLocalShape);
// mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD)); // mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD));
myProfile = Pr; myProfile = Pr;
myMap.Clear(); myMap.Clear();
@ -1120,7 +1121,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
if (AffichEdge) { if (AffichEdge) {
char name[100]; char name[100];
sprintf(name,"PAREDGE_%d_%d",++NbEDGES,k); sprintf(name,"PAREDGE_%d_%d",++NbEDGES,k);
DBRep::Set(name,S.Value(k)); DBRep::Set(name,aSeqOfShape.Value(k));
} }
#endif #endif
} }
@ -1158,7 +1159,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
if (AffichEdge) { if (AffichEdge) {
char name[100]; char name[100];
sprintf(name,"PAREDGE_%d_%d",++NbEDGES,k); sprintf(name,"PAREDGE_%d_%d",++NbEDGES,k);
DBRep::Set(name,S.Value(k)); DBRep::Set(name,aSeqOfShape.Value(k));
} }
#endif #endif
} }
@ -1260,7 +1261,7 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp,
{ {
TopoDS_Shape aLocalShapeOriented = Sp.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeOriented = Sp.Oriented(TopAbs_FORWARD);
mySpine = TopoDS::Face(aLocalShapeOriented); mySpine = TopoDS::Face(aLocalShapeOriented);
// mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD)); // mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD));
myProfile = Pr; myProfile = Pr;
myMap.Clear(); myMap.Clear();
@ -1332,7 +1333,7 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp,
if ( ToReverse){ if ( ToReverse){
TopoDS_Shape aLocalShape = WCop.Reversed(); TopoDS_Shape aLocalShape = WCop.Reversed();
TopoDS_Wire bWire = TopoDS::Wire(aLocalShape); TopoDS_Wire bWire = TopoDS::Wire(aLocalShape);
// TopoDS_Wire bWire = TopoDS::Wire(WCop.Reversed()); // TopoDS_Wire bWire = TopoDS::Wire(WCop.Reversed());
FR.Add(bWire); FR.Add(bWire);
} }
else else
@ -1361,7 +1362,7 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp,
TopLoc_Location LT(T); TopLoc_Location LT(T);
TopoDS_Shape aLocalShape = mySpine.Moved(LT); TopoDS_Shape aLocalShape = mySpine.Moved(LT);
FR.Init(TopoDS::Face(aLocalShape)); FR.Init(TopoDS::Face(aLocalShape));
// FR.Init(TopoDS::Face(mySpine.Moved(LT))); // FR.Init(TopoDS::Face(mySpine.Moved(LT)));
FR.Perform(); FR.Perform();
for ( ;FR.More(); FR.Next()) { for ( ;FR.More(); FR.Next()) {
@ -1399,7 +1400,7 @@ void BRepFill_Evolved::VerticalPerform (const TopoDS_Face& Sp,
{ {
TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD);
mySpine = TopoDS::Face(aLocalShape); mySpine = TopoDS::Face(aLocalShape);
// mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD)); // mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD));
myProfile = Pr; myProfile = Pr;
myMap.Clear(); myMap.Clear();
@ -1531,7 +1532,7 @@ static void Bubble(TColStd_SequenceOfReal& Seq)
void BRepFill_Evolved::PrepareProfile(TopTools_ListOfShape& WorkProf, void BRepFill_Evolved::PrepareProfile(TopTools_ListOfShape& WorkProf,
TopTools_DataMapOfShapeShape& MapProf ) TopTools_DataMapOfShapeShape& MapProf )
const const
{ {
// Supposedly the profile is located so that the only transformation // Supposedly the profile is located so that the only transformation
// to be carried out is a projection on plane yOz. // to be carried out is a projection on plane yOz.
@ -1670,7 +1671,7 @@ const
void BRepFill_Evolved::PrepareSpine(TopoDS_Face& WorkSpine, void BRepFill_Evolved::PrepareSpine(TopoDS_Face& WorkSpine,
TopTools_DataMapOfShapeShape& MapSpine) TopTools_DataMapOfShapeShape& MapSpine)
const const
{ {
BRep_Builder B; BRep_Builder B;
TopTools_ListOfShape Cuts; TopTools_ListOfShape Cuts;
@ -1686,6 +1687,7 @@ const
TopoDS_Wire NW; TopoDS_Wire NW;
B.MakeWire (NW); B.MakeWire (NW);
Standard_Boolean IsClosed = IteF.Value().Closed();
for (TopoDS_Iterator IteW(IteF.Value()); IteW.More(); IteW.Next()) { for (TopoDS_Iterator IteW(IteF.Value()); IteW.More(); IteW.Next()) {
@ -1713,6 +1715,7 @@ const
} }
} }
} }
NW.Closed(IsClosed);
B.Add(WorkSpine, NW); B.Add(WorkSpine, NW);
} }
@ -1756,7 +1759,7 @@ const TopoDS_Shape& BRepFill_Evolved::Bottom() const
const TopTools_ListOfShape& BRepFill_Evolved::GeneratedShapes ( const TopTools_ListOfShape& BRepFill_Evolved::GeneratedShapes (
const TopoDS_Shape& SpineShape, const TopoDS_Shape& SpineShape,
const TopoDS_Shape& ProfShape ) const TopoDS_Shape& ProfShape )
const const
{ {
if (myMap .IsBound(SpineShape) && if (myMap .IsBound(SpineShape) &&
myMap(SpineShape).IsBound(ProfShape) ) { myMap(SpineShape).IsBound(ProfShape) ) {
@ -1854,8 +1857,8 @@ void BRepFill_Evolved::Add( BRepFill_Evolved& Vevo,
TopoDS_Shape aLocalShape = VE.Oriented (TopAbs_FORWARD); TopoDS_Shape aLocalShape = VE.Oriented (TopAbs_FORWARD);
TopoDS_Shape aLocalShape2 = ME.Oriented (OG); TopoDS_Shape aLocalShape2 = ME.Oriented (OG);
Glue.Bind(TopoDS::Edge(aLocalShape),TopoDS::Edge(aLocalShape2)); Glue.Bind(TopoDS::Edge(aLocalShape),TopoDS::Edge(aLocalShape2));
// Glue.Bind(TopoDS::Edge(VE.Oriented (TopAbs_FORWARD)), // Glue.Bind(TopoDS::Edge(VE.Oriented (TopAbs_FORWARD)),
// TopoDS::Edge(ME.Oriented (OG))); // TopoDS::Edge(ME.Oriented (OG)));
} }
} }
} }
@ -2023,7 +2026,7 @@ GeomAbs_JoinType BRepFill_Evolved::JoinType() const
void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue) void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
{ {
// return first and last vertex of the profile. // return first and last vertex of the profile.
TopoDS_Vertex V[2]; TopoDS_Vertex V[2];
TopExp::Vertices (myProfile,V[0],V[1]); TopExp::Vertices (myProfile,V[0],V[1]);
if (V[0].IsSame(V[1])) return; if (V[0].IsSame(V[1])) return;
@ -2068,7 +2071,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
if (ToReverse) Or = TopAbs::Reverse(Or); if (ToReverse) Or = TopAbs::Reverse(Or);
TopoDS_Shape aLocalShape = E.Oriented(Or); TopoDS_Shape aLocalShape = E.Oriented(Or);
Loop.AddConstEdge(TopoDS::Edge(aLocalShape)); Loop.AddConstEdge(TopoDS::Edge(aLocalShape));
// Loop.AddConstEdge(TopoDS::Edge(E.Oriented(Or))); // Loop.AddConstEdge(TopoDS::Edge(E.Oriented(Or)));
} }
} }
@ -2104,7 +2107,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
if (ToReverse) Or = TopAbs_REVERSED; if (ToReverse) Or = TopAbs_REVERSED;
TopoDS_Shape aLocalShape = E.Oriented(Or); TopoDS_Shape aLocalShape = E.Oriented(Or);
Loop.AddConstEdge(TopoDS::Edge(aLocalShape)); Loop.AddConstEdge(TopoDS::Edge(aLocalShape));
// Loop.AddConstEdge(TopoDS::Edge(E.Oriented(Or))); // Loop.AddConstEdge(TopoDS::Edge(E.Oriented(Or)));
} }
} }
} }
@ -2188,10 +2191,10 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE,
PutProfilAt (TopoDS::Wire(aLocalShape), PutProfilAt (TopoDS::Wire(aLocalShape),
AxeRef,SE, AxeRef,SE,
mySpine,Standard_True); mySpine,Standard_True);
// TopoDS_Wire DummyProf = // TopoDS_Wire DummyProf =
// PutProfilAt (TopoDS::Wire(myProfile.Moved(DumLoc)), // PutProfilAt (TopoDS::Wire(myProfile.Moved(DumLoc)),
// AxeRef,SE, // AxeRef,SE,
// mySpine,Standard_True); // mySpine,Standard_True);
// Copy of the profile to avoid the accumulation of // Copy of the profile to avoid the accumulation of
// locations on the Edges of myProfile! // locations on the Edges of myProfile!
@ -2277,10 +2280,10 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE,
PutProfilAt (TopoDS::Wire(aLocalShape), PutProfilAt (TopoDS::Wire(aLocalShape),
AxeRef,SE, AxeRef,SE,
mySpine,Standard_False); mySpine,Standard_False);
// TopoDS_Wire GenProf = // TopoDS_Wire GenProf =
// PutProfilAt (TopoDS::Wire(myProfile.Moved(DumLoc)), // PutProfilAt (TopoDS::Wire(myProfile.Moved(DumLoc)),
// AxeRef,SE, // AxeRef,SE,
// mySpine,Standard_False); // mySpine,Standard_False);
gp_Ax1 AxeRev( BRep_Tool::Pnt(VLast), -gp::DZ()); gp_Ax1 AxeRev( BRep_Tool::Pnt(VLast), -gp::DZ());
@ -2298,7 +2301,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE,
char name[100]; char name[100];
sprintf(name,"EVOLBASE_%d",++NbFACES); sprintf(name,"EVOLBASE_%d",++NbFACES);
DrawTrSurf::Set(name,new Geom_Line(AxeRev)); DrawTrSurf::Set(name,new Geom_Line(AxeRev));
// DrawTrSurf::Set(name,new Geom_Line(AxeRev)); // DrawTrSurf::Set(name,new Geom_Line(AxeRev));
sprintf(name,"EVOLPROF_%d",NbFACES); sprintf(name,"EVOLPROF_%d",NbFACES);
DBRep::Set(name,GenProf); DBRep::Set(name,GenProf);
@ -2329,7 +2332,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE,
if (FirstVertex) { if (FirstVertex) {
myMap(VLast).Bind(VF,L); myMap(VLast).Bind(VF,L);
const TopoDS_Shape& RV = Rev.Shape(VFG); const TopoDS_Shape& RV = Rev.Shape(VFG);
// TopAbs_Orientation OO = TopAbs::Compose(RV.Orientation(),Or); // TopAbs_Orientation OO = TopAbs::Compose(RV.Orientation(),Or);
TopAbs_Orientation OO = RV.Orientation(); TopAbs_Orientation OO = RV.Orientation();
myMap(VLast)(VF).Append(RV.Oriented(OO)); myMap(VLast)(VF).Append(RV.Oriented(OO));
FirstVertex = Standard_False; FirstVertex = Standard_False;
@ -2341,7 +2344,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE,
myMap(VLast)(ProfExp.Current()).Append(RF.Oriented(OO)); myMap(VLast)(ProfExp.Current()).Append(RF.Oriented(OO));
myMap(VLast).Bind(VL,L); myMap(VLast).Bind(VL,L);
const TopoDS_Shape& RV = Rev.Shape(VLG); const TopoDS_Shape& RV = Rev.Shape(VLG);
// OO = TopAbs::Compose(RV.Orientation(),Or); // OO = TopAbs::Compose(RV.Orientation(),Or);
OO = RV.Orientation(); OO = RV.Orientation();
myMap(VLast)(VL).Append(RV.Oriented(OO)); myMap(VLast)(VL).Append(RV.Oriented(OO));
} }
@ -2353,7 +2356,7 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE,
//======================================================================= //=======================================================================
TopLoc_Location BRepFill_Evolved::FindLocation(const TopoDS_Face& Face) TopLoc_Location BRepFill_Evolved::FindLocation(const TopoDS_Face& Face)
const const
{ {
TopLoc_Location L; TopLoc_Location L;
Handle(Geom_Surface) S; Handle(Geom_Surface) S;
@ -2652,7 +2655,7 @@ void TrimFace(const TopoDS_Face& Face,
} }
TopoDS_Shape aLocalShape = Face.EmptyCopied(); TopoDS_Shape aLocalShape = Face.EmptyCopied();
TopoDS_Face FaceCut = TopoDS::Face(aLocalShape); TopoDS_Face FaceCut = TopoDS::Face(aLocalShape);
// TopoDS_Face FaceCut = TopoDS::Face(Face.EmptyCopied()); // TopoDS_Face FaceCut = TopoDS::Face(Face.EmptyCopied());
FaceCut.Orientation(TopAbs_FORWARD); FaceCut.Orientation(TopAbs_FORWARD);
BRepTools::Update (FaceCut); BRepTools::Update (FaceCut);
AddDegeneratedEdge (FaceCut,GoodWire); AddDegeneratedEdge (FaceCut,GoodWire);
@ -2701,7 +2704,7 @@ const TopoDS_Wire PutProfilAt (const TopoDS_Wire& ProfRef,
Trans.SetTransformation(Ax,AxeRef); Trans.SetTransformation(Ax,AxeRef);
TopoDS_Shape aLocalShape = ProfRef.Moved(TopLoc_Location(Trans)); TopoDS_Shape aLocalShape = ProfRef.Moved(TopLoc_Location(Trans));
Prof = TopoDS::Wire(aLocalShape); Prof = TopoDS::Wire(aLocalShape);
// Prof = TopoDS::Wire(ProfRef.Moved(TopLoc_Location(Trans))); // Prof = TopoDS::Wire(ProfRef.Moved(TopLoc_Location(Trans)));
return Prof; return Prof;
} }
@ -2763,7 +2766,7 @@ void TrimEdge (const TopoDS_Edge& Edge,
TopoDS::Vertex(TheVer.Value(k)))) { TopoDS::Vertex(TheVer.Value(k)))) {
TheVer.Remove(k); TheVer.Remove(k);
ThePar.Remove(k); ThePar.Remove(k);
// k--; // k--;
} }
k--; k--;
} }
@ -2778,7 +2781,7 @@ void TrimEdge (const TopoDS_Edge& Edge,
for (Standard_Integer k = 1; k < TheVer.Length(); k = k+2) { for (Standard_Integer k = 1; k < TheVer.Length(); k = k+2) {
TopoDS_Shape aLocalShape = Edge.EmptyCopied(); TopoDS_Shape aLocalShape = Edge.EmptyCopied();
TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape); TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape);
// TopoDS_Edge NewEdge = TopoDS::Edge(Edge.EmptyCopied()); // TopoDS_Edge NewEdge = TopoDS::Edge(Edge.EmptyCopied());
if (NewEdge.Orientation() == TopAbs_REVERSED) { if (NewEdge.Orientation() == TopAbs_REVERSED) {
TheBuilder.Add (NewEdge,TheVer.Value(k) .Oriented(TopAbs_REVERSED)); TheBuilder.Add (NewEdge,TheVer.Value(k) .Oriented(TopAbs_REVERSED));
@ -2789,9 +2792,9 @@ void TrimEdge (const TopoDS_Edge& Edge,
TheBuilder.Add (NewEdge,TheVer.Value(k+1).Oriented(TopAbs_REVERSED)); TheBuilder.Add (NewEdge,TheVer.Value(k+1).Oriented(TopAbs_REVERSED));
} }
TheBuilder.Range(NewEdge,ThePar.Value(k),ThePar.Value(k+1)); TheBuilder.Range(NewEdge,ThePar.Value(k),ThePar.Value(k+1));
// modified by NIZHNY-EAP Wed Dec 22 12:09:48 1999 ___BEGIN___ // modified by NIZHNY-EAP Wed Dec 22 12:09:48 1999 ___BEGIN___
BRepLib::UpdateTolerances(NewEdge,Standard_False); BRepLib::UpdateTolerances(NewEdge,Standard_False);
// modified by NIZHNY-EAP Wed Dec 22 13:34:19 1999 ___END___ // modified by NIZHNY-EAP Wed Dec 22 13:34:19 1999 ___END___
S.Append(NewEdge); S.Append(NewEdge);
} }
} }
@ -3094,7 +3097,7 @@ void CutEdgeProf (const TopoDS_Edge& E,
Standard_Real xmin,xmax; Standard_Real xmin,xmax;
B.Get(xmin,U1,xmax,U2); B.Get(xmin,U1,xmax,U2);
// modified by NIZHNY-EAP Wed Feb 2 16:32:37 2000 ___BEGIN___ // modified by NIZHNY-EAP Wed Feb 2 16:32:37 2000 ___BEGIN___
// no sense if C2 is normal to Line or really is a point // no sense if C2 is normal to Line or really is a point
if (U1 != U2) { if (U1 != U2) {
Geom2dAPI_ExtremaCurveCurve Extrema(Line,C2d,U1-1.,U2+1.,f,l); Geom2dAPI_ExtremaCurveCurve Extrema(Line,C2d,U1-1.,U2+1.,f,l);
@ -3105,7 +3108,7 @@ void CutEdgeProf (const TopoDS_Edge& E,
Seq.Append(U2); Seq.Append(U2);
} }
} }
// modified by NIZHNY-EAP Wed Feb 2 16:33:05 2000 ___END___ // modified by NIZHNY-EAP Wed Feb 2 16:33:05 2000 ___END___
// On calcule les intersection avec Oy. // On calcule les intersection avec Oy.
Geom2dAdaptor_Curve ALine(Line); Geom2dAdaptor_Curve ALine(Line);
@ -3223,9 +3226,9 @@ void CutEdge (const TopoDS_Edge& E,
TopoDS_Edge FE = TopoDS::Edge(aLocalShape1); TopoDS_Edge FE = TopoDS::Edge(aLocalShape1);
TopoDS_Edge ME = TopoDS::Edge(aLocalShape2); TopoDS_Edge ME = TopoDS::Edge(aLocalShape2);
TopoDS_Edge LE = TopoDS::Edge(aLocalShape3); TopoDS_Edge LE = TopoDS::Edge(aLocalShape3);
// TopoDS_Edge FE = TopoDS::Edge(E.EmptyCopied()); // TopoDS_Edge FE = TopoDS::Edge(E.EmptyCopied());
// TopoDS_Edge ME = TopoDS::Edge(E.EmptyCopied()); // TopoDS_Edge ME = TopoDS::Edge(E.EmptyCopied());
// TopoDS_Edge LE = TopoDS::Edge(E.EmptyCopied()); // TopoDS_Edge LE = TopoDS::Edge(E.EmptyCopied());
FE.Orientation(TopAbs_FORWARD); FE.Orientation(TopAbs_FORWARD);
ME.Orientation(TopAbs_FORWARD); ME.Orientation(TopAbs_FORWARD);
@ -3278,7 +3281,7 @@ void CutEdge (const TopoDS_Edge& E,
} }
TopoDS_Shape aLocalShape = E.EmptyCopied(); TopoDS_Shape aLocalShape = E.EmptyCopied();
TopoDS_Edge NE = TopoDS::Edge(aLocalShape); TopoDS_Edge NE = TopoDS::Edge(aLocalShape);
// TopoDS_Edge NE = TopoDS::Edge(E.EmptyCopied()); // TopoDS_Edge NE = TopoDS::Edge(E.EmptyCopied());
NE.Orientation(TopAbs_FORWARD); NE.Orientation(TopAbs_FORWARD);
B.Add (NE,VF.Oriented(TopAbs_FORWARD)); B.Add (NE,VF.Oriented(TopAbs_FORWARD));
B.Add (NE,VL.Oriented(TopAbs_REVERSED)); B.Add (NE,VL.Oriented(TopAbs_REVERSED));
@ -3298,7 +3301,7 @@ void CutEdge (const TopoDS_Edge& E,
//======================================================================= //=======================================================================
Standard_Integer VertexFromNode Standard_Integer VertexFromNode
(const Handle(MAT_Node)& aNode, (const Handle(MAT_Node)& aNode,
const TopoDS_Edge& E, const TopoDS_Edge& E,
const TopoDS_Vertex& VF, const TopoDS_Vertex& VF,
const TopoDS_Vertex& VL, const TopoDS_Vertex& VL,

@ -104,11 +104,15 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
const Standard_Boolean Inv1, const Standard_Boolean Inv1,
const Standard_Boolean Inv2, const Standard_Boolean Inv2,
const Handle(Geom2d_Curve)& Bissec) const Handle(Geom2d_Curve)& Bissec)
: myFace1(Face1 ), : myFace1(Face1 ),
myFace2(Face2 ), myFace2(Face2 ),
myBis (Bissec), myBis (Bissec),
myKPart(0) myKPart(0)
{ {
//
const Standard_Real mult = 5.;
const Standard_Real eps = mult * Precision::Confusion();
//
myNbPnt2d = 2; myNbPnt2d = 2;
myNbPnt = 1; myNbPnt = 1;
@ -165,7 +169,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU1 = S->UIso(Umin); UU1 = S->UIso(Umin);
GeomAdaptor_Curve Dummy(UU1); GeomAdaptor_Curve Dummy(UU1);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU1 = S->UIso(Umax); UU1 = S->UIso(Umax);
} }
} }
@ -173,7 +177,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU1 = S->UIso(Umax); UU1 = S->UIso(Umax);
GeomAdaptor_Curve Dummy(UU1); GeomAdaptor_Curve Dummy(UU1);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU1 = S->UIso(Umin); UU1 = S->UIso(Umin);
} }
} }
@ -184,7 +188,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU1 = S->VIso(Vmin); UU1 = S->VIso(Vmin);
GeomAdaptor_Curve Dummy(UU1); GeomAdaptor_Curve Dummy(UU1);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU1 = S->VIso(Vmax); UU1 = S->VIso(Vmax);
} }
} }
@ -192,7 +196,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU1 = S->VIso(Vmax); UU1 = S->VIso(Vmax);
GeomAdaptor_Curve Dummy(UU1); GeomAdaptor_Curve Dummy(UU1);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU1 = S->VIso(Vmin); UU1 = S->VIso(Vmin);
} }
} }
@ -281,7 +285,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU2 = S->UIso(Umin); UU2 = S->UIso(Umin);
GeomAdaptor_Curve Dummy(UU2); GeomAdaptor_Curve Dummy(UU2);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU2 = S->UIso(Umax); UU2 = S->UIso(Umax);
} }
} }
@ -289,7 +293,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU2 = S->UIso(Umax); UU2 = S->UIso(Umax);
GeomAdaptor_Curve Dummy(UU2); GeomAdaptor_Curve Dummy(UU2);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU2 = S->UIso(Umin); UU2 = S->UIso(Umin);
} }
} }
@ -300,7 +304,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU2 = S->VIso(Vmin); UU2 = S->VIso(Vmin);
GeomAdaptor_Curve Dummy(UU2); GeomAdaptor_Curve Dummy(UU2);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU2 = S->VIso(Vmax); UU2 = S->VIso(Vmax);
} }
} }
@ -308,7 +312,7 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
UU2 = S->VIso(Vmax); UU2 = S->VIso(Vmax);
GeomAdaptor_Curve Dummy(UU2); GeomAdaptor_Curve Dummy(UU2);
if (Dummy.GetType() == GeomAbs_Circle && if (Dummy.GetType() == GeomAbs_Circle &&
Dummy.Circle().Radius() < Precision::Confusion()) { Dummy.Circle().Radius() < eps) {
UU2 = S->VIso(Vmin); UU2 = S->VIso(Vmin);
} }
} }
@ -373,11 +377,11 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
gp_Pnt2d aPnt1 = ValueOnF1(myBis.FirstParameter() + 0.1*DeltaU); gp_Pnt2d aPnt1 = ValueOnF1(myBis.FirstParameter() + 0.1*DeltaU);
gp_Pnt2d aPnt2 = ValueOnF1(myBis.FirstParameter() + 0.9*DeltaU); gp_Pnt2d aPnt2 = ValueOnF1(myBis.FirstParameter() + 0.9*DeltaU);
if ( myIsoU1) { if ( myIsoU1) {
if ( Abs(aPnt1.Y() - aPnt2.Y()) < Precision::Confusion()) if ( Abs(aPnt1.Y() - aPnt2.Y()) < eps)
myKPart = 1; myKPart = 1;
} }
else { else {
if ( Abs(aPnt1.X() - aPnt2.X()) < Precision::Confusion()) if ( Abs(aPnt1.X() - aPnt2.X()) < eps)
myKPart = 1; myKPart = 1;
} }
@ -597,11 +601,14 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
char* PP1name = "PP1"; char* PP1name = "PP1";
DrawTrSurf::Set(TheUname,TheU.Curve()); DrawTrSurf::Set(TheUname,TheU.Curve());
DrawTrSurf::Set(PP1name,P); DrawTrSurf::Set(PP1name,P);
// DrawTrSurf::Set("TheU",TheU.Curve()); // DrawTrSurf::Set("TheU",TheU.Curve());
// DrawTrSurf::Set("PP1",P); // DrawTrSurf::Set("PP1",P);
} }
#endif #endif
//
const Standard_Real mult = 5.;
const Standard_Real eps = mult * Precision::Confusion();
//
Standard_Real UU =0., Dist = Precision::Infinite(), D1, D2; Standard_Real UU =0., Dist = Precision::Infinite(), D1, D2;
if ( Ext.NbPoints() != 0 ) { if ( Ext.NbPoints() != 0 ) {
@ -612,8 +619,8 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
D1 = P.Distance(TheU.Value(TheU.FirstParameter())); D1 = P.Distance(TheU.Value(TheU.FirstParameter()));
D2 = P.Distance(TheU.Value(TheU.LastParameter())); D2 = P.Distance(TheU.Value(TheU.LastParameter()));
if (D1 < Dist || D2 < Dist) { if (D1 < Dist || D2 < Dist || Abs(D1 - Dist) < eps || Abs(D2 - Dist) < eps) {
if ( Abs( D1 - D2) < Precision::Confusion()) { if ( Abs( D1 - D2) < eps) {
if ( TheU.GetType() == GeomAbs_Circle) { if ( TheU.GetType() == GeomAbs_Circle) {
gp_Vec2d Axis = TheU.Circle().XAxis().Direction(); gp_Vec2d Axis = TheU.Circle().XAxis().Direction();
gp_Vec2d D12d = TheBis.DN(TheBis.FirstParameter(),1); gp_Vec2d D12d = TheBis.DN(TheBis.FirstParameter(),1);
@ -641,7 +648,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
} }
} }
Standard_Real Tol = Precision::Confusion(); const Standard_Real Tol = Precision::Confusion();
Standard_Real VV; Standard_Real VV;
gp_Pnt2d PF = TheV.Value(TheV.FirstParameter()); gp_Pnt2d PF = TheV.Value(TheV.FirstParameter());
@ -745,7 +752,7 @@ void BRepFill_MultiLine::Value3dOnF1OnF2(const Standard_Real U,
gp_Pnt& P3d, gp_Pnt& P3d,
gp_Pnt2d& PF1, gp_Pnt2d& PF1,
gp_Pnt2d& PF2) gp_Pnt2d& PF2)
const const
{ {
PF1 = ValueOnFace(U,myBis,myU1,myV1,myIsoU1); PF1 = ValueOnFace(U,myBis,myU1,myV1,myIsoU1);
PF2 = ValueOnFace(U,myBis,myU2,myV2,myIsoU2); PF2 = ValueOnFace(U,myBis,myU2,myV2,myIsoU2);
@ -776,12 +783,12 @@ GeomAbs_Shape BRepFill_MultiLine::Continuity() const
Standard_Boolean BRepFill_MultiLine::Value(const Standard_Real theT, Standard_Boolean BRepFill_MultiLine::Value(const Standard_Real theT,
NCollection_Array1<gp_Pnt2d>& thePnt2d, NCollection_Array1<gp_Pnt2d>& thePnt2d,
NCollection_Array1<gp_Pnt>& thePnt) const NCollection_Array1<gp_Pnt>& thePnt) const
{ {
thePnt(1) = Value(theT); thePnt(1) = Value(theT);
thePnt2d(1) = ValueOnF1(theT); thePnt2d(1) = ValueOnF1(theT);
thePnt2d(2) = ValueOnF2(theT); thePnt2d(2) = ValueOnF2(theT);
return Standard_True; return Standard_True;
} }
//======================================================================= //=======================================================================
//function : Value //function : Value

@ -63,6 +63,7 @@
#include <TopoDS_Face.hxx> #include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx> #include <TopoDS_Vertex.hxx>
//#define DRAW
#include <stdio.h> #include <stdio.h>
#ifdef DRAW #ifdef DRAW
#include <DrawTrSurf.hxx> #include <DrawTrSurf.hxx>
@ -70,7 +71,7 @@
#endif #endif
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
static Standard_Boolean Affich = Standard_False; static Standard_Boolean Affich = Standard_False;
static Standard_Integer NBCALL = 1; static Standard_Integer NBCALL = 0;
#endif #endif
//======================================================================= //=======================================================================
@ -84,7 +85,7 @@ static Standard_Integer NBCALL = 1;
//======================================================================= //=======================================================================
BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool
(const Handle(Geom2d_Curve)& Bis, (const Handle(Geom2d_Curve)& Bis,
const TopoDS_Face& Face1, const TopoDS_Face& Face1,
const TopoDS_Face& Face2, const TopoDS_Face& Face2,
const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge1,
@ -92,17 +93,17 @@ BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool
const Standard_Boolean Inv1, const Standard_Boolean Inv1,
const Standard_Boolean Inv2 ) : const Standard_Boolean Inv2 ) :
myFace1(Face1), myFace1(Face1),
myFace2(Face2), myFace2(Face2),
myEdge1(Edge1), myEdge1(Edge1),
myEdge2(Edge2), myEdge2(Edge2),
myInv1(Inv1), myInv1(Inv1),
myInv2(Inv2), myInv2(Inv2),
myBis (Bis) myBis (Bis)
{ {
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
if ( Affich) { if ( Affich) {
NBCALL++;
cout << " ---------->TrimSurfaceTool : NBCALL = " << NBCALL << endl; cout << " ---------->TrimSurfaceTool : NBCALL = " << NBCALL << endl;
#ifdef DRAW #ifdef DRAW
char name[256]; char name[256];
@ -121,7 +122,6 @@ myBis (Bis)
sprintf(name,"BISSEC_%d",NBCALL); sprintf(name,"BISSEC_%d",NBCALL);
DrawTrSurf::Set(name,myBis); DrawTrSurf::Set(name,myBis);
#endif #endif
NBCALL++;
} }
#endif #endif
} }
@ -206,7 +206,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Standard_Real U1, U2; Standard_Real U1, U2;
gp_Pnt P;//,PSeq; gp_Pnt P;//,PSeq;
// Standard_Real Tol = Precision::Intersection(); // Standard_Real Tol = Precision::Intersection();
// modified by NIZHNY-EAP Wed Dec 22 15:00:51 1999 ___BEGIN___ // modified by NIZHNY-EAP Wed Dec 22 15:00:51 1999 ___BEGIN___
Standard_Real Tol = 1.e-6; // BRepFill_Precision(); Standard_Real Tol = 1.e-6; // BRepFill_Precision();
Standard_Real TolC = 0.; Standard_Real TolC = 0.;
@ -298,19 +298,19 @@ static void EvalParameters(const TopoDS_Edge& Edge,
// Order the sequence by increasing parameter on the bissectrice. // Order the sequence by increasing parameter on the bissectrice.
Bubble( Seq); Bubble( Seq);
// modified by NIZHNY-EAP Fri Dec 24 18:47:24 1999 ___BEGIN___ // modified by NIZHNY-EAP Fri Dec 24 18:47:24 1999 ___BEGIN___
// Remove double points // Remove double points
gp_Pnt P1, P2; gp_Pnt P1, P2;
for ( Standard_Integer i = 1; i < NbPoints; i++) { for ( Standard_Integer i = 1; i < NbPoints; i++) {
P1 = Seq.Value(i); P1 = Seq.Value(i);
P2 = Seq.Value(i+1); P2 = Seq.Value(i+1);
if ( P2.X()-P1.X() < Tol ) { if ( P2.X()-P1.X() < Tol ) {
// cout<<"REMOVE "<<P1.X()<<endl; // cout<<"REMOVE "<<P1.X()<<endl;
Seq.Remove(i--); Seq.Remove(i--);
NbPoints--; NbPoints--;
} }
} }
// modified by NIZHNY-EAP Fri Dec 24 18:47:28 1999 ___END___ // modified by NIZHNY-EAP Fri Dec 24 18:47:28 1999 ___END___
} }
else { else {
// the edge is degenerated : the point and it is found if it is // the edge is degenerated : the point and it is found if it is
@ -322,7 +322,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Standard_Real UBis = Bis->FirstParameter(); Standard_Real UBis = Bis->FirstParameter();
gp_Pnt2d PBis = Bis->Value( UBis); gp_Pnt2d PBis = Bis->Value( UBis);
// modified by NIZHNY-EAP Wed Jan 12 11:41:30 2000 ___BEGIN___ // modified by NIZHNY-EAP Wed Jan 12 11:41:30 2000 ___BEGIN___
// inside gp_Pnt2d::Distance // inside gp_Pnt2d::Distance
// Infinite * Infinite => Exception: DefaultNumericError // Infinite * Infinite => Exception: DefaultNumericError
// Case encounered: UBis < Precision::Infinite() // Case encounered: UBis < Precision::Infinite()
@ -330,7 +330,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
if (Precision::IsPositiveInfinite(Abs(PBis.X())) || if (Precision::IsPositiveInfinite(Abs(PBis.X())) ||
Precision::IsPositiveInfinite(Abs(PBis.Y())) || Precision::IsPositiveInfinite(Abs(PBis.Y())) ||
PBis.Distance(P2d) > Tol) { PBis.Distance(P2d) > Tol) {
// modified by NIZHNY-EAP Wed Jan 12 11:41:40 2000 ___END___ // modified by NIZHNY-EAP Wed Jan 12 11:41:40 2000 ___END___
UBis = Bis->LastParameter(); UBis = Bis->LastParameter();
if (UBis >= Precision::Infinite()) return; if (UBis >= Precision::Infinite()) return;
PBis = Bis->Value( UBis); PBis = Bis->Value( UBis);
@ -399,11 +399,23 @@ static void EvalParameters(const TopoDS_Edge& Edge,
//======================================================================= //=======================================================================
void BRepFill_TrimSurfaceTool::IntersectWith void BRepFill_TrimSurfaceTool::IntersectWith
(const TopoDS_Edge& EdgeOnF1, (const TopoDS_Edge& EdgeOnF1,
const TopoDS_Edge& EdgeOnF2, const TopoDS_Edge& EdgeOnF2,
TColgp_SequenceOfPnt& Points ) TColgp_SequenceOfPnt& Points )
const const
{ {
#ifdef DRAW
if ( Affich) {
char name[256];
Standard_Integer i1 = 0, i2 = 2;
sprintf(name,"EdgeOnF1_%d_%d",i1, NBCALL);
DBRep::Set(name,EdgeOnF1);
sprintf(name,"EdgeOnF2_%d_%d",i2, NBCALL);
DBRep::Set(name,EdgeOnF2);
}
#endif
Points.Clear(); Points.Clear();
TColgp_SequenceOfPnt Points2; TColgp_SequenceOfPnt Points2;
@ -420,7 +432,7 @@ const
PSeq = Points(i); PSeq = Points(i);
PSeq.SetZ((Points2.Value(i)).Y()); PSeq.SetZ((Points2.Value(i)).Y());
Points.SetValue(i,PSeq); Points.SetValue(i,PSeq);
// cout<<"BisPar "<<PSeq.X()<<endl; // cout<<"BisPar "<<PSeq.X()<<endl;
} }
} }
@ -431,7 +443,7 @@ const
//======================================================================= //=======================================================================
Standard_Boolean BRepFill_TrimSurfaceTool::IsOnFace Standard_Boolean BRepFill_TrimSurfaceTool::IsOnFace
(const gp_Pnt2d& Point) const (const gp_Pnt2d& Point) const
{ {
gp_Pnt P( Point.X(), Point.Y(), 0.); gp_Pnt P( Point.X(), Point.Y(), 0.);
gp_Lin Line( P, gp::DZ()); gp_Lin Line( P, gp::DZ());
@ -439,14 +451,14 @@ Standard_Boolean BRepFill_TrimSurfaceTool::IsOnFace
BRepIntCurveSurface_Inter Inter; BRepIntCurveSurface_Inter Inter;
// eval if is on face 1 // eval if is on face 1
// modified by NIZHNY-EAP Fri Jan 21 09:49:09 2000 ___BEGIN___ // modified by NIZHNY-EAP Fri Jan 21 09:49:09 2000 ___BEGIN___
Inter.Init(myFace1, Line,1e-6);//Precision::PConfusion()); Inter.Init(myFace1, Line,1e-6);//Precision::PConfusion());
if (Inter.More()) return Standard_True; if (Inter.More()) return Standard_True;
// eval if is on face 2 // eval if is on face 2
Inter.Init(myFace2, Line, 1e-6);//Precision::PConfusion()); Inter.Init(myFace2, Line, 1e-6);//Precision::PConfusion());
return Inter.More(); return Inter.More();
// modified by NIZHNY-EAP Fri Jan 21 09:49:14 2000 ___END___ // modified by NIZHNY-EAP Fri Jan 21 09:49:14 2000 ___END___
} }
@ -493,7 +505,7 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
//======================================================================= //=======================================================================
void BRepFill_TrimSurfaceTool::Project void BRepFill_TrimSurfaceTool::Project
(const Standard_Real U1, (const Standard_Real U1,
const Standard_Real U2, const Standard_Real U2,
Handle(Geom_Curve)& Curve, Handle(Geom_Curve)& Curve,
Handle(Geom2d_Curve)& PCurve1, Handle(Geom2d_Curve)& PCurve1,

@ -0,0 +1,11 @@
puts "========"
puts "OCC26470"
puts "========"
puts ""
##################################################
# BRepFill_Evolved: exception and invalid result
##################################################
restore [locate_data_file OCC26470-ClosedWire.brep] a
restore [locate_data_file OCC26470-wprof1.brep] b
evolved res a b o

@ -0,0 +1,12 @@
puts "========"
puts "OCC26470"
puts "========"
puts ""
##################################################
# BRepFill_Evolved: exception and invalid result
##################################################
restore [locate_data_file OCC26470-ClosedWire.brep] a
restore [locate_data_file OCC26470-wprof2.brep] b
evolved res a b o
checkshape res