Salome HOME
[bos #40619][CEA] Add Fuzzy parameter to partition and boolean operators
[modules/geom.git] / src / GEOM_SWIG / geomBuilder.py
index e80d9f60ac9c4f6121570b9c8e8174b7436b05f4..d1fee65e2e92f46ba3aa3e2c2dbec1f056585727 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -260,6 +260,9 @@ import os
 import functools
 
 from salome.geom.gsketcher import Sketcher3D, Sketcher2D, Polyline2D
+from salome.geom.canonicalrecognition import CanonicalRecognition
+from salome.geom.conformity import CheckConformity
+from salome.geom.proximity import ShapeProximity
 
 # In case the omniORBpy EnumItem class does not fully support Python 3
 # (for instance in version 4.2.1-2), the comparison ordering methods must be
@@ -680,10 +683,14 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #
         #  - CIRCLE:       [xc yc zc  dx dy dz  R]
         #  - ARC_CIRCLE:   [xc yc zc  dx dy dz  R         x1 y1 z1  x2 y2 z2]
-        #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2]
-        #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2]
+        #  - ELLIPSE:      [xc yc zc  dx dy dz  R_1  R_2  v1x v1y v1z  v2x v2y v2z]
+        #  - ARC_ELLIPSE:  [xc yc zc  dx dy dz  R_1  R_2  x1 y1 z1  x2 y2 z2  v1x v1y v1z  v2x v2y v2z]
         #  - LINE:         [xo yo zo  dx dy dz]
         #  - SEGMENT:      [x1 y1 z1  x2 y2 z2]
+        #  - CRV_BSPLINE:  [periodicity degree nb_poles nb_knots nb_weights nb_multiplicities  xi yi zi  ki  wi  mi]
+        #  - CRV_BEZIER:   [nb_poles nb_weights  xi yi zi  wi]
+        #  - HYPERBOLA:    [xc yc zc  dx dy dz  R_1  R_2  v1x v1y v1z  v2x v2y v2z]
+        #  - PARABOLA:     [xc yc zc  dx dy dz  F  v1x v1y v1z  v2x v2y v2z]
         #  - EDGE:                                                 [nb_vertices]
         #
         #  - VERTEX:       [x  y  z]
@@ -7755,6 +7762,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -7768,7 +7778,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #
         #  @ref tui_fuse "Example"
         @ManageTransactions("BoolOp")
-        def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None):
+        def MakeBoolean(self, theShape1, theShape2, theOperation, checkSelfInte=False, theName=None, theFuzzyParam=-1):
             """
             Perform one of boolean operations on two given shapes.
 
@@ -7783,6 +7793,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -7797,7 +7810,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 New GEOM.GEOM_Object, containing the result shape.
             """
             # Example: see GEOM_TestAll.py
-            anObj = self.BoolOp.MakeBoolean(theShape1, theShape2, theOperation, checkSelfInte)
+            anObj = self.BoolOp.MakeBooleanWithFuzzy(theShape1, theShape2, theOperation, checkSelfInte, theFuzzyParam)
             RaiseIfFailed("MakeBoolean", self.BoolOp)
             def_names = { 1: "common", 2: "cut", 3: "fuse", 4: "section" }
             self._autoPublish(anObj, theName, def_names[theOperation])
@@ -7811,6 +7824,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -7824,7 +7840,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #
         #  @ref tui_common "Example 1"
         #  \n @ref swig_MakeCommon "Example 2"
-        def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None):
+        def MakeCommon(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
             """
             Perform Common boolean operation on two given shapes.
 
@@ -7837,6 +7853,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -7852,7 +7871,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             """
             # Example: see GEOM_TestOthers.py
             # note: auto-publishing is done in self.MakeBoolean()
-            return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName)
+            return self.MakeBoolean(theShape1, theShape2, 1, checkSelfInte, theName, theFuzzyParam)
 
         ## Perform Cut boolean operation on two given shapes.
         #  @param theShape1 First argument for boolean operation.
@@ -7862,6 +7881,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -7875,7 +7897,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #
         #  @ref tui_cut "Example 1"
         #  \n @ref swig_MakeCommon "Example 2"
