Looking for inverted edges among the neutral ones while checking the offset edges on validity (BRepOffset_MakeOffset_1::FindInvalidEdges).
Test cases for the issue.
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);
// 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);
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.
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
-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
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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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