-# Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+# Copyright (C) 2014-2023 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), model.selection("EDGE", "PartSet/OY"), 30)
Plane_6 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOZ"), model.selection("EDGE", "PartSet/OZ"), 30)
Partition_1_objects = [model.selection("SOLID", "Translation_1_1"), model.selection("FACE", "Plane_1"), model.selection("FACE", "Plane_2"), model.selection("FACE", "Plane_3")]
-Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, 20190506)
+Partition_1 = model.addPartition(Part_1_doc, Partition_1_objects, keepSubResults = True)
Filters = model.filters(Part_1_doc, [model.addFilter(name = "OppositeToEdge", exclude = True, args = [model.selection("EDGE", "Partition_1_1_7/Generated_Edge&Plane_2/Plane_2&Plane_1/Plane_1")])])
model.end()
# sub-result 0
SubResult = Partition_1.result().subResult(0).resultSubShapePair()[0]
exp = GeomAPI_ShapeExplorer(SubResult.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 2
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 3
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 6
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+assert(not exp.more())
# sub-result 1
SubResult = Partition_1.result().subResult(1).resultSubShapePair()[0]
exp = GeomAPI_ShapeExplorer(SubResult.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 2
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 3
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 4
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 6
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+assert(not exp.more())
# sub-result 2
SubResult = Partition_1.result().subResult(2).resultSubShapePair()[0]
# sub-result 4
SubResult = Partition_1.result().subResult(4).resultSubShapePair()[0]
exp = GeomAPI_ShapeExplorer(SubResult.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 2
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 3
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 5
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 6
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+assert(not exp.more())
# sub-result 5
SubResult = Partition_1.result().subResult(5).resultSubShapePair()[0]
# sub-result 6
SubResult = Partition_1.result().subResult(6).resultSubShapePair()[0]
exp = GeomAPI_ShapeExplorer(SubResult.shape(), GeomAPI_Shape.EDGE)
+# edges of face 1
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 2
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 3
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
Reference[model.selection(SubResult, exp.current())] = True; exp.next()
Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 4
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+# edges of face 5
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+# edges of face 6
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+Reference[model.selection(SubResult, exp.current())] = False; exp.next()
+Reference[model.selection(SubResult, exp.current())] = True; exp.next()
+assert(not exp.more())
# sub-result 7
SubResult = Partition_1.result().subResult(7).resultSubShapePair()[0]