-        def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None):
+        def MakeCut(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
             """
             Perform Cut boolean operation on two given shapes.
 
@@ -7888,6 +7910,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -7904,7 +7929,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             """
             # Example: see GEOM_TestOthers.py
             # note: auto-publishing is done in self.MakeBoolean()
-            return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName)
+            return self.MakeBoolean(theShape1, theShape2, 2, checkSelfInte, theName, theFuzzyParam)
 
         ## Perform Fuse boolean operation on two given shapes.
         #  @param theShape1 First argument for boolean operation.
@@ -7916,6 +7941,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -7931,7 +7959,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  \n @ref swig_MakeCommon "Example 2"
         @ManageTransactions("BoolOp")
         def MakeFuse(self, theShape1, theShape2, checkSelfInte=False,
-                     rmExtraEdges=False, theName=None):
+                     rmExtraEdges=False, theName=None, theFuzzyParam=-1):
             """
             Perform Fuse boolean operation on two given shapes.
 
@@ -7946,6 +7974,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -7961,8 +7992,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
 
             """
             # Example: see GEOM_TestOthers.py
-            anObj = self.BoolOp.MakeFuse(theShape1, theShape2,
-                                         checkSelfInte, rmExtraEdges)
+            anObj = self.BoolOp.MakeFuseWithFuzzy(theShape1, theShape2, checkSelfInte,
+                                                  rmExtraEdges, theFuzzyParam)
             RaiseIfFailed("MakeFuse", self.BoolOp)
             self._autoPublish(anObj, theName, "fuse")
             return anObj
@@ -7976,11 +8007,14 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #  @return New GEOM.GEOM_Object, containing the result shape.
         #
         #  @ref tui_section "Example 1"
         #  \n @ref swig_MakeCommon "Example 2"
-        def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None):
+        def MakeSection(self, theShape1, theShape2, checkSelfInte=False, theName=None, theFuzzyParam=-1):
             """
             Perform Section boolean operation on two given shapes.
 
@@ -7993,13 +8027,16 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
             Returns:
                 New GEOM.GEOM_Object, containing the result shape.
 
             """
             # Example: see GEOM_TestOthers.py
             # note: auto-publishing is done in self.MakeBoolean()
-            return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName)
+            return self.MakeBoolean(theShape1, theShape2, 4, checkSelfInte, theName, theFuzzyParam)
 
         ## Perform Fuse boolean operation on the list of shapes.
         #  @param theShapesList Shapes to be fused.
@@ -8010,6 +8047,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -8025,7 +8065,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  \n @ref swig_MakeCommon "Example 2"
         @ManageTransactions("BoolOp")
         def MakeFuseList(self, theShapesList, checkSelfInte=False,
-                         rmExtraEdges=False, theName=None):
+                         rmExtraEdges=False, theName=None, theFuzzyParam=-1):
             """
             Perform Fuse boolean operation on the list of shapes.
 
@@ -8039,6 +8079,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -8054,8 +8097,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
 
             """
             # Example: see GEOM_TestOthers.py
-            anObj = self.BoolOp.MakeFuseList(theShapesList, checkSelfInte,
-                                             rmExtraEdges)
+            anObj = self.BoolOp.MakeFuseListWithFuzzy(theShapesList, checkSelfInte,
+                                                      rmExtraEdges, theFuzzyParam)
             RaiseIfFailed("MakeFuseList", self.BoolOp)
             self._autoPublish(anObj, theName, "fuse")
             return anObj
@@ -8067,6 +8110,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -8081,7 +8127,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @ref tui_common "Example 1"
         #  \n @ref swig_MakeCommon "Example 2"
         @ManageTransactions("BoolOp")
-        def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None):
+        def MakeCommonList(self, theShapesList, checkSelfInte=False, theName=None, theFuzzyParam=-1):
             """
             Perform Common boolean operation on the list of shapes.
 
@@ -8093,6 +8139,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -8108,7 +8157,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
 
             """
             # Example: see GEOM_TestOthers.py
