mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5d3ddec35d | ||
|
c726439750 | ||
|
08cecf39d5 |
@@ -647,6 +647,26 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
||||
{// Strictly equal!!!
|
||||
break;
|
||||
}
|
||||
else if (aParameter + aStep < theLPar)
|
||||
{
|
||||
// Prediction of the next point
|
||||
gp_Pnt aPnt3dNext;
|
||||
gp_Vec aTg;
|
||||
theALine->D1(aParameter + aStep, aPnt3dNext, aTg);
|
||||
Standard_Real anU1 = 0.0, aV1 = 0.0, anU2 = 0.0, aV2 = 0.0;
|
||||
myQuad1.Parameters(aPnt3dNext, anU1, aV1);
|
||||
myQuad2.Parameters(aPnt3dNext, anU2, aV2);
|
||||
IntSurf_PntOn2S aPOn2SNext;
|
||||
aPOn2SNext.SetValue(aPnt3dNext, anU1, aV1, anU2, aV2);
|
||||
|
||||
if (aPOn2SNext.ValueOnSurface(0).SquareDistance(aRPT.ValueOnSurface(0)) > M_PI * M_PI ||
|
||||
aPOn2SNext.ValueOnSurface(1).SquareDistance(aRPT.ValueOnSurface(1)) > M_PI * M_PI)
|
||||
{
|
||||
aPrevLPoint = aRPT;
|
||||
aPrevParam = aParameter;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aPrePointExist = IntPatch_SPntNone;
|
||||
|
@@ -827,6 +827,16 @@ Standard_Boolean IntPatch_SpecialPoints::
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
if (theQSurf->GetType() == GeomAbs_Cone && thePSurf->GetType() == GeomAbs_Torus)
|
||||
{
|
||||
const gp_Pnt anApex = theQSurf->Cone().Apex();
|
||||
Standard_Real aSqDist = anApex.SquareDistance(aPQuad);
|
||||
if (aSqDist < aTol * aTol)
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
|
||||
//Pole is an intersection point
|
||||
//(lies in the quadric and the parametric surface)
|
||||
|
||||
|
@@ -1728,7 +1728,6 @@ static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL,
|
||||
{
|
||||
Standard_Real aFirstp, aLastp;
|
||||
Standard_Integer aNbVtx = theWL->NbVertex();
|
||||
Standard_Boolean isNeedSkip = Standard_True;
|
||||
|
||||
for (Standard_Integer i = 1; i < aNbVtx; i++) {
|
||||
aFirstp = theWL->Vertex (i).ParameterOnLine();
|
||||
@@ -1739,14 +1738,13 @@ static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL,
|
||||
const IntSurf_PntOn2S& aPmid = theWL->Point (pmid);
|
||||
aPmid.Parameters (aU1, aV1, aU2, aV2);
|
||||
|
||||
if (!IsOutOfDomain (theBoxS1, theBoxS2, aPmid, theArrPeriods))
|
||||
if (IsOutOfDomain (theBoxS1, theBoxS2, aPmid, theArrPeriods))
|
||||
{
|
||||
isNeedSkip = Standard_False;
|
||||
break;
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
|
||||
return isNeedSkip;
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
12
tests/bugs/modalg_8/bug33541
Normal file
12
tests/bugs/modalg_8/bug33541
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "================================"
|
||||
puts "0033541: Modeling Algorithms - Simple sphere cut from cylinder fails"
|
||||
puts "================================"
|
||||
puts ""
|
||||
|
||||
pcylinder c 1 1
|
||||
psphere s 1
|
||||
ttranslate s 1 1 1
|
||||
bcut result c s
|
||||
|
||||
checknbshapes result -vertex 3 -edge 5 -wire 4 -face 4
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
22
tests/bugs/modalg_8/bug33615
Normal file
22
tests/bugs/modalg_8/bug33615
Normal file
@@ -0,0 +1,22 @@
|
||||
puts "================================"
|
||||
puts "0033615: Modeling Algorithms - Partition algorithm creates unexpected vertices"
|
||||
puts "================================"
|
||||
puts ""
|
||||
|
||||
plane plane -5 0 4 -1 0 0
|
||||
pcone cone plane 3 1 10
|
||||
pcylinder cylinder 10 20
|
||||
explode cylinder f
|
||||
explode cone f
|
||||
|
||||
don cylinder_1 cone_1
|
||||
axo;fit
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects cone_1
|
||||
baddtools cylinder_1
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checknbshapes result -vertex 5 -edge 8 -wire 5 -face 4
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
15
tests/bugs/modalg_8/bug33639_1
Normal file
15
tests/bugs/modalg_8/bug33639_1
Normal file
@@ -0,0 +1,15 @@
|
||||
puts "================================"
|
||||
puts " 0033639: Modeling Algorithms - Boolean torus cut cone incorrect"
|
||||
puts "================================"
|
||||
puts ""
|
||||
|
||||
ptorus t 750 250 360
|
||||
pcone c 200 0 2000
|
||||
|
||||
trotate c 0 0 0 1 0 0 90
|
||||
ttranslate c 0 1000 0
|
||||
|
||||
bcut result t c
|
||||
|
||||
checknbshapes result -vertex 8 -edge 13 -wire 5 -face 3
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
16
tests/bugs/modalg_8/bug33639_2
Normal file
16
tests/bugs/modalg_8/bug33639_2
Normal file
@@ -0,0 +1,16 @@
|
||||
puts "================================"
|
||||
puts " 0033639: Modeling Algorithms - Boolean torus cut cone incorrect"
|
||||
puts "================================"
|
||||
puts ""
|
||||
|
||||
ptorus t 750 250 360
|
||||
pcone c 500 0 2000
|
||||
|
||||
trotate c 0 0 0 1 0 0 90
|
||||
ttranslate c 0 1000 0
|
||||
trotate c 0 -1000 0 1 0 0 45
|
||||
|
||||
bcut result t c
|
||||
|
||||
checknbshapes result -vertex 4 -edge 7 -wire 3 -face 2
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
12
tests/bugs/modalg_8/bug33702
Normal file
12
tests/bugs/modalg_8/bug33702
Normal file
@@ -0,0 +1,12 @@
|
||||
puts "================================"
|
||||
puts "0033702: Modeling Algorithms - Regression: Intersection curve is not built between cone and cylinder"
|
||||
puts "================================"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug33702_ext.brep] ext
|
||||
restore [locate_data_file bug33702_rev.brep] rev
|
||||
|
||||
bcut result ext rev
|
||||
|
||||
checknbshapes result -vertex 51 -edge 75 -wire 42 -face 30
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
@@ -17,7 +17,7 @@ fit
|
||||
|
||||
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv
|
||||
|
||||
if { ${Toler} > 0.0004} {
|
||||
if { ${Toler} > 0.002} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
|
@@ -55,6 +55,6 @@ fit
|
||||
checksection result -r 0
|
||||
checkmaxtol result -min_tol 2.0e-7
|
||||
|
||||
checknbshapes result -edge 3 -vertex 3
|
||||
checknbshapes result -edge 2 -vertex 2
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
||||
|
Reference in New Issue
Block a user