mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0031611: Modeling Algorithms - BRepOffsetAPI_NormalProjection - can't build wire in 720 but it was possible in 691
BRepLib_MakeWire.cxx: in method BRepLib_BndBoxVertexSelector::Accept() accepting tolerance criterion is changed BRepLib_MakeWire.hxx: correctionof class field name bug31611: test case added
This commit is contained in:
parent
9a31c01064
commit
5d904c3454
@ -165,7 +165,7 @@ private:
|
|||||||
|
|
||||||
const TopTools_IndexedMapOfShape& myMapOfShape; //vertices
|
const TopTools_IndexedMapOfShape& myMapOfShape; //vertices
|
||||||
gp_Pnt myP;
|
gp_Pnt myP;
|
||||||
Standard_Real mySTol;
|
Standard_Real myTolP;
|
||||||
Standard_Integer myVInd;
|
Standard_Integer myVInd;
|
||||||
Bnd_Box myVBox;
|
Bnd_Box myVBox;
|
||||||
NCollection_List<Standard_Integer> myResultInd;
|
NCollection_List<Standard_Integer> myResultInd;
|
||||||
|
@ -155,8 +155,10 @@ Standard_Boolean BRepLib_MakeWire::BRepLib_BndBoxVertexSelector::
|
|||||||
Standard_Real aTolV = BRep_Tool::Tolerance(aV);
|
Standard_Real aTolV = BRep_Tool::Tolerance(aV);
|
||||||
|
|
||||||
Standard_Real aL = myP.SquareDistance(aVPnt);
|
Standard_Real aL = myP.SquareDistance(aVPnt);
|
||||||
|
Standard_Real aSTol = aTolV + myTolP;
|
||||||
|
aSTol *= aSTol;
|
||||||
|
|
||||||
if (aL < Max(aTolV*aTolV, mySTol))
|
if (aL <= aSTol)
|
||||||
{
|
{
|
||||||
myResultInd.Append(theObj);
|
myResultInd.Append(theObj);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
@ -176,7 +178,7 @@ void BRepLib_MakeWire::BRepLib_BndBoxVertexSelector::
|
|||||||
myP = theP;
|
myP = theP;
|
||||||
myVBox.Add(myP);
|
myVBox.Add(myP);
|
||||||
myVBox.Enlarge(theTol);
|
myVBox.Enlarge(theTol);
|
||||||
mySTol = theTol*theTol;
|
myTolP = theTol;
|
||||||
myVInd = theVInd;
|
myVInd = theVInd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
tests/bugs/modalg_7/bug31611
Normal file
13
tests/bugs/modalg_7/bug31611
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
puts "============================================================================================="
|
||||||
|
puts "OCC31611: BRepOffsetAPI_NormalProjection - can't build wire in 720 but it was possible in 691"
|
||||||
|
puts "============================================================================================="
|
||||||
|
|
||||||
|
restore [locate_data_file bug31611.brep] d
|
||||||
|
|
||||||
|
plane p 0 0 0 1 1 1 0
|
||||||
|
mkface f p -200 200 -200 200
|
||||||
|
nproject r d f
|
||||||
|
eval wire w -unsorted [explode r]
|
||||||
|
|
||||||
|
checknbshapes w -vertex 20 -edge 20 -wire 1
|
||||||
|
checkprops w -l 342.576
|
Loading…
x
Reference in New Issue
Block a user