[Artwork] / [QisMLib] / [Programmer's Corner]
QisMGbrPS C++ API (qismgbrps.h)QisMGbrPSNotifyVersion control (QisMGbrPSNotify)On_qismgbr_progressQisMGbrPSOptsParamTypeUnitTypeMirrorVersion control (QisMGbrPSOpts)Set_paramGet_paramReset (QisMGbrPSOpts)CloneCopyQisMGbrPSFileMetaInfoVersion control (QisMGbrPSFile)File_dbGet_error_msg (QisMGbrPSFile)Get_error_tag (QisMGbrPSFile)Save_to_gdsiiGet_meta_infoQisMGbrPSVersion control (QisMGbrPS)Get_error_msg (QisMGbrPS)Get_error_tag (QisMGbrPS)New_objectDelete_objectLoad_gbrUnload_gbrQisMGbrPS Licensing (API)Version Historyqismgbrps dll v1.1 2021-12-01qismgbrps dll v1.0 2021-06-10
class QisMGbrPSNotify { ... };V<number>. E.g <baseclass>V<version>xxxxxxxxxxvirtual const char* QisMGbrPSNotify_name() const = 0;virtual void* QisMGbrPSNotify_cast(const int version) = 0;virtual const void* QisMGbrPSNotify_cast(const int version) const = 0;virtual int QisMGbrPSNotify_latest_version() const = 0;xxxxxxxxxxvirtual int On_qismgbr_progress(const char* msg) { return 0; }xxxxxxxxxxclass QisMGbrPSOpts { ... };PRM_DBG is used to preseve temp. files for troubleshooting
int 1 (ON) or 0 (OFF)int* to get the setting valuePRM_UM is used to set um as the units for all user specified values
int value from QisMGbrPSOpts::UnitTypeint* to get the setting valuePRM_MAXPTS is used to set the max. no. vetices per output polygon
int value >= 4int* to get the setting valuePRM_ARCRES is used to control the arc resolution (degrees) (smoothing of arcs)
double value double* to get the setting valuePRM_ARCSAG is used to control the chord error (smoothing of arcs)
double value double* to get the setting valuePRM_ARCSAGUNIT is used to indicate the units associated with the chord error
int value from QisMGbrPSOpts::UnitTypeint* to get the setting valueUnitType::PRM_UMPRM_THRNUM is used to control the no. threads used for gerber processing
int value > 0int* to get the setting valuePRM_SPLITARGS is used to pass advanced arguments to the underlying gerber processor
const char* of arguments separated by <space>const char** to get the setting value<empty string>PRM_ROT90 is used to rotate the design by a multiple of 90 deg. before loading
int that is multipled by 90 to form the angleint* to get the setting valuePRM_MIRROR is used to reflex the design about X, Y or both before loading
int value from QisMGbrPSOpts::Mirrorint* to get the setting valueMirror::M_NPRM_SCALEX is used to scale the design along X before loading
double value > 0.0double* to get the setting valuePRM_SCALEY is used to scale the design along Y before loading
double value > 0.0double* to get the setting valuexxxxxxxxxxenum ParamType { PRM_DBG=1, PRM_UM, PRM_MAXPTS, PRM_ARCRES, PRM_ARCSAG, PRM_ARCSAGUNIT, PRM_THRNUM, PRM_SPLITARGS, PRM_ROT90, PRM_MIRROR, PRM_SCALEX, PRM_SCALEY};xxxxxxxxxxenum UnitType { GBR_UNIT_MM = 0, GBR_UNIT_CM, GBR_UNIT_UM, GBR_UNIT_INCH, GBR_UNIT_MILS};M_N - no mirroringM_X - flip (negate) xM_Y - flip (negate) yM_XY - flip (negate) x and y xxxxxxxxxxenum Mirror { M_N=0, M_X, M_Y, M_XY};V<number>. E.g <baseclass>V<version>xxxxxxxxxxvirtual const char* QisMGbrPSOpts_name() const = 0;virtual void* QisMGbrPSOpts_cast(const int version) = 0;virtual const void* QisMGbrPSOpts_cast(const int version) const = 0;virtual int QisMGbrPSOpts_latest_version() const = 0;type is a code for the option type. It can be any one of QisMGbrPSOpts::ParamType... is used to pass the variable holding the value. It's type and count depends on the paramter in question. true if the paramter type was recognized and processed. false implies unknown/unsupported paramter typexxxxxxxxxxvirtual bool Set_param(const int type, ...) = 0;virtual bool Get_param(const int type, ...) const = 0;xxxxxxxxxxvirtual void Reset() = 0;xxxxxxxxxxvirtual QisMGbrPSOpts* Clone() const = 0;xxxxxxxxxxvirtual bool Copy(const QisMGbrPSOpts* obj) = 0;xxxxxxxxxxclass QisMGbrPSFile { ... };Represents the type of information about the Gerber source to be queried
MIF_IP_POS checks if the Gerber file polarity is positive (IPPOS) or negative (IPNEG)
int* to get the value 1 (POS) 0 (NEG)MIF_IGN_LAYERS returns a comma-separated list of layers (in the db) that do not participate in rasterization
const char** to get the layer string xxxxxxxxxxenum MetaInfo { MIF_IP_POS=1 ,MIF_IGN_LAYERS};V<number>. E.g <baseclass>V<version>xxxxxxxxxxvirtual const char* QisMGbrPSFile_name() const = 0;virtual void* QisMGbrPSFile_cast(const int version) = 0;virtual const void* QisMGbrPSFile_cast(const int version) const = 0;virtual int QisMGbrPSFile_latest_version() const = 0;xxxxxxxxxxvirtual NsQisMLib::QisMFile* File_db() = 0;virtual const NsQisMLib::QisMFile* File_db() const = 0;xxxxxxxxxxvirtual const char* Get_error_msg(const int code) const = 0;virtual const char* Get_error_tag(const int code) const = 0;gds_output_path (dir + filename + extension)Get_error_msg/Get_error_tag for more informationxxxxxxxxxxvirtual int Save_to_gdsii(const char* gds_output_path) const = 0;info_type is the code associated with the information requestedxxxxxxxxxxvirtual bool Get_meta_info(const int info_type, ...) const = 0;xxxxxxxxxxclass QisMGbrPS: public NsQisMLib::QisMExtensionAPI { ... };V<number>. E.g <baseclass>V<version>xxxxxxxxxxvirtual const char* QisMGbrPS_name() const = 0;virtual void* QisMGbrPS_cast(const int version) = 0;virtual const void* QisMGbrPS_cast(const int version) const = 0;virtual int QisMGbrPS_latest_version() const = 0;xxxxxxxxxxvirtual const char* Get_error_msg(const int code) const = 0;virtual const char* Get_error_tag(const int code) const = 0;Create/Destroy an instance of an object
class_name is name of the class whose object is to be created. Acceptable types are:
Returns handle to the newly created object. MUST be type-casted to the specified class before use
Every object created this way MUST be eventually destroyed using Delete_object to avoid memory/resource leak
xxxxxxxxxxvirtual void* New_object(const char* class_name) = 0;virtual void Delete_object(const char* class_name, void* handle) = 0;filedb will contain a handle to the newly created db on successlib_handle is the handle to QisMLib obtained via QisMLib_initialize_oncegbr_path is the path to a valid gbr (RS274X) fileworking_dir if specified is path to a valid readable/writeable directoryoptions if specified is handle to an object carrying various import optionsprogress_updates if specified is a handler to receive progress updatesargc, argt, argv are reserved for internal/future useGet_error_msg, Get_error_tag for error informationLoad_gbr MUST be eventually destroyed using Unload_gbr onlyxxxxxxxxxxvirtual int Load_gbr( QisMGbrPSFile*& filedb, NsQisMLib::QisMLib* lib_handle, const char* gbr_path, const char* working_dir = 0, const QisMGbrPSOpts* options = 0, QisMGbrPSNotify* progress_updates = 0, const int argc = 0, const char* const* argt = 0, void* const* argv = 0 ) = 0;virtual void Unload_gbr(QisMGbrPSFile* handle) = 0;