1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0029496: No intersection curve between faces if starting points are given

Now, bounded IntPatch_Points are found in case when starting points are used in intersection algorithm. Before the fix, these points were not looked for (even).
This commit is contained in:
nbv 2018-02-08 16:57:36 +03:00 committed by apn
parent e3744452bb
commit 7797eb389a
11 changed files with 125 additions and 93 deletions

View File

@ -1532,3 +1532,8 @@ Since new version, the method BRepAdaptor_CompCurve::IsPeriodic() will always re
@subsection upgrade_730_removed Removed features @subsection upgrade_730_removed Removed features
* The methods *SetDeflection*, *SetEpsilonT*, *SetDiscretize* of the class *IntTools_EdgeFace* have been removed as excessive. * The methods *SetDeflection*, *SetEpsilonT*, *SetDiscretize* of the class *IntTools_EdgeFace* have been removed as excessive.
@subsection upgrade_730_IntersectionAPI Changes in classes responsible for intersection algorithm
Interfaces of the following methods have been changed: IntPatch_WLineTool::ComputePurgedWLine(...), IntPatch_PrmPrmIntersection::Perform(...), IntPatch_Intersection::Perform(...), IntPatch_Intersection::ParamParamPerfom(...), IntPatch_Intersection::GeomGeomPerfom(...). Please see documentation about corresponding methods.

View File

