Skip to content

read_surface_modelReadSurfaceModelReadSurfaceModelread_surface_modelT_read_surface_model🔗

Short description🔗

read_surface_modelReadSurfaceModelReadSurfaceModelread_surface_modelT_read_surface_model — Read a surface model from a file.

Signature🔗

read_surface_model( filename.read FileName, out surface_model SurfaceModelID )void ReadSurfaceModel( const HTuple& FileName, HTuple* SurfaceModelID )static void HOperatorSet.ReadSurfaceModel( HTuple fileName, out HTuple surfaceModelID )def read_surface_model( file_name: str ) -> HHandle

Herror T_read_surface_model( const Htuple FileName, Htuple* SurfaceModelID )

void HSurfaceModel::HSurfaceModel( const HString& FileName )

void HSurfaceModel::HSurfaceModel( const char* FileName )

void HSurfaceModel::HSurfaceModel( const wchar_t* FileName ) (Windows only)

public HSurfaceModel( string fileName )

void HSurfaceModel::ReadSurfaceModel( const HString& FileName )

void HSurfaceModel::ReadSurfaceModel( const char* FileName )

void HSurfaceModel::ReadSurfaceModel( const wchar_t* FileName ) (Windows only)

void HSurfaceModel.ReadSurfaceModel( string fileName )

Description🔗

The operator read_surface_modelReadSurfaceModel reads the surface model, which has been written with write_surface_modelWriteSurfaceModel, from the file FileNamefileNamefile_name. The handle of the surface model is returned in SurfaceModelIDsurfaceModelIDsurface_model_id. If no absolute path is given in FileNamefileNamefile_name, the file is searched in the current directory of the HALCON process. The default HALCON file extension for the surface model (SFM) file is 'sfm'. If no file named FileNamefileNamefile_name exists, the default file extension is appended to FileNamefileNamefile_name.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters🔗

FileNamefileNamefile_name (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the SFM file.

File extension: .sfm

SurfaceModelIDsurfaceModelIDsurface_model_id (output_control) surface_model → (handle)HTuple (HHandle)HSurfaceModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the read surface model.

Result🔗

read_surface_modelReadSurfaceModel returns 2 (H_MSG_TRUE) if all parameters are correct and the file can be read. If the file is not a surface model file, the error 9506 is raised. If the file has a version that can not be read by this version of HALCON, the error 9507 is raised. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

read_object_model_3dReadObjectModel3d, xyz_to_object_model_3dXyzToObjectModel3d

Possible successors

find_surface_modelFindSurfaceModel, refine_surface_model_poseRefineSurfaceModelPose, get_surface_model_paramGetSurfaceModelParam, clear_surface_modelClearSurfaceModel, find_surface_model_imageFindSurfaceModelImage, refine_surface_model_pose_imageRefineSurfaceModelPoseImage

Alternatives

create_surface_modelCreateSurfaceModel

See also

create_surface_modelCreateSurfaceModel, write_surface_modelWriteSurfaceModel

Module🔗

3D Metrology