A QisMLib extension to group polygons into repeating patterns
QisMPatterns ExtensionQisMPatterns GlossaryPatternPattern DBQisMPatterns C++ API (qismpatterns.h)QisMPatternsRasterVersion control (QisMPatternsRaster)RSTRSPARAMSBUFN QisMPatternsOptsPAT_DETECT_ELLIPSESPAT_DETECT_ARCSAG_DBU_GPAT_ACSV_SPAT_ACSP_SQisMPatternsCadOptsCAD_TOP_NAME_SCAD_ARC_RES_GCAD_ARC_SAG_DBU_GCAD_MIN_REP_DCAD_NO_AREFSCAD_OASISQisMPatternsImgOptsIMG_INVERTIMG_R2LIMG_B2TQisMGetPatternPatCodeVersion control (QisMGetPattern)On_begin_poly_patternOn_poly_pattern_posOn_poly_pattern_arrayOn_end_poly_patternOn_begin_path_patternOn_path_pattern_posOn_path_pattern_arrayOn_end_path_patternOn_begin_box_patternOn_box_pattern_posOn_box_pattern_arrayOn_end_box_patternOn_begin_ellipse_patternOn_ellipse_pattern_posOn_ellipse_pattern_arrayOn_end_ellipse_patternQisMPatternizerVersion control (QisMPatternizer)Get_error_msg (QisMPatternizer)Get_error_tag (QisMPatternizer)Get_error_context (QisMPatternizer)Add_or_matchAdd_or_match_uuAdd_or_match_pathAdd_or_match_path_uuAdd_or_match_boxAdd_or_match_box_uuAdd_or_match_ellipseAdd_or_match_ellipse_uuAdd_bstoreAdd_viewMatchMatch_uuResetCopyConsolidateMerge_inGet_allGet_lGet_ldGet_nvWrite_to_imgWrite_to_cadSizeSize_ellipsesGet_extentsGet_reportQisMPatternsVersion control (QisMPatterns)Get_error_msg (QisMPatterns) Get_error_tag (QisMPatterns)Get_error_context (QisMPatterns)Create_patternizerDestroy_patternizerImage_setupImage_cleanupQisMPatterns Commandspatterns.createpatterns.create_from_bstorepatterns.create_from_viewpatternizer.write_to_cadpatternizer.write_to_imgpatterns.destroyQisMPatterns Licensing (API)QisMPatterns Licensing (Script)QisMPatterns Version History qismpatterns dl/so v1.0 2024-02-15
A pattern is a CAD entity that occupies a subset of 2D space and can repeat in one or more x,y locations
A pattern can be a polygon, path (trace), box or an ellipse
A pattern db is a container that identifies, stores and manages patterns from the data that is added to that container
Represents the rasterizer setup that is used to generate an image for a pattern db object
class QisMPatternsRaster { ... };Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMPatternsRaster_name(const int version) const = 0;virtual void* QisMPatternsRaster_cast(const int version) = 0;virtual const void* QisMPatternsRaster_cast(const int version) const = 0;virtual int QisMPatternsRaster_latest_version() const = 0;Get handles to the underlying rasterizers, one per thread
xxxxxxxxxxvirtual NsQisMRaster::QisMRasterizerV10* const* RSTRS() = 0;virtual const NsQisMRaster::QisMRasterizerV10* const* RSTRS() const = 0;Get handle to the underlying raster settings
xxxxxxxxxxvirtual NsQisMRaster::QisMRasterParams* PARAMS() = 0;virtual const NsQisMRaster::QisMRasterParams* PARAMS() const = 0;Get a handle to the underlying shared raster buffer
xxxxxxxxxxvirtual NsQisMRaster::QisMRasterSharedBuf* BUF() = 0;virtual const NsQisMRaster::QisMRasterSharedBuf* BUF() const = 0;Get the number of rasterizer threads
xxxxxxxxxxvirtual int N() const = 0;Represents the various parameters used for creating a new pattern db object
The suffix at the end of the parameter name gives a clue about the type of value to be appended
_G implies a double value
_S implies a string value
xxxxxxxxxxstruct QisMPatternsOpts { ... };Detect polygons that are ellipses and store them as ellipses
<option_string> = <option_string> + " " + "ellipses"
Highly recommended for data that contains ellipses because of significant speed and memory use improvements
At the moment, only works for ellipses that are circles
Default: OFF, no ellipse detection
xxxxxxxxxxstatic const char* PAT_DETECT_ELLIPSES() { return "ellipses"; }With ellipse detection ON, specify a max. chord error to assist detection
<option_string> = <option_string> + " " + "arcsagindbu=<double>"
Default: Not used (0.0)
xxxxxxxxxxstatic const char* PAT_DETECT_ARCSAG_DBU_G() { return "arcsagindbu="; }Specify a vendor string to use trusted (OEM) licensing instead of the standard licensing
<option_string> = <option_string> + " " + "acsv=<string>"
MUST also provide a valid PAT_ACSP_S
xxxxxxxxxxstatic const char* PAT_ACSV_S() { return "acsv="; }Specify a OEM key file path to use trusted (OEM) licensing instead of the standard licensing
<option_string> = <option_string> + " " + "acsp=<string>"
MUST also provide a valid PAT_ACSV_S
xxxxxxxxxxstatic const char* PAT_ACSP_S() { return "acsp="; }Represents the parameters used for creating a CAD output
The suffix at the end of the parameter name gives a clue about the type of value to be appended
_G implies a double value
_S implies a string value
_D implies an int value
xxxxxxxxxxstruct QisMPatternsCadOpts { ... };Specify a custom name for the top cell in the output
<option_string> = <option_string> + " " + "top=<string>"
Default: "TOP"
xxxxxxxxxxstatic const char* CAD_TOP_NAME_S() { return "top="; }Control the conversion of ellipses to polygons by specifying the arc-resolution in degrees
<option_string> = <option_string> + " " + "arcres=<double>"
Default: 9.0
xxxxxxxxxxstatic const char* CAD_ARC_RES_G() { return "arcres="; }Control the conversion of ellipses to polygons by specifying the chord-error in db-units
<option_string> = <option_string> + " " + "arcsagoutdbu=<double>"
Default: 0.0
xxxxxxxxxxstatic const char* CAD_ARC_SAG_DBU_G() { return "arcsagoutdbu="; }Specify the min. no. repetitions a pattern must have to constitute it's own cell in the output. All disqualified patterns will be merged into the top cell
<option_string> = <option_string> + " " + "minrep=<int>"
Default: 1, all patterns have their own cell definition
xxxxxxxxxxstatic const char* CAD_MIN_REP_D() { return "minrep="; }Turn OFF array detection (AREFs). Patterns with their own cell definition will be referenced as a bunch of SREFs
<option_string> = <option_string> + " " + "noarefs"
Default: ON, arrays are detected and written as such
xxxxxxxxxxstatic const char* CAD_NO_AREFS() { return "noarefs"; }Create OASIS output
<option_string> = <option_string> + " " + "oasis"
Default: output is GDSII
xxxxxxxxxxstatic const char* CAD_OASIS() { return "oasis"; }Represents the parameters used for creating an image output
xxxxxxxxxxstruct QisMPatternsImgOpts { ... };Invert the image polarity to black (1) background, white (0) data
<option_string> = <option_string> + " " + "invert"
Default: black (1) data, white (0) background
xxxxxxxxxxstatic const char* IMG_INVERT() { return "invert"; }Reverse raster direction along X to max-x (left) .. min-x (right)
<option_string> = <option_string> + " " + "right_to_left"
Default: min-x (left) .. max-x (right)
xxxxxxxxxxstatic const char* IMG_R2L() { return "right_to_left"; }Reverse raster direction along Y to min-y (top) .. max-y (bottom)
<option_string> = <option_string> + " " + "bottom_to_top"
Default: max-y (top) .. min-y (bottom)
xxxxxxxxxxstatic const char* IMG_B2T() { return "bottom_to_top"; }Represents a callback to receive data from a pattern db upon running a query
For each pattern, there is a begin followed by zero or more pos (SREFs) and/or array (AREFs) followed by an end
xxxxxxxxxxclass QisMGetPattern { ... };Return codes from the callback to control query flow
xxxxxxxxxxenum PatCode { PAT_CONTINUE=0 /* continue traversing pattern */ ,PAT_SKIP=-1 /* skip this pattern */};Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMGetPattern_name(const int version) const = 0;virtual void* QisMGetPattern_cast(const int version) = 0;virtual const void* QisMGetPattern_cast(const int version) const = 0;virtual int QisMGetPattern_latest_version() const = 0;Callbacks to receive a pattern that is a polygon
id is an identifier for the pattern in question
xy represents the xy-coordinates of the polygon in db-units. It contains nv pairs of integers
l represents the layer-number and d represents the datatype-number
count is the no. repetitions of this pattern
x and y are the insertion points of an instance of this pattern (in db-units)
For arrays, nx and ny represent the no. elements along X and Y while dx and dy represent the distance between elements along X and Y in db-units
Return one of these codes to control the traversal of this pattern
xxxxxxxxxxvirtual int On_begin_poly_pattern( void* id, const int* xy, const int nv, const unsigned short l, const unsigned short d, const long long count ) { return 0; }virtual int On_poly_pattern_pos( void* id, const int* xy, const int nv, const int x, const int y, const unsigned short l, const unsigned short d ) { return 0; }virtual int On_poly_pattern_array( void* id, const int* xy, const int nv, const unsigned short l, const unsigned short d, const int x, const int y, const int nx, const int ny, const int dx, const int dy ) { return 0; }virtual int On_end_poly_pattern(void* id) { return 0; }Callbacks to receive a pattern that is a trace/path
id is an identifier for the pattern in question
xy represents the xy-coordinates of the polygon in db-units. It contains nv pairs of integers
l represents the layer-number and d represents the datatype-number
width is the trace width in db-units
type is F for flush-ended, H for half-width-ended and R for round-ended traces
count is the no. repetitions of this pattern
x and y are the insertion points of an instance of this pattern (in db-units)
For arrays, nx and ny represent the no. elements along X and Y while dx and dy represent the distance between elements along X and Y in db-units
Return one of these codes to control the traversal of this pattern
xxxxxxxxxxvirtual int On_begin_path_pattern( void* id, const int* xy, const int nv, const int width, const char type, const unsigned short l, const unsigned short d, const long long count ) { return 0; }virtual int On_path_pattern_pos( void* id, const int* xy, const int nv, const int width, const char type, const int x, const int y, const unsigned short l, const unsigned short d ) { return 0; }virtual int On_path_pattern_array( void* id, const int* xy, const int nv, const int width, const char type, const unsigned short l, const unsigned short d, const int x, const int y, const int nx, const int ny, const int dx, const int dy ) { return 0; }virtual int On_end_path_pattern(void* id) { return 0; }Callbacks to receive a pattern that is a box (manhattan rectangle)
id is an identifier for the pattern in question
width and height are the box dimensions in db-units
l represents the layer-number and d represents the datatype-number
count is the no. repetitions of this pattern
x and y are the insertion points of an instance of this pattern (in db-units)
For arrays, nx and ny represent the no. elements along X and Y while dx and dy represent the distance between elements along X and Y in db-units
Return one of these codes to control the traversal of this pattern
xxxxxxxxxxvirtual int On_begin_box_pattern( void* id, const int width, const int height, const unsigned short l, const unsigned short d, const long long count ) { return 0; }virtual int On_box_pattern_pos( void* id, const int width, const int height, const int x, const int y, const unsigned short l, const unsigned short d ) { return 0; }virtual int On_box_pattern_array( void* id, const int width, const int height, const unsigned short l, const unsigned short d, const int x, const int y, const int nx, const int ny, const int dx, const int dy ) { return 0; }virtual int On_end_box_pattern(void* id) { return 0; }Callbacks to receive a pattern that is an ellipse
id is an identifier for the pattern in question
width and height are the X,Y radii in db-units
l represents the layer-number and d represents the datatype-number
count is the no. repetitions of this pattern
x and y are the insertion points of an instance of this pattern (in db-units)
For arrays, nx and ny represent the no. elements along X and Y while dx and dy represent the distance between elements along X and Y in db-units
Return one of these codes to control the traversal of this pattern
xxxxxxxxxxvirtual int On_begin_ellipse_pattern( void* id, const int width, const int height, const unsigned short l, const unsigned short d, const long long count ) { return 0; }virtual int On_ellipse_pattern_pos( void* id, const int width, const int height, const int x, const int y, const unsigned short l, const unsigned short d ) { return 0; }virtual int On_ellipse_pattern_array( void* id, const int width, const int height, const unsigned short l, const unsigned short d, const int x, const int y, const int nx, const int ny, const int dx, const int dy ) { return 0; }virtual int On_end_ellipse_pattern(void* id) { return 0; }Represent a database of patterns
At the moment, it can represent four types of patterns - polygons, paths, boxes and ellipses (only circles)
xxxxxxxxxxclass QisMPatternizer { ... };Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMPatternizer_name(const int version) const = 0;virtual void* QisMPatternizer_cast(const int version) = 0;virtual const void* QisMPatternizer_cast(const int version) const = 0;virtual int QisMPatternizer_latest_version() const = 0;Get error information for the last error identified by code
This information is only valid until the next error condition occurs
xxxxxxxxxxvirtual const char* Get_error_msg(const int code) const = 0;virtual const char* Get_error_tag(const int code) const = 0;virtual const char* Get_error_context(const int code) const = 0;Add a polygon to the pattern db
xy is a list of xy-coordinates in db-units (int*) or user-units (double*)
nv is the no. vertices or no. x,y pairs in xy (no. values in xy = nv * 2)
grid is the resolution of the data for user-units
l and d are the layer and datatype numbers
jitter is the margin of error in db-units (int) or user-units (double) to be used in comparing patterns
Returns true if this constitutes a new pattern, false if it matches an existing pattern. In either case, the insertion point is added to the pattern in question
xxxxxxxxxxvirtual bool Add_or_match( const int* xy, const int nv, const unsigned short l = 0, const unsigned short d = 0, const unsigned int jitter = 0 ) = 0;virtual bool Add_or_match_uu( const double* xy, const int nv, const double grid, const unsigned short l = 0, const unsigned short d = 0, const double jitter = 0.0 ) = 0;Add a path (trace) to the pattern db
xy is a list of xy-coordinates in db-units (int*) or user-units (double*)
nv is the no. vertices or no. x,y pairs in xy (no. values in xy = nv * 2)
width is the path width in db-units (int) or user-units (double)
type is F for flush-ended, H for half-width extension and R for round-cap paths
l and d are the layer and datatype numbers
grid is the resolution of the data for user-units
jitter is the margin of error in db-units (int) or user-units (double) to be used in comparing patterns
Returns true if this constitutes a new pattern, false if it matches an existing pattern. In either case, the insertion point is added to the pattern in question
xxxxxxxxxxvirtual bool Add_or_match_path( const int* xy, const int nv, const int width, const char type, const unsigned short l = 0, const unsigned short d = 0, const unsigned int jitter = 0 ) = 0;virtual bool Add_or_match_path_uu( const double* xy, const int nv, const double width, const char type, const double grid, const unsigned short l = 0, const unsigned short d = 0, const double jitter = 0.0 ) = 0;Add a box to the pattern db
width is the box width (x-dimension) in db-units (int) or user-units (double)
height is the box height (y-dimension) in db-units (int) or user-units (double)
l and d are the layer and datatype numbers
grid is the resolution of the data for user-units
jitter is the margin of error in db-units (int) or user-units (double) to be used in comparing patterns
Returns true if this constitutes a new pattern, false if it matches an existing pattern. In either case, the insertion point is added to the pattern in question
xxxxxxxxxxvirtual bool Add_or_match_box( const int width, const int height, const int x, const int y, const unsigned short l = 0, const unsigned short d = 0, const unsigned int jitter = 0 ) = 0;virtual bool Add_or_match_box_uu( const double width, const double height, const double x, const double y, const double grid, const unsigned short l = 0, const unsigned short d = 0, const double jitter = 0.0 ) = 0;Add an ellipse to the pattern db
width is the x-radius in db-units (int) or user-units (double)
height is the y-radius in db-units (int) or user-units (double)
l and d are the layer and datatype numbers
grid is the resolution of the data for user-units
jitter is the margin of error in db-units (int) or user-units (double) to be used in comparing patterns
Returns true if this constitutes a new pattern, false if it matches an existing pattern. In either case, the insertion point is added to the pattern in question
At the moment, ONLY CIRCLES (x-radius == y-radius) are registered as ellipses
xxxxxxxxxxvirtual bool Add_or_match_ellipse( const int width, const int height, const int x, const int y, const unsigned short l = 0, const unsigned short d = 0, const unsigned int jitter = 0 ) = 0;virtual bool Add_or_match_ellipse_uu( const double width, const double height, const double x, const double y, const double grid, const unsigned short l = 0, const unsigned short d = 0, const double jitter = 0 ) = 0;Add all polygons from a polygon container bstore to the pattern db
jitter is the margin of error in db-units to be used in comparing patterns
Returns false if the container handler is NULL indicating failure to add
xxxxxxxxxxvirtual bool Add_bstore( const NsQisMLib::QisMBStore* bstore, const unsigned int jitter = 0 ) = 0;Add polygons and paths from a view of a file-db to the pattern db
exploder is the exploder object associated with the said file-db that is already setup with the view in question (cell, layers, window, nesting level etc.). See qismexploder.h for the corresponding API
Returns true on success. Otherwise use Get_error_... for error information
xxxxxxxxxxvirtual bool Add_view( NsQisMLib::QisMExploder* exploder, const double jitter = 0.0 ) = 0;Check if a polygon matches an existing pattern
xy is a list of xy-coordinates in db-units (int*) or user-units (double*)
nv is the no. vertices or no. x,y pairs in xy (no. values in xy = nv * 2)
l and d are the layer and datatype numbers
grid is the resolution of the data for user-units
jitter is the margin of error in db-units (int) or user-units (double) to be used in comparing patterns
Returns true if a match was found. Regardless, nothing is added to the pattern db
xxxxxxxxxxvirtual bool Match( const int* xy, const int nv, const unsigned short l = 0, const unsigned short d = 0, const unsigned int jitter = 0 ) const = 0;virtual bool Match_uu( const double* xy, const int nv, const double grid, const unsigned short l = 0, const unsigned short d = 0, const double jitter = 0.0 ) const = 0;Reset the pattern db. All patterns are deleted
xxxxxxxxxxvirtual void Reset() = 0;Make a copy of another pattern db
The copy is completely self-contained and independent from the source
xxxxxxxxxxvirtual bool Copy(const QisMPatternizer* o) = 0;Free up excess memory from the pattern db
Best be used only after all candidate data has been added
xxxxxxxxxxvirtual void Consolidate() = 0;Match and add patterns from another pattern db o
jitter is the margin of error in db-units (int)
xxxxxxxxxxvirtual void Merge_in(const QisMPatternizer* o, const unsigned int jitter) = 0;Query patterns from the pattern db
cb is a callback handler that will receive the patterns that match the query criteria
loci if true sends the insertion points via *_pos and *_array callbacks
arrays if true detect n x m arrays and sends out the *_array callbacks for each one found
l and d are the layer and datatype numbers to be used as filters
nv is the no. vertices (polygons and paths) to be used as a filter (0 implies ellipses, 5 includes boxes)
Returns 0 on success. Otherwise use Get_error_* for more information
xxxxxxxxxxvirtual int Get_all( QisMGetPattern* cb, const bool loci = true, const bool arrays = true ) const = 0;virtual int Get_l( const unsigned short l, QisMGetPattern* cb, const bool loci = true, const bool arrays = true ) const = 0;virtual int Get_ld( const unsigned short l, const unsigned short d, QisMGetPattern* cb, const bool loci = true, const bool arrays = true ) const = 0;virtual int Get_nv( const int nv, QisMGetPattern* cb, const bool loci = true, const bool arrays = true ) const = 0;Create a monochrome (1bpp) raster image from the pattern db
raster_setup is a valid rasterizer setup to be used for this operation
extents are the extents of the image data in user-units
grid is the data resolution in user-units
mode is the paint-mode. See QisMRasterFlags::OverlayMode
Returns 0 on success. Otherwise use Get_error_* for more information
The image buffer can be access using the BUF() method of the raster setup
Requires the QisMRaster extension to be installed, configured and licensed
See qismraster.h for the QisMRaster API
xxxxxxxxxxvirtual int Write_to_img( QisMPatternsRaster* raster_setup, const NsQisMLib::QisMWindow& extents, const double grid, const int mode ) = 0;Create a GDSII/OASIS file on disk from the pattern db
file_path is the output path (dir + filename + extension)
units_m in the file units in meters and grid_m is the data resolution in meters
opts is a string of optional parameters separated by <space>
Returns 0 on success. Otherwise use Get_error_* for more information
xxxxxxxxxxvirtual int Write_to_cad( const char* file_path, const double units_m, const double grid_m, const char* opts = 0 ) = 0;Get the pattern db counts
n_loc is the total number of repetitions (insertions)
n_vert is the total no. vertices (1 ellipse = 40 vertices)
Returns the total no. patterns (or elliptical patterns)
xxxxxxxxxxvirtual long long Size(long long& n_loc, long long& n_vert) const = 0;virtual long long Size_ellipses(long long& n_loc) const = 0;Get the data extents of the pattern db
extents is the buffer to retreive the extents in user-units
grid is the data grid in user-units
xxxxxxxxxxvirtual void Get_extents(NsQisMLib::QisMWindow& extents, const double grid) = 0;Get a human-readable report for this pattern db as a string
xxxxxxxxxxvirtual const char* Get_report() const = 0;Gateway to the QisMPatterns extension
xxxxxxxxxxclass QisMPatterns: public NsQisMLib::QisMExtensionAPI { ... };Cast to a pointer of another version in the class hierarchy (base/derived)
Get the latest version number. Version numbers start at 1 and are reflected in the class name using the suffix V<number>. E.g <baseclass>V<version>
The topmost base class is version 1 (V1 implied)
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual const char* QisMPatterns_name(const int version) const = 0;virtual void* QisMPatterns_cast(const int version) = 0;virtual const void* QisMPatterns_cast(const int version) const = 0;virtual int QisMPatterns_latest_version() const = 0;Get error information for the last error identified by code
This information is only valid until the next error condition occurs
xxxxxxxxxxvirtual const char* Get_error_msg(const int code) const = 0;virtual const char* Get_error_tag(const int code) const = 0;virtual const char* Get_error_context(const int code) const = 0;Create/Destroy a pattern db
Requires one license per active db that is held until destruction of that db
ecode is a buffer to recieve the error code should this operation fail
opts is a string of optional parameters separated by <space>
Returns a handle to the newly created db on success. Otherwise returns NULL, call Get_error_* with value of ecode to get more information
Every object created this way MUST be explicitly destroyed to avoid resource leaks
xxxxxxxxxxvirtual QisMPatternizer* Create_patternizer(int* ecode, const char* opts = 0) = 0;virtual void Destroy_patternizer(QisMPatternizer* handle) = 0;Create/Destroy a rasterizer setup to create an image from a pattern db
Requires the QisMRaster extension to be installed, configured and licensed. Requires n licenses of QisMRaster
n is the no. threads (no. rasterizer objects) to be used for generating the raster image
filedb is a database to be associated with the rasterizer and is also a source of the pattern data
extents MUST be valid extents of the image in user-units. They may be adjusted slightly for byte-alignment during this operation
px_x and px_y is the image resolution expressed as a size of 1 pixel in user-units along X and Y
ecode is a buffer to recieve the error code should this operation fail
opts is a string of optional parameters separated by <space>
Returns a handle to the newly created raster setup on success. Otherwise returns NULL, call Get_error_* with value of ecode to get more information
Every object created this way MUST be explicitly destroyed to avoid resource leaks
xxxxxxxxxxvirtual QisMPatternsRaster* Image_setup( const int n, NsQisMLib::QisMFile* filedb, NsQisMLib::QisMWindow& extents, const double px_x, const double px_y, int* ecode, const char* opts = 0 ) = 0;virtual void Image_cleanup(QisMPatternsRaster* handle) = 0;QisMScript Commands to group polygons into repeating patterns
See qismpatterns.h for the corresponding C++ api
Some commands require a license
All commands are single-line only. They are listed here in multiple lines only for better readability
xxxxxxxxxxpatterns.create_from_bstore&patterns={id}[ellipses={max_arcsag_dbu}]
Create a new (and empty) pattern db
&patterns={id} provides an identifier to be associated with the newly created db
ellipses={max_arcsag_dbu} if specified enables ellipse detection with {max_arcsag_dbu} being the max. chord error in db-units as a criteria. Default: Ellipse detection is OFF
Equivalent to QisMPatterns::Create_patternizer
Every pattern db created this way must be destroyed explicitly to avoid resource leaks
Requires one license per call
xxxxxxxxxxpatterns.create_from_bstore&patterns={id}$bin={id}[jitter={dbu}][ellipses={max_arcsag_dbu}]
Create a new pattern db from a polygon container
&patterns={id} provides an identifier to be associated with the newly created db
jitter={dbu} if specified provides a margin of error for comparing patterns in db-units. Default: 0
ellipses={max_arcsag_dbu} if specified enables ellipse detection with {max_arcsag_dbu} being the max. chord error in db-units as a criteria. Default: Ellipse detection is OFF
Equivalent to QisMPatterns::Create_patternizer and QisMPatternizer::Add_bstore
Every pattern db created this way must be destroyed explicitly to avoid resource leaks
Requires one license per call
xxxxxxxxxxpatterns.create_from_view&patterns={id}$exploder={id}[jitter={uu}][nopaths][ellipses={arcsagdbu}]
Create a new pattern db from a view (cell, layers, window, etc.) of a file db
&patterns={id} provides an identifier to be associated with the newly created db
$exploder={di} provides the exploder associated with the file db that has already been setup with the view in question
jitter={dbu} if specified provides a margin of error for comparing patterns in db-units. Default: 0
nopaths if specified, converts all paths to boundaries before adding. Default: Paths are added as paths
ellipses={max_arcsag_dbu} if specified enables ellipse detection with {max_arcsag_dbu} being the max. chord error in db-units as a criteria. Default: Ellipse detection is OFF
Equivalent to QisMPatterns::Create_patternizer and QisMPatternizer::Add_view
Every pattern db created this way must be destroyed explicitly to avoid resource leaks
Requires one license per call
xxxxxxxxxxpatternizer.write_to_cad$patterns={id}out={path}units_m={units}grid_m={grid}[min={value}][no_aref][arcs={res},{sag},{sag_unit}][top={name}]
Create a GDSII/OASIS file from the specified pattern db
$patterns={id} provides the identifier associated with the pattern db in question
out={path} specifies the output file path (dir + name + extension)
units_m={units} and grid_m={grid} provide the data units and resolution in meters
min={value} if specified generates a new cell definition only for patterns that have at least the specified no. repetitions. Rest are merged into the top cell. Default: 1, every pattern has it's own cell definition
no_aref if specified disables array detection. Default: Array detection is ON
arcs={res},{sag},{sag_units} if specified controls the segmentation of ellipses. Default: res = 9.0, sag = 0.0, sag_units = um
{sag_unit} can be m, cm, mm, um, nm, in or mils
Equivalent to QisMPatternizer::Write_to_cad
xxxxxxxxxxpatternizer.write_to_img$patterns={id}out={path}$filedb={id}pixelsize={x}[,{y}][roi={lx},{ly},{ux},{uy}][mode=PAINT | SCRATCH | DITHER][thrnum={n}]
Create a monochrome (1bpp) raster image from the pattern db
$patterns={id} provides the identifier associated with the pattern db in question
out={path} specifies the output file path (dir + name + extension)
$filedb={id} provides the file db that is the source of the pattern data
pixelsize={x}[,{y}] provides the image resolution in form of size of a pixel in user-units
roi=... if specified provides the image extents in user-units. Default: the extents of the pattern data is used
mode=... is the paint-mode
thrnum={n} if specified provides the no. threads to be used for formatting (TIF8 format)
Requires the QisMRaster extension to be installed, configured and licensed
Equivalent to QisMPatterns::Image_setup and QisMPatternizer::Write_to_img
xxxxxxxxxxpatterns.destroy$patterns={id}
Destroy a pattern db identified by {id}
Releases the license held by the pattern db
Code : 11131
Acquire : QisMPatterns::Create_patternizer
Release : QisMPatterns::Destroy_patternizer
Policy : One license per pattern db held from creation until destroyed
Code : 11131
Acquire : patterns.create_from_bstore, patterns.create_from_view
Release : patterns.destroy
Policy : One license per active pattern db held until destroyed
First cut