@ -931,21 +931,19 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
// 3. ts1 == ts2 == 0 <Param-Param> // 3. ts1 == ts2 == 0 <Param-Param>
// Geom - Geom // Geom - Geom
const Standard_Boolean RestrictLine = Standard_True;
if(ts1 == ts2 && ts1 == 1) if(ts1 == ts2 && ts1 == 1)
{ {
IntSurf_ListOfPntOn2S ListOfPnts; IntSurf_ListOfPntOn2S ListOfPnts;
ListOfPnts.Clear(); ListOfPnts.Clear();
if(isGeomInt) if(isGeomInt)
{ {
GeomGeomPerfom( theS1, theD1, theS2, theD2, TolArc, GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
TolTang, ListOfPnts, RestrictLine, ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
typs1, typs2, theIsReqToKeepRLine);
} }
else else
{ {
ParamParamPerfom(theS1, theD1, theS2, theD2, ParamParamPerfom(theS1, theD1, theS2, theD2,
TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2); TolArc, TolTang, ListOfPnts, typs1, typs2);
} }
} }
@ -962,7 +960,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
ListOfPnts.Clear(); ListOfPnts.Clear();
ParamParamPerfom(theS1, theD1, theS2, theD2, TolArc, ParamParamPerfom(theS1, theD1, theS2, theD2, TolArc,
TolTang, ListOfPnts, RestrictLine, typs1, typs2); TolTang, ListOfPnts, typs1, typs2);
} }
if(!theIsReqToPostWLProc) if(!theIsReqToPostWLProc)
@ -979,7 +977,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
continue; continue;
Handle(IntPatch_WLine) aRW = Handle(IntPatch_WLine) aRW =
IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine); IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
if(aRW.IsNull()) if(aRW.IsNull())
continue; continue;
@ -1000,7 +998,6 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
const Standard_Real TolArc, const Standard_Real TolArc,
const Standard_Real TolTang, const Standard_Real TolTang,
IntSurf_ListOfPntOn2S& ListOfPnts, IntSurf_ListOfPntOn2S& ListOfPnts,
const Standard_Boolean RestrictLine,
const Standard_Boolean isGeomInt, const Standard_Boolean isGeomInt,
const Standard_Boolean theIsReqToKeepRLine, const Standard_Boolean theIsReqToKeepRLine,
const Standard_Boolean theIsReqToPostWLProc) const Standard_Boolean theIsReqToPostWLProc)
@ -1184,7 +1181,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
if(!isGeomInt) if(!isGeomInt)
{ {
ParamParamPerfom(theS1, theD1, theS2, theD2, ParamParamPerfom(theS1, theD1, theS2, theD2,
TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2); TolArc, TolTang, ListOfPnts, typs1, typs2);
} }
else if(ts1 != ts2) else if(ts1 != ts2)
{ {
@ -1193,12 +1190,12 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
else if (ts1 == 0) else if (ts1 == 0)
{ {
ParamParamPerfom(theS1, theD1, theS2, theD2, ParamParamPerfom(theS1, theD1, theS2, theD2,
TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2); TolArc, TolTang, ListOfPnts, typs1, typs2);
} }
else if(ts1 == 1) else if(ts1 == 1)
{ {
GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
TolTang, ListOfPnts, RestrictLine, typs1, typs2, theIsReqToKeepRLine); ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
} }
if(!theIsReqToPostWLProc) if(!theIsReqToPostWLProc)
@ -1215,7 +1212,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& theS1,
continue; continue;
Handle(IntPatch_WLine) aRW = Handle(IntPatch_WLine) aRW =
IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine); IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
if(aRW.IsNull()) if(aRW.IsNull())
continue; continue;
@ -1236,7 +1233,6 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)&
const Standard_Real TolArc, const Standard_Real TolArc,
const Standard_Real TolTang, const Standard_Real TolTang,
IntSurf_ListOfPntOn2S& ListOfPnts, IntSurf_ListOfPntOn2S& ListOfPnts,
const Standard_Boolean RestrictLine,
const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs1,
const GeomAbs_SurfaceType typs2) const GeomAbs_SurfaceType typs2)
{ {
@ -1246,10 +1242,10 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_HSurface)&
Standard_Boolean ClearFlag = Standard_True; Standard_Boolean ClearFlag = Standard_True;
if(!ListOfPnts.IsEmpty()) if(!ListOfPnts.IsEmpty())
{ {
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts, RestrictLine); interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts);
ClearFlag = Standard_False; ClearFlag = Standard_False;
} }
interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag); //double call!!!!!!! interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag);
} }
else if((theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite())) else if((theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite()))
{ {
@ -1346,7 +1342,6 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
const Standard_Real TolArc, const Standard_Real TolArc,
const Standard_Real TolTang, const Standard_Real TolTang,
IntSurf_ListOfPntOn2S& ListOfPnts, IntSurf_ListOfPntOn2S& ListOfPnts,
const Standard_Boolean RestrictLine,
const GeomAbs_SurfaceType theTyps1, const GeomAbs_SurfaceType theTyps1,
const GeomAbs_SurfaceType theTyps2, const GeomAbs_SurfaceType theTyps2,
const Standard_Boolean theIsReqToKeepRLine) const Standard_Boolean theIsReqToKeepRLine)
@ -1358,7 +1353,7 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
{ {
done = Standard_False; done = Standard_False;
ParamParamPerfom(theS1, theD1, theS2, theD2, ParamParamPerfom(theS1, theD1, theS2, theD2,
TolArc, TolTang, ListOfPnts, RestrictLine, theTyps1, theTyps2); TolArc, TolTang, ListOfPnts, theTyps1, theTyps2);
return; return;
} }
@ -1605,7 +1600,7 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_HSurface)& S1,
continue; continue;
Handle(IntPatch_WLine) aRW = Handle(IntPatch_WLine) aRW =
IntPatch_WLineTool::ComputePurgedWLine(aWL, S1, S2, D1, D2, Standard_True); IntPatch_WLineTool::ComputePurgedWLine(aWL, S1, S2, D1, D2);
if(aRW.IsNull()) if(aRW.IsNull())
continue; continue;

View File

