X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_SWIG%2FgeomBuilder.py;h=e80d9f60ac9c4f6121570b9c8e8174b7436b05f4;hb=46676347f26294f60ec56f5d31abb87bceebf317;hp=d10e9118a14fee2328e64ca0c074a042aaf1c256;hpb=ade417c569fc552473b95f31f9624449dce21b8a;p=modules%2Fgeom.git diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index d10e9118a..e80d9f60a 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -1441,7 +1441,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen): # # @ref swig_MakeVertexInsideFace "Example" @ManageTransactions("BasicOp") - def MakeVertexInsideFace (self, theFace, theName=None): + def MakeVertexInsideFace (self, theFace, theNumberOfPnts=1, theName=None): """ Create a point, which lays on the given face. The point will lay in arbitrary place of the face. @@ -1451,6 +1451,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen): Parameters: theFace The referenced face. + theNumberOfPnts The number of points we want to get, 1 by default. 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. @@ -1462,7 +1463,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen): p_on_face = geompy.MakeVertexInsideFace(Face) """ # Example: see GEOM_TestAll.py - anObj = self.BasicOp.MakePointOnFace(theFace) + anObj = self.BasicOp.MakePointOnFace(theFace, theNumberOfPnts) RaiseIfFailed("MakeVertexInsideFace", self.BasicOp) self._autoPublish(anObj, theName, "vertex") return anObj @@ -11783,6 +11784,39 @@ class geomBuilder(GEOM._objref_GEOM_Gen): return aKindTuple + ## The function takes a single face with holes and returns a list of faces, + # first of them is the original face without holes, and the other faces are placed + # on the same surface as the original face but bounded by each hole wire. + # If the original face has no holes, it will be returned as an output + # @param theShape Face to perform operation on. + # + # @return GEOM.ListOfGO, list created faces, where first of them is the original face without holes + @ManageTransactions("MeasuOp") + def PatchFace(self, theShape): + """ + The function takes a single face with holes and returns a list of faces, + first of them is the original face without holes, and the other faces are placed + on the same surface as the original face but bounded by each hole wire. + If the original face has no holes, it will be returned as an output + + Parameters: + theShape Face to perform operation on. + + Returns: + GEOM.ListOfGO, list created faces, where first of them is the original face without holes + + Example of usage: + Circle_1 = geompy.MakeCircle(None, None, 190) + Circle_2 = geompy.MakeCircle(None, None, 100) + Face_1 = geompy.MakeFaceWires([Circle_1], 1) + Face_2 = geompy.MakeFaceWires([Circle_2], 1) + Cut_1 = geompy.MakeCutList(Face_1, [Face_2], True) + faces = geompy.PatchFace(Cut_1) + """ + aList = self.MeasuOp.PatchFace(theShape) + RaiseIfFailed("PatchFace", self.MeasuOp) + return aList + ## Returns the string that describes if the shell is good for solid. # This is a support method for MakeSolid. #