+ ## Measure curvature radius of surface in the given point along the given direction.
+ # @param theSurf the given face.
+ # @param thePoint given point.
+ # @param theDirection given direction.
+ # @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.
+ #
+ # @return New GEOM.GEOM_Object, containing vector of curvature of theSurf.
+ # The returned vector is codirectional with the normal to the face
+ # in the given point in case of positive curvature value
+ # and opposite to the normal in case of negative curvature.
+ # The normal of the returned vector is equal to the
+ # absolute value of the curvature radius.
+ # Null shape is returned in case of infinite radius
+ # (zero curvature), for example, in case of flat face.
+ #
+ ## @ref swig_CurvatureOnFace "Example"
+ @ManageTransactions("MeasuOp")
+ def CurvatureOnFace(self, theSurf, thePoint, theDirection, theName=None):
+ """
+ Measure curvature radius of surface in the given point along the given direction.
+
+ Parameters:
+ theSurf the given face.
+ thePoint given point.
+ theDirection given direction.
+ 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.
+
+ Returns:
+ New GEOM.GEOM_Object, containing vector of curvature of theSurf.
+ The returned vector is codirectional with the normal to the face
+ in the given point in case of positive curvature value
+ and opposite to the normal in case of negative curvature.
+ The normal of the returned vector is equal to the
+ absolute value of the curvature radius.
+ Null shape is returned in case of infinite radius
+ (zero curvature), for example, in case of flat face.
+
+ Example of usage:
+ curvature_1 = geompy.CurvatureOnFace(Face_1, Vertex_1, OX)
+ """
+ aVec = self.MeasuOp.SurfaceCurvatureByPointAndDirection(theSurf,thePoint,theDirection)
+ if self.MeasuOp.GetErrorCode() != "ZERO_CURVATURE":
+ RaiseIfFailed("CurvatureOnFace", self.MeasuOp)
+ 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
+