-            anObj = self.BoolOp.MakeCommonList(theShapesList, checkSelfInte)
+            anObj = self.BoolOp.MakeCommonListWithFuzzy(theShapesList, checkSelfInte, theFuzzyParam)
             RaiseIfFailed("MakeCommonList", self.BoolOp)
             self._autoPublish(anObj, theName, "common")
             return anObj
@@ -8121,6 +8170,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the boolean
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the boolean operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -8135,7 +8187,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @ref tui_cut "Example 1"
         #  \n @ref swig_MakeCommon "Example 2"
         @ManageTransactions("BoolOp")
-        def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None):
+        def MakeCutList(self, theMainShape, theShapesList, checkSelfInte=False, theName=None, theFuzzyParam=-1):
             """
             Perform Cut boolean operation on one object and the list of tools.
 
@@ -8148,6 +8200,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
+                theFuzzyParam The fuzzy parameter to be used for the boolean operation.
+                              If the value is not positive, no fuzzy tolerance will be
+                              considered for the boolean operation.
 
             Note:
                     This algorithm doesn't find all types of self-intersections.
@@ -8163,7 +8218,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
 
             """
             # Example: see GEOM_TestOthers.py
-            anObj = self.BoolOp.MakeCutList(theMainShape, theShapesList, checkSelfInte)
+            anObj = self.BoolOp.MakeCutListWithFuzzy(theMainShape, theShapesList, checkSelfInte, theFuzzyParam)
             RaiseIfFailed("MakeCutList", self.BoolOp)
             self._autoPublish(anObj, theName, "cut")
             return anObj
@@ -8184,10 +8239,12 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #                             target type (equal to Limit) are kept in the result,
         #                             else standalone shapes of lower dimension
         #                             are kept also (if they exist).
-        #
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the partition
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the partition operation.
         #
         #  @note Each compound from ListShapes and ListTools will be exploded
         #        in order to avoid possible intersection between shapes from this compound.
@@ -8209,7 +8266,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         @ManageTransactions("BoolOp")
         def MakePartition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
                           Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
-                          KeepNonlimitShapes=0, theName=None):
+                          KeepNonlimitShapes=0, theName=None, theFuzzyParam=-1):
             """
             Perform partition operation.
 
@@ -8254,10 +8311,10 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
                 Limit = EnumToLong(lim)
                 pass
-            anObj = self.BoolOp.MakePartition(ListShapes, ListTools,
-                                              ListKeepInside, ListRemoveInside,
-                                              Limit, RemoveWebs, ListMaterials,
-                                              KeepNonlimitShapes);
+            anObj = self.BoolOp.MakePartitionWithFuzzy(ListShapes, ListTools,
+                                                       ListKeepInside, ListRemoveInside,
+                                                       Limit, RemoveWebs, ListMaterials,
+                                                       KeepNonlimitShapes, theFuzzyParam)
             RaiseIfFailed("MakePartition", self.BoolOp)
             self._autoPublish(anObj, theName, "partition")
             return anObj
@@ -8271,6 +8328,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  One additional parameter is provided:
         #  @param checkSelfInte The flag that tells if the arguments should
         #         be checked for self-intersection prior to the operation.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the partition
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the partition operation.
         #
         #  @note This algorithm doesn't find all types of self-intersections.
         #        It is tuned to detect vertex/vertex, vertex/edge, edge/edge,
@@ -8291,7 +8351,8 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                                                  ListKeepInside=[], ListRemoveInside=[],
                                                  Limit=ShapeType["AUTO"], RemoveWebs=0,
                                                  ListMaterials=[], KeepNonlimitShapes=0,
-                                                 checkSelfInte=False, theName=None):
+                                                 checkSelfInte=False, theName=None,
+                                                 theFuzzyParam=-1):
             """
             Perform partition operation.
             This method may be useful if it is needed to make a partition for
@@ -8327,10 +8388,11 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 for s in ListShapes: lim = min(lim, s.GetMaxShapeType())
                 Limit = EnumToLong(lim)
                 pass