@ -70,16 +70,16 @@ public:
//! //!
//! UVMaxStep is a parameter used in the walking //! UVMaxStep is a parameter used in the walking
//! algorithms to compute the distance between to //! algorithms to compute the distance between to
//! points in their respective parametrtic spaces. //! points in their respective parametric spaces.
Standard_EXPORT void SetTolerances (const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real UVMaxStep, const Standard_Real Fleche); Standard_EXPORT void SetTolerances (const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real UVMaxStep, const Standard_Real Fleche);
//! Flag theIsReqToKeepRLine has been enterred only for //! Flag theIsReqToKeepRLine has been entered only for
//! compatibility with TopOpeBRep package. It shall be deleted //! compatibility with TopOpeBRep package. It shall be deleted
//! after deleting TopOpeBRep. //! after deleting TopOpeBRep.
//! When intersection result returns IntPatch_RLine and another //! When intersection result returns IntPatch_RLine and another
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
//! will always keep both lines even if they are coincided. //! will always keep both lines even if they are coincided.
//! Flag theIsReqToPostWLProc has been enterred only for //! Flag theIsReqToPostWLProc has been entered only for
//! compatibility with TopOpeBRep package. It shall be deleted //! compatibility with TopOpeBRep package. It shall be deleted
//! after deleting TopOpeBRep. //! after deleting TopOpeBRep.
//! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
@ -88,18 +88,18 @@ public:
//! If isGeomInt == Standard_False, then method //! If isGeomInt == Standard_False, then method
//! Param-Param intersection will be used. //! Param-Param intersection will be used.
//! Flag theIsReqToKeepRLine has been enterred only for //! Flag theIsReqToKeepRLine has been entered only for
//! compatibility with TopOpeBRep package. It shall be deleted //! compatibility with TopOpeBRep package. It shall be deleted
//! after deleting TopOpeBRep. //! after deleting TopOpeBRep.
//! When intersection result returns IntPatch_RLine and another //! When intersection result returns IntPatch_RLine and another
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
//! will always keep both lines even if they are coincided. //! will always keep both lines even if they are coincided.
//! Flag theIsReqToPostWLProc has been enterred only for //! Flag theIsReqToPostWLProc has been entered only for
//! compatibility with TopOpeBRep package. It shall be deleted //! compatibility with TopOpeBRep package. It shall be deleted
//! after deleting TopOpeBRep. //! after deleting TopOpeBRep.
//! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
//! obtained after intersection algorithm directly (wothout any post-processing). //! obtained after intersection algorithm directly (without any post-processing).
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine = Standard_True, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True); Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
//! Perform with start point //! Perform with start point
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang); Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang);
@ -107,14 +107,14 @@ public:
//! Uses for finding self-intersected surfaces. //! Uses for finding self-intersected surfaces.
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang); Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang);
//! Returns True if the calculus was succesfull. //! Returns True if the calculus was successful.
Standard_Boolean IsDone() const; Standard_Boolean IsDone() const;
//! Returns true if the is no intersection. //! Returns true if the is no intersection.
Standard_Boolean IsEmpty() const; Standard_Boolean IsEmpty() const;
//! Returns True if the two patches are considered as //! Returns True if the two patches are considered as
//! entierly tangent, i-e every restriction arc of one //! entirely tangent, i-e every restriction arc of one
//! patch is inside the geometric base of the other patch. //! patch is inside the geometric base of the other patch.
Standard_Boolean TangentFaces() const; Standard_Boolean TangentFaces() const;
@ -157,15 +157,15 @@ protected:
private: private:
Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2); Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
//! Flag theIsReqToKeepRLine has been enterred only for //! Flag theIsReqToKeepRLine has been entered only for
//! compatibility with TopOpeBRep package. It shall be deleted //! compatibility with TopOpeBRep package. It shall be deleted
//! after deleting TopOpeBRep. //! after deleting TopOpeBRep.
//! When intersection result returns IntPatch_RLine and another //! When intersection result returns IntPatch_RLine and another
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
//! will always keep both lines even if they are coincided. //! will always keep both lines even if they are coincided.
Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean RestrictLine, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine = Standard_False); Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine);
Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2); Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);

View File

