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

0028473: Incorrect result of 3D offset operation in mode Complete, Join type Intersection (spike is created)

Looking for inverted edges among the neutral ones while checking the offset edges on validity (BRepOffset_MakeOffset_1::FindInvalidEdges).

Test cases for the issue.
This commit is contained in:
emv 2017-02-20 10:54:22 +03:00 committed by apv
parent 5c09f8e016
commit b672545674
11 changed files with 89 additions and 13 deletions

View File

@ -196,7 +196,6 @@ static
const TopTools_DataMapOfShapeListOfShape& theOEImages,
const TopTools_DataMapOfShapeListOfShape& theOEOrigins,
const TopTools_DataMapOfShapeListOfShape& theEdgesOrigins,
const TopTools_IndexedDataMapOfShapeListOfShape& theDMEF,
const TopTools_IndexedDataMapOfShapeListOfShape& theDMVE,
const TopTools_IndexedMapOfShape& theMEdges,
TopTools_MapOfShape& theMEInverted);
@ -1675,7 +1674,7 @@ void FindInvalidEdges(const TopoDS_Face& theF,
// check if the edge has been inverted
Standard_Boolean bInverted = !aNbE ? Standard_False :
CheckInverted(aEIm, aFOr, theOEImages, theOEOrigins,
theEdgesOrigins, aDMEF, aDMVE, aMEdges, theMEInverted);
theEdgesOrigins, aDMVE, aMEdges, theMEInverted);
//
if (!bInverted || !aNbVOr) {
theValidEdges.Add(aEIm);
@ -2162,16 +2161,11 @@ Standard_Boolean CheckInverted(const TopoDS_Edge& theEIm,
const TopTools_DataMapOfShapeListOfShape& theOEImages,
const TopTools_DataMapOfShapeListOfShape& theOEOrigins,
const TopTools_DataMapOfShapeListOfShape& theEdgesOrigins,
const TopTools_IndexedDataMapOfShapeListOfShape& theDMEF,
const TopTools_IndexedDataMapOfShapeListOfShape& theDMVE,
const TopTools_IndexedMapOfShape& theMEdges,
TopTools_MapOfShape& theMEInverted)
{
if (theDMEF.FindFromKey(theEIm).Extent() > 1) {
return Standard_False;
}
//
// it is necessary to compare the direction from first vertex
// It is necessary to compare the direction from first vertex
// to the last vertex on the original edge with the
// same direction on the new edge. If the directions
// will be different - the edge has been inverted.

View File

@ -15,7 +15,7 @@ if { [info exists test_image ] == 0 } {
proc OFFSETSHAPE {distance faces calcul type} {
global GlobFaces
set GlobFaces $faces
uplevel #0 explode s f
if {[llength $faces] > 0} {uplevel #0 explode s f}
uplevel #0 offsetparameter 1e-7 $calcul $type
uplevel #0 offsetload s $distance $faces
uplevel #0 offsetperform result

View File

@ -1,6 +1,5 @@
puts "TODO OCC27414 ALL: Error: The command cannot be built"
puts "TODO OCC27414 ALL: gives an empty result"
puts "TODO OCC27414 ALL: TEST INCOMPLETE"
puts "TODO OCC27414 ALL: Error : The volume of result shape is"
puts "TODO OCC27414 ALL: Error : The area of result shape is"
restore [locate_data_file bug26917_input.dom7742_trim1.brep] s

View File

@ -1,6 +1,5 @@
puts "TODO OCC27414 ALL: Error : The volume of result shape is"
puts "TODO OCC27414 ALL: Error : The area of result shape is"
puts "TODO OCC27414 ALL: is not equal to zero"
restore [locate_data_file bug26917_input.dom7742_trim2.brep] s

View File

@ -0,0 +1,10 @@
restore [locate_data_file bug28473_input.brep] s
OFFSETSHAPE 10 {} $calcul $type
checkprops result -v 1.57511e+008 -s 2.91387e+006
unifysamedom result_unif result
checknbshapes result_unif -face 19 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,10 @@
restore [locate_data_file bug28473_input.brep] s
OFFSETSHAPE 15 {} $calcul $type
checkprops result -v 1.72351e+008 -s 3.02233e+006
unifysamedom result_unif result
checknbshapes result_unif -face 19 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,10 @@
restore [locate_data_file bug28473_input.brep] s
OFFSETSHAPE 20 {} $calcul $type
checkprops result -v 1.87736e+008 -s 3.13198e+006
unifysamedom result_unif result
checknbshapes result_unif -face 19 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,10 @@
restore [locate_data_file bug28473_input_trim.brep] s
OFFSETSHAPE 10 {} $calcul $type
checkprops result -v 126000 -s 16200
unifysamedom result_unif result
checknbshapes result_unif -face 6 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,10 @@
restore [locate_data_file bug28473_input_trim.brep] s
OFFSETSHAPE 15 {} $calcul $type
checkprops result -v 224000 -s 23200
unifysamedom result_unif result
checknbshapes result_unif -face 6 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,10 @@
restore [locate_data_file bug28473_input_trim.brep] s
OFFSETSHAPE 20 {} $calcul $type
checkprops result -v 360000 -s 31400
unifysamedom result_unif result
checknbshapes result_unif -face 6 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png

View File

@ -0,0 +1,24 @@
restore [locate_data_file bug28473_input.brep] s
offsetparameter 1e-7 c i r
offsetload s 10
foreach f [explode s f] {
mksurface surf $f
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
if {$found == 0} {
continue
}
# set offset value for top faces only
if {abs($z + 1) < 1.e-7 } {
offsetonface $f 15
}
}
offsetperform result
checkprops result -v 1.62264e+008 -s 2.94663e+006
unifysamedom result_unif result
checknbshapes result_unif -face 25 -shell 1
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png