-            anObj = self.BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools,
-                                                                     ListKeepInside, ListRemoveInside,
-                                                                     Limit, RemoveWebs, ListMaterials,
-                                                                     KeepNonlimitShapes, checkSelfInte);
+            anObj = self.BoolOp.MakePartitionNonSelfIntersectedShapeWithFuzzy(ListShapes, ListTools,
+                                                                              ListKeepInside, ListRemoveInside,
+                                                                              Limit, RemoveWebs, ListMaterials,
+                                                                              KeepNonlimitShapes, checkSelfInte,
+                                                                              theFuzzyParam)
             RaiseIfFailed("MakePartitionNonSelfIntersectedShape", self.BoolOp)
             self._autoPublish(anObj, theName, "partition")
             return anObj
@@ -8341,7 +8403,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  \n @ref swig_Partition "Example 2"
         def Partition(self, ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
                       Limit=ShapeType["AUTO"], RemoveWebs=0, ListMaterials=[],
-                      KeepNonlimitShapes=0, theName=None):
+                      KeepNonlimitShapes=0, theName=None, theFuzzyParam=-1):
             """
             See method geompy.MakePartition for more information.
             """
@@ -8350,7 +8412,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             anObj = self.MakePartition(ListShapes, ListTools,
                                        ListKeepInside, ListRemoveInside,
                                        Limit, RemoveWebs, ListMaterials,
-                                       KeepNonlimitShapes, theName);
+                                       KeepNonlimitShapes, theName, theFuzzyParam)
             return anObj
 
         ## Perform partition of the Shape with the Plane
@@ -8359,6 +8421,9 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
+        #  @param theFuzzyParam The fuzzy parameter to be used for the partition
+        #         operation. If the value is not positive, no fuzzy tolerance will
+        #         be considered for the partition operation.
         #
         #  @return New GEOM.GEOM_Object, containing the result shape.
         #
@@ -8381,7 +8446,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
         #
         #  @ref tui_partition "Example"
         @ManageTransactions("BoolOp")
-        def MakeHalfPartition(self, theShape, thePlane, theName=None):
+        def MakeHalfPartition(self, theShape, thePlane, theName=None, theFuzzyParam=-1):
             """
             Perform partition of the Shape with the Plane
 
@@ -8408,7 +8473,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
               Result = geompy.MakePartition([Object], [Plane])
             """
             # Example: see GEOM_TestAll.py
-            anObj = self.BoolOp.MakeHalfPartition(theShape, thePlane)
+            anObj = self.BoolOp.MakeHalfPartitionWithFuzzy(theShape, thePlane, theFuzzyParam)
             RaiseIfFailed("MakeHalfPartition", self.BoolOp)
             self._autoPublish(anObj, theName, "partition")
             return anObj
@@ -11229,6 +11294,74 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
                 self._autoPublish(aVec, theName, "curvature")
             return aVec
 
