mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0032502: Modeling Algorithms - BOP wrong result on sphere and cylinder
Modifications in the method IntPatch_ALineToWLine::MakeWLine: correct setting parameters to vertices on IntPatch_WLine curve.
This commit is contained in:
parent
b08cd044f9
commit
82c3a325e9
@ -676,7 +676,11 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
|||||||
IntPatch_Point aLVtx = theALine->Vertex(i);
|
IntPatch_Point aLVtx = theALine->Vertex(i);
|
||||||
aLVtx.SetValue(aVertP2S);
|
aLVtx.SetValue(aVertP2S);
|
||||||
aLVtx.SetTolerance(aVertToler);
|
aLVtx.SetTolerance(aVertToler);
|
||||||
aLVtx.SetParameter(aNewVertexParam);
|
Standard_Real aParam = aLVtx.ParameterOnLine();
|
||||||
|
if (Abs(aParam - theLPar) <= Precision::PConfusion()) //in the case of closed curve,
|
||||||
|
aLVtx.SetParameter(-1); //we don't know yet the number of points in the curve
|
||||||
|
else
|
||||||
|
aLVtx.SetParameter(aNewVertexParam);
|
||||||
aSeqVertex(++aNewVertID) = aLVtx;
|
aSeqVertex(++aNewVertID) = aLVtx;
|
||||||
hasVertexBeenChecked(i) = Standard_True;
|
hasVertexBeenChecked(i) = Standard_True;
|
||||||
isFound = Standard_True;
|
isFound = Standard_True;
|
||||||
@ -748,7 +752,9 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
|||||||
|
|
||||||
for(Standard_Integer i = aSeqVertex.Lower(); i <= aNewVertID; i++)
|
for(Standard_Integer i = aSeqVertex.Lower(); i <= aNewVertID; i++)
|
||||||
{
|
{
|
||||||
const IntPatch_Point& aVtx = aSeqVertex(i);
|
IntPatch_Point aVtx = aSeqVertex(i);
|
||||||
|
if (aVtx.ParameterOnLine() == -1) //in the case of closed curve,
|
||||||
|
aVtx.SetParameter (aWLine->NbPnts()); //we set the last parameter
|
||||||
aWLine->AddVertex(aVtx);
|
aWLine->AddVertex(aVtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -756,7 +762,7 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
|
|||||||
|
|
||||||
//the method ComputeVertexParameters can reduce the number of points in <aWLine>
|
//the method ComputeVertexParameters can reduce the number of points in <aWLine>
|
||||||
aWLine->ComputeVertexParameters(myTol3D);
|
aWLine->ComputeVertexParameters(myTol3D);
|
||||||
|
|
||||||
if (aWLine->NbPnts() > 1)
|
if (aWLine->NbPnts() > 1)
|
||||||
{
|
{
|
||||||
aWLine->EnablePurging(Standard_False);
|
aWLine->EnablePurging(Standard_False);
|
||||||
|
24
tests/bugs/modalg_7/bug32502
Normal file
24
tests/bugs/modalg_7/bug32502
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
puts "================================================="
|
||||||
|
puts "OCC32502: BOP wrong result on sphere and cylinder"
|
||||||
|
puts "================================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
psphere sph 10
|
||||||
|
plane pln 0 0 7 0 1 0 0 0 1
|
||||||
|
pcylinder cyl pln 3 40
|
||||||
|
ttranslate cyl 0 -20 0
|
||||||
|
|
||||||
|
bop sph cyl
|
||||||
|
bopfuse result
|
||||||
|
|
||||||
|
checkshape result
|
||||||
|
|
||||||
|
checknbshapes result -t -vertex 4 -edge 11 -wire 5 -face 5 -shell 1 -solid 1
|
||||||
|
|
||||||
|
set tolres [checkmaxtol result]
|
||||||
|
|
||||||
|
if { ${tolres} > 3.e-5} {
|
||||||
|
puts "Error: bad tolerance of result"
|
||||||
|
}
|
||||||
|
|
||||||
|
checkprops result -s 1750.1 -v 4947.2
|
Loading…
x
Reference in New Issue
Block a user