// 3. ts1 == ts2 == 0 <Param-Param>
// Geom - Geom
- const Standard_Boolean RestrictLine = Standard_True;
if(ts1 == ts2 && ts1 == 1)
{
IntSurf_ListOfPntOn2S ListOfPnts;
ListOfPnts.Clear();
if(isGeomInt)
{
- GeomGeomPerfom( theS1, theD1, theS2, theD2, TolArc,
- TolTang, ListOfPnts, RestrictLine,
- typs1, typs2, theIsReqToKeepRLine);
+ GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
+ ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
}
else
{
ParamParamPerfom(theS1, theD1, theS2, theD2,
- TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+ TolArc, TolTang, ListOfPnts, typs1, typs2);
}
}
ListOfPnts.Clear();
ParamParamPerfom(theS1, theD1, theS2, theD2, TolArc,
- TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+ TolTang, ListOfPnts, typs1, typs2);
}
if(!theIsReqToPostWLProc)
continue;
Handle(IntPatch_WLine) aRW =
- IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine);
+ IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
if(aRW.IsNull())
continue;
const Standard_Real TolArc,
const Standard_Real TolTang,
IntSurf_ListOfPntOn2S& ListOfPnts,
- const Standard_Boolean RestrictLine,
const Standard_Boolean isGeomInt,
const Standard_Boolean theIsReqToKeepRLine,
const Standard_Boolean theIsReqToPostWLProc)
if(!isGeomInt)
{
ParamParamPerfom(theS1, theD1, theS2, theD2,
- TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+ TolArc, TolTang, ListOfPnts, typs1, typs2);
}
else if(ts1 != ts2)
{
else if (ts1 == 0)
{
ParamParamPerfom(theS1, theD1, theS2, theD2,
- TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+ TolArc, TolTang, ListOfPnts, typs1, typs2);
}
else if(ts1 == 1)
{
- GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc,
- TolTang, ListOfPnts, RestrictLine, typs1, typs2, theIsReqToKeepRLine);
+ GeomGeomPerfom(theS1, theD1, theS2, theD2, TolArc, TolTang,
+ ListOfPnts, typs1, typs2, theIsReqToKeepRLine);
}
if(!theIsReqToPostWLProc)
continue;
Handle(IntPatch_WLine) aRW =
- IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2, RestrictLine);
+ IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
if(aRW.IsNull())
continue;
const Standard_Real TolArc,
const Standard_Real TolTang,
IntSurf_ListOfPntOn2S& ListOfPnts,
- const Standard_Boolean RestrictLine,
const GeomAbs_SurfaceType typs1,
const GeomAbs_SurfaceType typs2)
{
Standard_Boolean ClearFlag = Standard_True;
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;
}
- 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()))
{
const Standard_Real TolArc,
const Standard_Real TolTang,
IntSurf_ListOfPntOn2S& ListOfPnts,
- const Standard_Boolean RestrictLine,
const GeomAbs_SurfaceType theTyps1,
const GeomAbs_SurfaceType theTyps2,
const Standard_Boolean theIsReqToKeepRLine)
{
done = Standard_False;
ParamParamPerfom(theS1, theD1, theS2, theD2,
- TolArc, TolTang, ListOfPnts, RestrictLine, theTyps1, theTyps2);
+ TolArc, TolTang, ListOfPnts, theTyps1, theTyps2);
return;
}
continue;
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())
continue;
//!
//! UVMaxStep is a parameter used in the walking
//! 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);
- //! Flag theIsReqToKeepRLine has been enterred only for
+ //! Flag theIsReqToKeepRLine has been entered only for
//! compatibility with TopOpeBRep package. It shall be deleted
//! after deleting TopOpeBRep.
//! When intersection result returns IntPatch_RLine and another
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
//! 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
//! after deleting TopOpeBRep.
//! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
//! If isGeomInt == Standard_False, then method
//! 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
//! after deleting TopOpeBRep.
//! When intersection result returns IntPatch_RLine and another
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
//! 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
//! after deleting TopOpeBRep.
//! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
- //! obtained after intersection algorithm directly (wothout 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);
+ //! 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 isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
//! 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);
//! 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);
- //! Returns True if the calculus was succesfull.
+ //! Returns True if the calculus was successful.
Standard_Boolean IsDone() const;
//! Returns true if the is no intersection.
Standard_Boolean IsEmpty() const;
//! 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.
Standard_Boolean TangentFaces() const;
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
//! after deleting TopOpeBRep.
//! When intersection result returns IntPatch_RLine and another
//! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
//! 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);
const Standard_Real Epsilon,
const Standard_Real Deflection,
const Standard_Real Increment,
- IntSurf_ListOfPntOn2S& LOfPnts,
- const Standard_Boolean RestrictLine)
+ IntSurf_ListOfPntOn2S& LOfPnts)
{
if (LOfPnts.IsEmpty()){
done = Standard_True;
Standard_Real TolTang = TolTangency;
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>
- IntPatch_RstInt::PutVertexOnLine(wline,Surf1,D1,Surf2,Standard_True,TolTang);
- if (wline->NbPnts() < 2)
- continue;
- IntPatch_RstInt::PutVertexOnLine(wline,Surf2,D2,Surf1,Standard_False,TolTang);
- if (wline->NbPnts() < 2)
- continue;
- }
+ //the method PutVertexOnLine can reduce the number of points in <wline>
+ IntPatch_RstInt::PutVertexOnLine(wline, Surf1, D1, Surf2, Standard_True, TolTang);
+ if (wline->NbPnts() < 2)
+ continue;
+ IntPatch_RstInt::PutVertexOnLine(wline, Surf2, D2, Surf1, Standard_False, TolTang);
+ if (wline->NbPnts() < 2)
+ continue;
if(wline->NbVertex() == 0) {
IntPatch_Point vtx;
//! Performs the intersection between <Caro1> and
//! <Caro2>. The method computes the polyhedron on
//! 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
//! <Caro2>. The method computes the polyhedron on
const Handle(Adaptor3d_HSurface) &theS1,
const Handle(Adaptor3d_HSurface) &theS2,
const Handle(Adaptor3d_TopolTool) &theDom1,
- const Handle(Adaptor3d_TopolTool) &theDom2,
- const Standard_Boolean theRestrictLine)
+ const Handle(Adaptor3d_TopolTool) &theDom2)
{
Standard_Integer i, k, v, nb, nbvtx;
Handle(IntPatch_WLine) aResult;
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.
Handle(IntPatch_WLine) aLocalWLineTube =
//!
//! II
//! Removes point out of borders in case of non periodic surfaces.
- //! This step is done only if theRestrictLine is true.
//!
//! III
//! Removes exceed points using tube criteria:
const Handle(Adaptor3d_HSurface) &theS1,
const Handle(Adaptor3d_HSurface) &theS2,
const Handle(Adaptor3d_TopolTool) &theDom1,
- const Handle(Adaptor3d_TopolTool) &theDom2,
- const Standard_Boolean theRestrictLine);
+ const Handle(Adaptor3d_TopolTool) &theDom2);
//! 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:
void IntTools_FaceFace::Perform(const TopoDS_Face& aF1,
const TopoDS_Face& aF2)
{
- Standard_Boolean RestrictLine = Standard_False;
-
if (myContext.IsNull()) {
myContext=new IntTools_Context;
}
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) &&
(aType1 != GeomAbs_BezierSurface) &&
(aType1 != GeomAbs_OtherSurface) &&
(aType2 != GeomAbs_BezierSurface) &&
(aType2 != GeomAbs_OtherSurface))
{
- RestrictLine = Standard_True;
-
if ((aType1 == GeomAbs_Torus) ||
(aType2 == GeomAbs_Torus))
{
}
}
- //
- 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
if(!myListOfPnts.IsEmpty()) {
char aBuff[10000];
myIntersector.Perform(myHS1, dom1, TolArc, TolTang);
else
myIntersector.Perform(myHS1, dom1, myHS2, dom2, TolArc, TolTang,
- myListOfPnts, RestrictLine, isGeomInt);
+ myListOfPnts, isGeomInt);
myIsDone = myIntersector.IsDone();
return;
}
//
- if(RestrictLine) {
- myListOfPnts.Clear(); // to use LineConstructor
- }
- //
const Standard_Integer aNbLinIntersector = myIntersector.NbLines();
for (Standard_Integer i=1; i <= aNbLinIntersector; ++i) {
MakeCurve(i, dom1, dom2, TolArc);
# 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
bclearobjects
--- /dev/null
+puts "========"
+puts "OCC29496"
+puts "========"
+puts ""
+#################################################
+# No intersection curve between faces if starting points are given
+#################################################
+
+restore [locate_data_file bug29496_OuterBox.brep] a
+restore [locate_data_file bug29496_Surface_0.brep] s0
+restore [locate_data_file bug29496_Surface_1.brep] s1
+restore [locate_data_file bug29496_Surface_2.brep] s2
+restore [locate_data_file bug29496_Surface_3.brep] s3
+restore [locate_data_file bug29496_Surface_4.brep] s4
+restore [locate_data_file bug29496_Surface_5.brep] s5
+
+set i 1
+
+explode s0 f; copy s0_27 f1
+explode s4 f; copy s4_20 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.14991
+
+incr i
+
+explode s0 f; copy s0_27 f1
+explode s5 f; copy s5_8 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.15901
+
+incr i
+
+explode s1 f; copy s1_27 f1
+explode s5 f; copy s5_8 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.15901
+
+incr i
+
+explode s1 f; copy s1_27 f1
+explode s4 f; copy s4_16 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.14991
+
+incr i
+
+explode s0 f; copy s0_26 f1
+explode s5 f; copy s5_2 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.22733
+
+incr i
+
+explode s1 f; copy s1_26 f1
+explode s5 f; copy s5_2 f2
+bsection r$i f1 f2
+checknbshapes r$i -vertex 2 -edge 1
+checkprops r$i -l 2.22733