+        ## Convert X,Y,Z points coordinates to UV parameters on the given surface.
+        #  @param theSurf the given face. It can be also a shell or a compound with one face.
+        #  @param theXYZlist float list of size 3*N where N is the number of points
+        #                    for which we want their U,V coordinates.
+        #                    If the user enters a list of size not divisible by 3
+        #                    an exception will be thrown.
+        #  @param theIsNormalized if True, the returned parameters will be in range [0, 1].
+        #
+        #  @return list of float of size 2*N.
+        #
+        #  @ref tui_xyz_to_uv_page "Example"
+        @ManageTransactions("MeasuOp")
+        def XYZtoUV(self, theSurf, theXYZlist, theIsNormalized = True):
+            """
+            Convert X,Y,Z points coordinates to UV parameters on the given surface.
+
+            Parameters:
+                theSurf the given face. It can be also a shell or a compound with one face.
+                theXYZlist float list of size 3*N where N is the number of points
+                           for which we want their U,V coordinates.
+                           If the user enters a list of size not divisible by 3
+                           an exception will be thrown.
+                theIsNormalized if True, the returned parameters will be in range [0, 1].
+
+            Returns:
+                list of float of size 2*N.
+
+            Example of usage:
+                [u1,v1, u2,v2] = geompy.XYZtoUV(Face_1, [0,0,0, 0,10,10])
+            """
+            aUVlist = self.MeasuOp.XYZtoUV(theSurf, theXYZlist, theIsNormalized)
+            RaiseIfFailed("XYZtoUV", self.MeasuOp)
+            return aUVlist
+
+        ## Convert UV parameters on the given surface to 3D points coordinates.
+        #  @param theSurf the given face. It can be also a shell or a compound with one face.
+        #  @param theUVlist float list of size 2*N where N is the number of points
+        #                   for which we want their X,Y,Z coordinates.
+        #                   If the user enters a list of non-even size
+        #                   an exception will be thrown.
+        #  @param theIsNormalized if True, the input parameters are expected to be in range [0, 1].
+        #
+        #  @return list of float of size 3*N.
+        #
+        #  @ref tui_xyz_to_uv_page "Example"
+        @ManageTransactions("MeasuOp")
+        def UVtoXYZ(self, theSurf, theUVlist, theIsNormalized = True):
+            """
+            Convert UV parameters on the given surface to 3D points coordinates.
+
+            Parameters:
+                theSurf the given face. It can be also a shell or a compound with one face.
+                theUVlist float list of size 2*N where N is the number of points
+                          for which we want their X,Y,Z coordinates.
+                          If the user enters a list of non-even size
+                          an exception will be thrown.
+                theIsNormalized if True, the input parameters are expected to be in range [0, 1].
+
+            Returns:
+                list of float of size 3*N.
+
+            Example of usage:
+                [x1,y1,z1, x2,y2,z2] = geompy.UVtoXYZ(Face_1, [0,0, 10,10])
+            """
+            aXYZlist = self.MeasuOp.UVtoXYZ(theSurf, theUVlist, theIsNormalized)
+            RaiseIfFailed("UVtoXYZ", self.MeasuOp)
+            return aXYZlist
+
         ## Get min and max tolerances of sub-shapes of theShape
         #  @param theShape Shape, to get tolerances of.
         #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]\n
@@ -11781,6 +11914,10 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             #if aKind == kind.SOME_KIND:
             #    #  SOME_KIND     int int double int double double
             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
+            if aKind == self.kind.CRV_BSPLINE:
+               aKindTuple = [aKind] + anInts[:6] + aDbls + anInts[6:]
+            elif aKind == self.kind.CRV_BEZIER:
+               aKindTuple = [aKind] + anInts[:2] + aDbls + anInts[2:]
 
             return aKindTuple
 
@@ -11839,6 +11976,22 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             aDescr = self.MeasuOp.IsGoodForSolid(theShell)
             return aDescr
 
+        ## Obtain a canonical recognition interface.
+        #  @return An instance of
+        #          @ref canonicalrecognition.CanonicalRecognition "CanonicalRecognition" interface
+        #
+        #  @ref tui_3dsketcher_page "Example"
+        def CanonicalRecognition (self):
+            """
+            Obtain a canonical recognition interface.
+
+            Example of usage:
+                cr = geompy.CanonicalRecognition()
+                cr.isLine(aLine, tolerance)
+            """
+            cr = CanonicalRecognition (self)
+            return cr
+
         # end of l2_measure
         ## @}
 
@@ -14019,6 +14172,40 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             RaiseIfFailed("Tesselate", self.TestOp)
             return r
 
+        ## Obtain a shape checker
+        #  @return An instance of @ref conformity.CheckConformity "CheckConformity" interface
+        #
+        #  @ref tui_conformity_page "Example"
+        def CheckConformity (self, shape):
+            """
+            Obtain a shape checker.
+
+            Example of usage:
+                conf = geompy.CheckConformity(shape)
+                valid = conf.isValid()
+                si2d = conf.selfIntersected2D()
+                dist = conf.distantShapes()
+                small = conf.smallEdges()
+                interfer = cc.interferingSubshapes()
+            """
+            conf = CheckConformity (shape, self)
+            return conf
+
+        ## Obtain a shape proximity calculator
+        #  @return An instance of @ref proximity.ShapeProximity "ShapeProximity" interface
+        #
+        #  @ref tui_proximity_page "Example"
+        def ShapeProximity (self):
+            """
+            Obtain a shape proximity calculator.
+
+            Example of usage:
+                prox = geompy.ShapeProximity()
+                value = prox.proximity(shape1, shape2)
+            """
+            prox = ShapeProximity (self)
+            return prox
+
         # end of l2_testing
         ## @}