@ -1551,8 +1551,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
const Standard_Real Epsilon, const Standard_Real Epsilon,
const Standard_Real Deflection, const Standard_Real Deflection,
const Standard_Real Increment, const Standard_Real Increment,
IntSurf_ListOfPntOn2S& LOfPnts, IntSurf_ListOfPntOn2S& LOfPnts)
const Standard_Boolean RestrictLine)
{ {
if (LOfPnts.IsEmpty()){ if (LOfPnts.IsEmpty()){
done = Standard_True; done = Standard_True;
@ -1788,15 +1787,13 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_HSurface)&
Standard_Real TolTang = TolTangency; Standard_Real TolTang = TolTangency;
Handle(IntPatch_WLine) wline = new IntPatch_WLine(PW.Line(),Standard_False,trans1,trans2); Handle(IntPatch_WLine) wline = new IntPatch_WLine(PW.Line(),Standard_False,trans1,trans2);
if (RestrictLine){ //the method PutVertexOnLine can reduce the number of points in <wline>
//the method PutVertexOnLine can reduce the number of points in <wline> IntPatch_RstInt::PutVertexOnLine(wline, Surf1, D1, Surf2, Standard_True, TolTang);
IntPatch_RstInt::PutVertexOnLine(wline,Surf1,D1,Surf2,Standard_True,TolTang); if (wline->NbPnts() < 2)
if (wline->NbPnts() < 2) continue;
continue; IntPatch_RstInt::PutVertexOnLine(wline, Surf2, D2, Surf1, Standard_False, TolTang);
IntPatch_RstInt::PutVertexOnLine(wline,Surf2,D2,Surf1,Standard_False,TolTang); if (wline->NbPnts() < 2)
if (wline->NbPnts() < 2) continue;
continue;
}
if(wline->NbVertex() == 0) { if(wline->NbVertex() == 0) {
IntPatch_Point vtx; IntPatch_Point vtx;

View File

@ -68,7 +68,7 @@ public:
//! Performs the intersection between <Caro1> and //! Performs the intersection between <Caro1> and
//! <Caro2>. The method computes the polyhedron on //! <Caro2>. The method computes the polyhedron on
//! each surface. //! each surface.
Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts, const Standard_Boolean RestrictLine); Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_HSurface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts);
//! Performs the intersection between <Caro1> and //! Performs the intersection between <Caro1> and
//! <Caro2>. The method computes the polyhedron on //! <Caro2>. The method computes the polyhedron on

View File

@ -1282,8 +1282,7 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
const Handle(Adaptor3d_HSurface) &theS1, const Handle(Adaptor3d_HSurface) &theS1,
const Handle(Adaptor3d_HSurface) &theS2, const Handle(Adaptor3d_HSurface) &theS2,
const Handle(Adaptor3d_TopolTool) &theDom1, const Handle(Adaptor3d_TopolTool) &theDom1,
const Handle(Adaptor3d_TopolTool) &theDom2, const Handle(Adaptor3d_TopolTool) &theDom2)
const Standard_Boolean theRestrictLine)
{ {
Standard_Integer i, k, v, nb, nbvtx; Standard_Integer i, k, v, nb, nbvtx;
Handle(IntPatch_WLine) aResult; Handle(IntPatch_WLine) aResult;
@ -1386,11 +1385,8 @@ Handle(IntPatch_WLine) IntPatch_WLineTool::
return aLocalWLine; return aLocalWLine;
} }
if (theRestrictLine) // II: Delete out of borders points.
{ aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
// II: Delete out of borders points.
aLocalWLine = DeleteOuterPoints(aLocalWLine, theS1, theS2, theDom1, theDom2);
}
// III: Delete points by tube criteria. // III: Delete points by tube criteria.
Handle(IntPatch_WLine) aLocalWLineTube = Handle(IntPatch_WLine) aLocalWLineTube =

View File

@ -34,7 +34,6 @@ public:
//! //!
//! II //! II
//! Removes point out of borders in case of non periodic surfaces. //! Removes point out of borders in case of non periodic surfaces.
//! This step is done only if theRestrictLine is true.
//! //!
//! III //! III
//! Removes exceed points using tube criteria: //! Removes exceed points using tube criteria:
@ -48,8 +47,7 @@ public:
const Handle(Adaptor3d_HSurface) &theS1, const Handle(Adaptor3d_HSurface) &theS1,
const Handle(Adaptor3d_HSurface) &theS2, const Handle(Adaptor3d_HSurface) &theS2,
const Handle(Adaptor3d_TopolTool) &theDom1, const Handle(Adaptor3d_TopolTool) &theDom1,
const Handle(Adaptor3d_TopolTool) &theDom2, const Handle(Adaptor3d_TopolTool) &theDom2);
const Standard_Boolean theRestrictLine);
//! Joins all WLines from theSlin to one if it is possible and records //! Joins all WLines from theSlin to one if it is possible and records
//! the result into theSlin again. Lines will be kept to be splitted if: //! the result into theSlin again. Lines will be kept to be splitted if:

View File

@ -358,8 +358,6 @@ static Standard_Boolean isTreatAnalityc(const BRepAdaptor_Surface& theBAS1,
void IntTools_FaceFace::Perform(const TopoDS_Face& aF1, void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
const TopoDS_Face& aF2) const TopoDS_Face& aF2)
{ {
Standard_Boolean RestrictLine = Standard_False;
if (myContext.IsNull()) { if (myContext.IsNull()) {
myContext=new IntTools_Context; myContext=new IntTools_Context;
} }
@ -509,14 +507,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection); myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
} }
if((myHS1->IsUClosed() && !myHS1->IsUPeriodic()) ||
(myHS1->IsVClosed() && !myHS1->IsVPeriodic()) ||
(myHS2->IsUClosed() && !myHS2->IsUPeriodic()) ||
(myHS2->IsVClosed() && !myHS2->IsVPeriodic()))
{
RestrictLine = Standard_True;
}
//
if((aType1 != GeomAbs_BSplineSurface) && if((aType1 != GeomAbs_BSplineSurface) &&
(aType1 != GeomAbs_BezierSurface) && (aType1 != GeomAbs_BezierSurface) &&
(aType1 != GeomAbs_OtherSurface) && (aType1 != GeomAbs_OtherSurface) &&
@ -524,8 +514,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
(aType2 != GeomAbs_BezierSurface) && (aType2 != GeomAbs_BezierSurface) &&
(aType2 != GeomAbs_OtherSurface)) (aType2 != GeomAbs_OtherSurface))
{ {
RestrictLine = Standard_True;
if ((aType1 == GeomAbs_Torus) || if ((aType1 == GeomAbs_Torus) ||
(aType2 == GeomAbs_Torus)) (aType2 == GeomAbs_Torus))
{ {
@ -533,27 +521,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
} }
} }
//
if(!RestrictLine)
{
TopExp_Explorer aExp;
for(Standard_Integer i = 0; (!RestrictLine) && (i < 2); i++)
{
const TopoDS_Face& aF=(!i) ? myFace1 : myFace2;
aExp.Init(aF, TopAbs_EDGE);
for(; aExp.More(); aExp.Next())
{
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
if(BRep_Tool::Degenerated(aE))
{
RestrictLine = Standard_True;
break;
}
}
}
}
#ifdef INTTOOLS_FACEFACE_DEBUG #ifdef INTTOOLS_FACEFACE_DEBUG
if(!myListOfPnts.IsEmpty()) { if(!myListOfPnts.IsEmpty()) {
char aBuff[10000]; char aBuff[10000];
@ -581,7 +548,7 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
myIntersector.Perform(myHS1, dom1, TolArc, TolTang); myIntersector.Perform(myHS1, dom1, TolArc, TolTang);
else else
myIntersector.Perform(myHS1, dom1, myHS2, dom2, TolArc, TolTang, myIntersector.Perform(myHS1, dom1, myHS2, dom2, TolArc, TolTang,
myListOfPnts, RestrictLine, isGeomInt); myListOfPnts, isGeomInt);
myIsDone = myIntersector.IsDone(); myIsDone = myIntersector.IsDone();
@ -592,10 +559,6 @@ void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
return; return;
} }
// //
if(RestrictLine) {
myListOfPnts.Clear(); // to use LineConstructor
}
//
const Standard_Integer aNbLinIntersector = myIntersector.NbLines(); const Standard_Integer aNbLinIntersector = myIntersector.NbLines();
for (Standard_Integer i=1; i <= aNbLinIntersector; ++i) { for (Standard_Integer i=1; i <= aNbLinIntersector; ++i) {
MakeCurve(i, dom1, dom2, TolArc); MakeCurve(i, dom1, dom2, TolArc);

View File

@ -9,10 +9,28 @@ puts ""
restore [locate_data_file bug25994_body.brep] body restore [locate_data_file bug25994_body.brep] body
restore [locate_data_file bug25994_wing.brep] wing restore [locate_data_file bug25994_wing.brep] wing
bfuse result body wing bclearobjects
bcleartools
baddobjects body
baddtools wing
bfillds
bbop rs 4
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv
if { $nbv != 0 } { puts "Error : Section is not closed" }
regexp {Tolerance MAX=([-0-9.+eE]+)} [tolerance rs] full toler
if { $toler > 5.0e-5 } {
puts "Error: Tolerance after section is too large"
}
bbop result 1
checkshape result checkshape result
checknbshapes result -solid 1 -shell 1 -face 13 -wire 15
checkprops result -s 1.76161e+006 -v 1.07392e+008
smallview smallview
fit fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@ -6,6 +6,9 @@ puts ""
# Regression: boolean operation " general fuse" creates solid containing 5 not connected shells lying on the one level # Regression: boolean operation " general fuse" creates solid containing 5 not connected shells lying on the one level
################################################# #################################################
puts "TODO OCC29494 ALL: Error : is WRONG because number of WIRE entities"
puts "TODO OCC29494 ALL: Error : is WRONG because number of FACE entities"
restore [locate_data_file bug29488_shapes.brep] s restore [locate_data_file bug29488_shapes.brep] s
bclearobjects bclearobjects

View File

@ -0,0 +1,57 @@
puts "========"
puts "OCC29496"
puts "========"
puts ""
#################################################
# No intersection curve between faces if starting points are given
#################################################
restore [locate_data_file bug29488_shapes.brep] s
explode s shell
set i 1
explode s_2 f; copy s_2_27 f1
explode s_6 f; copy s_6_20 f2
bsection r$i f1 f2
checknbshapes r$i -vertex 2 -edge 1
checkprops r$i -l 2.14991
incr i
explode s_2 f; copy s_2_27 f1
explode s_7 f; copy s_7_8 f2
bsection r$i f1 f2
checknbshapes r$i -vertex 2 -edge 1
checkprops r$i -l 2.15901
incr i
explode s_3 f; copy s_3_27 f1
explode s_7 f; copy s_7_8 f2
bsection r$i f1 f2
checknbshapes r$i -vertex 2 -edge 1
checkprops r$i -l 2.15901
incr i
explode s_3 f; copy s_3_27 f1
explode s_6 f; copy s_6_16 f2
bsection r$i f1 f2
checknbshapes r$i -vertex 2 -edge 1
checkprops r$i -l 2.14991
incr i
explode s_2 f; copy s_2_26 f1
explode s_7 f; copy s_7_2 f2
bsection r$i f1 f2
checknbshapes r$i -vertex 2 -edge 1
checkprops r$i -l 2.22733
incr i
explode s_3 f; copy s_3_26 f1
explode s_7 f; copy s_7_2 f2
bsection r$i f1 f2
checknbshapes r$i -vertex 2 -edge 1
checkprops r$i -l 2.22733