Perform boolean operations on large sets of polygons
QisMBool QisMBool Polygon RepresentationQisMBool C++ API (qismbool.h)QisMBool FlagsOpCode Leonov SizingPointCross ValidationMode PartitionMode RoundCorners ConvexMode LeonovIn UnionizeQueueMTOpts QisMBoolNotifyVersion ControlOn_qismbool_notifyGet_qismbool_error_msgQisMBoolSettingsVersion ControlSet_clip_windowGet_clip_window_minXGet_clip_window_minYGet_clip_window_maxXGet_clip_window_maxYSet_leonov_outputGet_leonov_outputSet_max_pointsGet_max_pointsSet_overlapGet_overlapSet_sizing_modeGet_sizing_modeSet_sizing_valueGet_sizing_valueSet_pass_through_modeGet_pass_through_modeSet_merge_stripesGet_merge_stripesSet_sliverGet_sliverResetQisMBoolParamQisMBoolSettingsV2CopyCloneSet_paramGet_paramQisMBoolSettingsV3ParentQisMBoolInstVersion ControlGet_bool_idGet_last_error_msgGet_last_error_codeBooleanSTUnionMTBinaryMTReleaseQisMBoolInstV2ParentQisMBoolInstV3Export_stateImport_stateApply_settingsQisMBoolVersion ControlGet_last_error_msgGet_last_error_codeCreate_instanceDestroy_instanceNew_settingsDelete_settingsQisMBoolV2ParentQisMBoolV3Unionize_queue_mtQisMBoolXVersion ControlGet_last_error_msgGet_last_error_codePoint_on_polygonFind_connected_setsRelease_setsQisMBoolXV2Compute_leonov_embedding_levelsQisMBoolXV3ParentQisMBool Commandsbool.create_instanceboolinst.exportboolinst.importboolinst.applybool.destroy_instancebool.create_settingsbool.destroy_settingsboolsettings.setboolinst.unionboolinst.binaryboolinst.delete_storebool.unionize_to_fileQisMBool Licensing
http://artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.concepts.htm#PolygonRepresentation
ONE POLYGON
Each polygon is represented by TWO parameters --
int nv : Number of vertices/points in the polygon (the last point has the same x,y values as the first. E.g nv == 5 for a square
int* xy : An array of x,y co-ordinate values that contains nv*2 integers xy[0], xy[1] are the x, y co-ordinates of the first point xy[nv*2-2] == xy[0] and xy[nv*2-1] == xy[1] because the polygon is closed (not a path)
SET OF POLYGONS
Each set of polygons is represented by THREE parameters --
int n : Number of polygons in the set
int* nv : Array of num. of vertices per polygon in the set. For polygon i (0 <= i < n), nv[i] is the num. vertices in that polygons
int** xy : Array of xy co-ordinates per polygon in the set. For polygon i (0 <= i < n) xy[i] is the array of xy values. Num. integers in xy[i] are nv[i]*2
POLYGON UNITS
All xy co-ordinate values in QisMBool are integers (int). The polygons are assumed to be represented in database units (DBU)
1 DBU is the smallest addressable value in the co-ordinate space
e.g If a GDSII/OASIS file has units as microns and grid of 1000, 1 DBU = 0.001 microns. So an point at 1.5, 2.345 in microns would be represented as 1.5/0.001, 2.345/0.001 or 1500, 2345 in DBU
Various enumerted constants...
struct QisMBoolFlag { ... };Operation codes to be used with BooleanST and BinaryMT that define the operation to be performed between sets of polygons
xxxxxxxxxxenum OpCode { OP_UNARY_UNION=1, /* Unionize polygons in set 1 only (BinaryST) */ OP_DIFFERENCE=2, /* Compute difference: set 1 - set 2 */ OP_XOR=3, /* Compute XOR of set 1 and set 2 */ OP_INTERSECTION=4, /* Compute intersection of set 1 and set 2 */ OP_BINARY_UNION=5 /* Compute union of set 1 and set 2 */};Ways to output polygons with holes. Refer to http://www.artwork.com/gerber/netex-g/geometry_options.htm for more information
xxxxxxxxxxenum Leonov { LNV_OUT_CUTLINES=0, /* (DEFAULT) Polygons with holes are converted to polygons w/o holes by generating a pair of co-inciding edges (cutline) connecting the hole to the outer boundary */ LNV_OUT_LEONOV=1, /* Polygons with holes are represented by a set of boundaries: An outer boundary with -ve vertex count followed by one of more boundaries representing holes (+ve vertex count) */ LNV_OUT_BUTTING=-1, /* Polygons with holes are split into polygons w/o holes butting along the X axis */ LNV_OUT_ENH_CUTLINES=2 /* Introduces cutlines just like LNV_OUT_CUTLINES with insertion of redundant vertices at suitable locations along a cutline to make the polygon more resiliant to transformations */};Ways to resize polygons. Refer to http://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.concepts.htm#SizingTechniques for more information on sizing techniques
xxxxxxxxxxenum Sizing { SM_NO_SIZING=0, /* (DEFAULT) Do not resize polygons */ SM_STD_SIZING=1, /* Simplest form of sizing. This is fast but may result in illegal polygons. This should be used only when the data is guaranteed to be simple (fully convex, manhattan) */ SM_ISOTR_SIZING=2, /* A more complex form of sizing which ensures that illegal polygons will not be generated. However, the amount of sizing in X and Y is the same. Approximates a round corner as a set of three points equidistant from the original corner */ SM_NONISOTR_SIZING=3 /* Same as ISOTR_SIZING except that the amount of sizing in X and Y can be different */};Representation of different ways a point interacts/crosses a polygon
xxxxxxxxxxenum PointCross { OUTSIDE_POLY=0, /* Point lies completely outside the polygon */ INSIDE_POLY=1, /* Point is inside the polygon, not on the edges or vertices */ ON_POLY=2, /* Point lies on one of the edges of the polygon */ IS_VERTEX=3 /* Point is a vertex point */};Level of validation for the input set of polygons
xxxxxxxxxxenum ValidationMode { VM_NONE=0 /* No validation */ ,VM_FULL /* (DEFAULT) Full validation */ ,VM_NO_SELF_INTR_CHK /* Full validation without self-intersection check */ ,VM_ENHANCED /* Full validation + more specialized validation */};Data partitioning modes for multi-threaded operations https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetPartition
xxxxxxxxxxenum PartitionMode { PART_MODE_NONE=0 /* (DEFAULT) No partitioning */ ,PART_MODE_AUTO=1 /* Automatic partitioning */ ,PART_MODE_MANUAL=2 /* Manual partitioning using nx, ny values */ ,PART_MODE_AUTO_VERT_INTX=3 /* Automatic Paritioning based on polygon intersection computation (for hatch patterns) */};Options for round corners during ISOTR and NONISOTR sizing https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetRoundCorners
xxxxxxxxxxenum RoundCorners { RNDC_RIGHT_ANGLE=1 /* 90* corners to be used for manhattan data */ ,RNDC_THREE_PT=2 /* (DEFAULT) Approximates a round corner as a set of three points equidistant from the original corner */ ,RNDC_FIVE_PT=3 /*Approximates a round corner as a set of five points equidistant from the original corner*/};Options for generating convex-only polygons in the output https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetConvexOutput
xxxxxxxxxxenum ConvexMode { CNV_NONE=0 /* (DEFAULT) No convexing */ ,CNV_IN_X=1 /* Convext only along X axis */ ,CNV_FULL=2 /* Convex in both X & Y axes */ ,CNV_TRAPEZOIDS=3 /* Break into horizontal trapezoids (parallel edges along X) */ ,CNV_IN_Y=4 /* Convex along Y axis */ ,CNV_VERT_TRAPEZOIDS=5 /* Break into vertical trapezoids (parallel edges along Y) */};Specify if any of the input sets is Leonov https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetLeonovInput
xxxxxxxxxxenum LeonovIn { LNV_IN_NONE=0 /* (DEFAULT) None of the operands are Leonov */ ,LNV_IN_B=1 /* Second operand is Leonov */ ,LNV_IN_A=2 /* First operand is Leonov */ ,LNV_IN_ALL=3 /* All operands are Leonov */};Parameter types for
QisMBoolV3::Unionize_queue_mt
xxxxxxxxxxenum UnionizeQueueMTOpts { /*-------------------------------------------------------------------------- Signals the end of the list of parameters. This MUST be the last opt_code --------------------------------------------------------------------------*/ UQMT_END=0 /*-------------------------------------------------------------------------- No. of threads to be used per tile for union * Default: no. cpu(s) * MUST be followed by ONE param of type `int` --------------------------------------------------------------------------*/ ,UQMT_NT_PER_TILE /*-------------------------------------------------------------------------- Sliver value (in file units) for removal of tiny artifacts * Default: 0.0 * MUST be followed by ONE param of type `double` --------------------------------------------------------------------------*/ ,UQMT_SLIVER /*-------------------------------------------------------------------------- Reserved for future use. * MUST be followed by ONE param of type `int` --------------------------------------------------------------------------*/ ,UQMT_CLIP /*-------------------------------------------------------------------------- Output formatting for polygons with holes * MUST be one of QisMBoolFlag::Leonov * Default: QisMBoolFlag::LNV_OUT_CUTLINES * MUST be followed by ONE param of type `int` --------------------------------------------------------------------------*/ ,UQMT_LNV_OUT /*-------------------------------------------------------------------------- Specify overlap amount (file units) for butting polygons (QisMBoolFlag::LNV_OUT_BUTTING) Default: 0.0 (file units) * MUST be followed by ONE param of type `double` --------------------------------------------------------------------------*/ ,UQMT_BUTTING_OVERLAP /*-------------------------------------------------------------------------- Specify the max. no. vertices for any one output polygon Default: 8190 * MUST be followed by ONE param of type `int` --------------------------------------------------------------------------*/ ,UQMT_MAX_VERT /*-------------------------------------------------------------------------- Reserved for internal use Default: 0 * MUST be followed by ONE param of type `int` (0 or 1) --------------------------------------------------------------------------*/ ,UQMT_PASS_THROUGH /*-------------------------------------------------------------------------- Post union, merge stripes caused by partitioning Default: 0 * MUST be followed by ONE param of type `int` (0 or 1) --------------------------------------------------------------------------*/ ,UQMT_MERGE_STRIPES /*-------------------------------------------------------------------------- Specify sizing type and amount * MUST be followed by at least one param representing the sizing type (QisMBoolFlag::Sizing) * Acceptable parameters to follow are :- * QisMBoolFlag::SM_NO_SIZING (`int`) * QisMBoolFlag::SM_STD_SIZING (`int`), <sizing value> (`double`) * QisMBoolFlag::SM_ISOTR_SIZING (`int`), <sizing value> (`double`) * QisMBoolFlag::SM_NONISOTR_SIZING (`int`), <sizing x> (`double`), <sizing y> (`double`) * Default: no sizing --------------------------------------------------------------------------*/ ,UQMT_SIZING /*-------------------------------------------------------------------------- For sizing, specify how to handle acute angled corners * MUST be followed by at least one param (`int`) representing the sizing type (QisMBoolFlag::RoundCorners) * Default: QisMBoolFlag::RNDC_THREE_PT --------------------------------------------------------------------------*/ ,UQMT_SIZING_RND_CORNERS /*-------------------------------------------------------------------------- * Specify convexing mode * MUST be followed by at least one param (`int`) representing the sizing type (QisMBoolFlag::ConvexMode) * Default: No convexing (QisMBoolFlag::CNV_NONE) --------------------------------------------------------------------------*/ ,UQMT_CONVEXING /*-------------------------------------------------------------------------- Reserved for internal use * MUST be followed by ONE param of type `int` * Default: 0 --------------------------------------------------------------------------*/ ,UQMT_CRITDIM_MODE /*-------------------------------------------------------------------------- Reserved for internal use * MUST be followed by ONE param of type `double` * Default: 10.0 --------------------------------------------------------------------------*/ ,UQMT_CRITDIM_VALUE /*-------------------------------------------------------------------------- Reserved for internal use * MUST be followed by ONE param of type `const char*` --------------------------------------------------------------------------*/ ,UQMT_ACSV /*-------------------------------------------------------------------------- Reserved for internal use * MUST be followed by ONE param of type `const char*` --------------------------------------------------------------------------*/ ,UQMT_ACSP /*-------------------------------------------------------------------------- Specify the view cell * MUST be followed by ONE param of type `const char*` * Default: Deepest top cell (QisMFile::Get_default_top_cell()) --------------------------------------------------------------------------*/ ,UQMT_CELL /*-------------------------------------------------------------------------- Specify the view layers (comma-separated string of lnum(s) and/or lnum:dnum(s) * MUST be followed by ONE param of type `const char*` * Default: "ALL" --------------------------------------------------------------------------*/ ,UQMT_LAYERS /*-------------------------------------------------------------------------- Enable debug mode for troubleshooting * MUST be followed by ONE param of type `int` (0 or 1) * Default: 0 --------------------------------------------------------------------------*/ ,UQMT_DBG};Receive notifications for certain QisMBool operations
xxxxxxxxxxclass QisMBoolNotify { ... };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
The topmost base class is version 1 (V1 implied).
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMBoolNotify_cast(const int version) = 0;virtual const void* QisMBoolNotify_cast(const int version) const = 0;virtual int QisMBoolNotify_latest_version() const = 0;Notification that a set of polygons is ready for output
xxxxxxxxxxvirtual int On_qismbool_notify( const int win_id, const double lx, const double ly, const double ux, const double uy, const int* const* xy_in, const int* nv_in, const int n_in, const int* const* xy_out, const int* nv_out, const int n_out) { return 0; }Return an error string to support terminating the operation in question
xxxxxxxxxxvirtual const char* Get_qismbool_error_msg() const { return ""; }Interface to the boolean settings object used to control the execution and output of boolean operations
xxxxxxxxxxclass QisMBoolSettings { ... };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
The topmost base class is version 1 (V1 implied).
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMBoolSettings_cast(const int version) = 0;virtual const void* QisMBoolSettings_cast(const int version) const = 0;virtual int QisMBoolSettings_latest_version() const = 0;Set/Get extents of the clipping window. Default: off (0,0,0,0)
The value is in database units (dbu). e.g for a micron file with a resolution of 1000/micron (nanometer), 1 dbu = 1 nanometer
minX, minY : lower-left (min) x,y co-ordinates in DBU
maxX, maxY : upper-right (max) x,y co-ordinates in DBU
To disable clipping, set minX, minY, maxX and maxY to 0
For DBU, see 'QISMBOOL POLYGON REPRESENTATION' above
Same as QisMBoolSettingsV2::Set_param with PRM_CLIP_WINDOW_MINX, ... PRM_CLIP_WINDOW_MAXY
xxxxxxxxxxvirtual void Set_clip_window( const int minX, const int minY, const int maxX, const int maxY ) = 0;virtual int Get_clip_window_minX() const = 0;virtual int Get_clip_window_minY() const = 0;virtual int Get_clip_window_maxX() const = 0;virtual int Get_clip_window_maxY() const = 0;Set/Get mode to handle polygons with holes in the output.
Default: LNV_OUT_BUTTING
Refer to QisMBoolFlag::Leonov for various options
xxxxxxxxxxvirtual void Set_leonov_output(const QisMBoolFlag::Leonov mode) = 0;virtual QisMBoolFlag::Leonov Get_leonov_output() const = 0;Set/Get maximum number of vertices for any polygon in the output.
If a polygon contains more vertices than this limit, it is split into smaller adjoining polygons.
Default: 8190 vertices
Same as QisMBoolSettingsV2::Set_param with PRM_MAX_POINTS
xxxxxxxxxxvirtual void Set_max_points(const int value) = 0;virtual int Get_max_points() const = 0;Set/Get overlap between butting polygons (used in conjunction with LNV_OUT_BUTTING).
Default: 0 DBU
For DBU see 'QISMBOOL POLYGON REPRESENTATION' above
xxxxxxxxxxvirtual void Set_overlap(const double value) = 0;virtual double Get_overlap() const = 0;Set/Get mode to control how polygons are resized.
Default: NO_SIZING
Refer to QisMBoolFlag::Sizing for various options
xxxxxxxxxxvirtual void Set_sizing_mode(const QisMBoolFlag::Sizing mode) = 0;virtual QisMBoolFlag::Sizing Get_sizing_mode() const = 0;Set/Get the amount of sizing to be applied (in conjunction with Sizing_mode) for only STD and ISOTR sizing
Units in DBU. Default: 0 DBU
For DBU see 'QISMBOOL POLYGON REPRESENTATION' above
Refer to QisMBoolFlag::Sizing for various options
xxxxxxxxxxvirtual void Set_sizing_value(const double value) = 0;virtual double Get_sizing_value() const = 0;Reserved for internal use. Default: off (false)
xxxxxxxxxxvirtual void Set_pass_through_mode(const bool set) = 0;virtual bool Get_pass_through_mode() const = 0;Remove the partition lines created because of load-sharing (partitioning) between threads.
Default: off (false)
xxxxxxxxxxvirtual void Set_merge_stripes(const bool set) = 0;virtual bool Get_merge_stripes() const = 0;Set the threshold value (> 0.0 database units) such that polygons smaller then this value (slivers) will be removed.
Default: 0.0
xxxxxxxxxxvirtual void Set_sliver(const double value) = 0;virtual double Get_sliver() const = 0;Reset boolean settings to default values
xxxxxxxxxxvirtual void Reset() = 0;Types of parameters to be used in conjunction with
QisMBoolSettingsV2::Set_paramandQisMBoolSettingsV2::Get_param
xxxxxxxxxxstruct QisMBoolParam{ enum Type { PRM_SLIVER=1 /* set/get sliver value. Default -- 0.0 https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetSliver > double sliver = 0.0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_SLIVER, 100.0); > opts->Get_param(QisMBoolParam::PRM_SLIVER, &sliver); */ ,PRM_CLIP_WINDOW /* set/get clipping window (rectangular). Default -- 0,0,0,0 (no clipping) https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetClipWindow > int minx = 0, miny = 0, maxx = 0, maxy = 0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_CLIP_WINDOW, minx, miny, maxx, maxy); > opts->Get_param(QisMBoolParam::PRM_CLIP_WINDOW, &minx, &miny, &maxx, &maxy); */ ,PRM_LEONOV_OUT /* set/get how polygons with holes are presented in the output (see QisMBoolFlag::Leonov) > int lnv_out = QisMBoolFlag::LNV_OUT_CUTLINES; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_LEONOV_OUT, QisMBoolFlag::LNV_OUT_CUTLINES); > opts->Get_param(QisMBoolParam::PRM_LEONOV_OUT, &lnv_out); */ ,PRM_BUTTING_OVERLAP /* if PRM_LEONOV_OUT == QisMBoolFlag::LNV_OUT_BUTTING, set/get the overlap value. Default -- 0.0 https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetOverlap > double overlap = 0.0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_BUTTING_OVERLAP, 0.5); > opts->Get_param(QisMBoolParam::PRM_BUTTING_OVERLAP, &overlap); */ ,PRM_MAX_VERT /* set/get max. no. vertices per output polygon (by breaking the larger ones). Default -- 8190 https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetMaxPoints > int max_vert = 8190; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_LEONOV_OUT, 8190); > opts->Get_param(QisMBoolParam::PRM_LEONOV_OUT, &max_vert); */ ,PRM_PASS_THROUGH /* reserved for internal use only > int pass_thru = 0; QisMBoolSettingsV2* opts; Default -- off (0) > opts->Set_param(QisMBoolParam::PRM_PASS_THROUGH, 1); > opts->Get_param(QisMBoolParam::PRM_PASS_THROUGH, &pass_thru); */ ,PRM_MERGE_STRIPES /* set/get on/off - merge partition lines in the output https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetPartUnion > int merge = 0; QisMBoolSettingsV2* opts; Default -- off (0) > opts->Set_param(QisMBoolParam::PRM_MERGE_STRIPES, 1); > opts->Get_param(QisMBoolParam::PRM_MERGE_STRIPES, &merge); */ ,PRM_SIZING /* set/get sizing mode and values (see QisMBoolFlag::Sizing) + for Set_param, the no. arguments (`...`) range from 1 to 3 + the first argument for MUST be an `int` indicating the mode + the remaining arguments depend on the mode: * SM_NO_SIZING -- no additional parameters * SM_STD_SIZING, SM_ISOTR_SIZING -- specify sizing_x as double * SM_NONISOTR_SIZING -- specify sizing_x and sizing_y as double + for Get_param, all THREE addresses MUST be passed > int sizing_type = QisMBoolFlag::SM_NO_SIZING; > double sz_x = 0.0, sz_y = 0.0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_SIZING_MODE, QisMBoolFlag::SM_STD_SIZING, 1.0); > opts->Get_param(QisMBoolParam::PRM_SIZING_MODE, &sizing_type, &sz_x, &sz_y); */ ,PRM_VALIDATION_MODE /* set/get validation mode > int v_mode = QisMBoolFlag::VM_FULL; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_VALIDATION_MODE, QisMBoolFlag::VM_NONE); > opts->Get_param(QisMBoolParam::PRM_VALIDATION_MODE, &v_mode); */ ,PRM_DE_EMBEDDING /* set/get on/off -- treat polygons fully inside another polygon as holes. Default off (0) https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetDeEmbedding > int de_embed = 0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_DE_EMBEDDING, 1); > opts->Get_param(QisMBoolParam::PRM_DE_EMBEDDING, &de_embed); */ ,PRM_DATA_PARTITIONING /* set/get data partitioning strategy for multi- -threaded ops (see QisMBoolFlag::PartitionMode) > int mode = QisMBoolFlag::PART_MODE_AUTO; int nx = 0, ny = 0; > QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_DATA_PARTITIONING, QisMBoolFlag::PART_MODE_MANUAL, 4, 6); > opts->Get_param(QisMBoolParam::PRM_DATA_PARTITIONING, &mode, &nx, &ny); */ ,PRM_AUTO_PARTITIONING_NV /* set/get no. vertices to control auto partitioning (QisMBoolFlag::PART_MODE_AUTO). Default - 500,000 https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetPartitioningThreshold > int nv = 500000; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_AUTO_PARTITIONING_NV, 100000); > opts->Get_param(QisMBoolParam::PRM_AUTO_PARTITIONING_NV, &nv); */ ,PRM_SIZING_RND_CORNERS /* set/get options for ISOTR/NONISOTR sizing of round corners (see QisMBoolFlag::RoundCorners) > int type = QisMBoolFlag::RNDC_FIVE_PT; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_SIZING_RND_CORNERS, QisMBoolFlag::RNDC_THREE_PT); > opts->Get_param(QisMBoolParam::PRM_SIZING_RND_CORNERS, &type); */ ,PRM_SMOOTHING /* set/get smoothing value (Default -- 0.0) https://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.control.htm#QisBoolOptions_SetSmoothing > double smoothing = 0.0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_SMOOTHING, 0.05); > opts->Get_param(QisMBoolParam::PRM_SMOOTHING, &smoothing); */ ,PRM_CONVEXING /* set/get convex mode for output polygons (Default -- QisMBoolFlag::CNV_NONE) (See QisMBoolFlag::ConvexMode) > int cnv_mode = QisMBoolFlag::CNV_FULL; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_CONVEXING, QisMBoolFlag::CNV_IN_X); > opts->Get_param(QisMBoolParam::PRM_CONVEXING, &cnv_mode); */ ,PRM_LEONOV_IN /* set/get leonov indicator for the input polygon set (Default -- QisMBoolFlag::LNV_IN_NONE) (see QisMBoolFlag::LeonovIn) > int lnv_in = QisMBoolFlag::LNV_IN_ALL; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_CONVEXING, QisMBoolFlag::LNV_IN_A); > opts->Get_param(QisMBoolParam::PRM_CONVEXING, &lnv_in); */ ,PRM_CRITDIM_MODE /* reserved for internal use only -- 0 or 1 (default: 0) > int mode = 0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_CRITDIM_MODE, 1); > opts->Get_param(QisMBoolParam::PRM_CRITDIM_MODE, &mode); */ ,PRM_CRITDIM_VALUE /* reserved for internal use only (default: 0.0) > double dim = 0.0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_CRITDIM_VALUE, dim); > opts->Get_param(QisMBoolParam::PRM_CRITDIM_VALUE, &dim); */ ,PRM_PARTITIONING_DIRECTION_RATIO /* special care during partitioning to account for data whose extents is unusually long in X. Default: 1.5 > double ratio = 1.5; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_PARTITIONING_DIRECTION_RATIO, ratio); > opts->Get_param(QisMBoolParam::PRM_PARTITIONING_DIRECTION_RATIO, &ratio); */ ,PRM_DEFER /* reserved for internal use only -- 0 or 1 (default: 0) > int defer = 0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_DEFER, defer); > opts->Get_param(QisMBoolParam::PRM_DEFER, &defer); */ ,PRM_SPECIAL_XOR /* reserved for internal use only -- 0 or 1 (default 0) > int splxor = 0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_SPECIAL_XOR, splxor); > opts->Get_param(QisMBoolParam::PRM_SPECIAL_XOR, &splxor); */ ,PRM_NO_SPIKE_RM /* reserved for internal use only -- 0 or 1 (default 0) > int onoff = 0; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_NO_SPIKE_RM, onoff); > opts->Get_param(QisMBoolParam::PRM_NO_SPIKE_RM, &onoff); */ ,PRM_PSEUDO_CUTLINE_REM /* reserved for internal use only -- dbu value (default 3) > int dbu = 3; QisMBoolSettingsV2* opts; > opts->Set_param(QisMBoolParam::PRM_PSEUDO_CUTLINE_REM, dbu); > opts->Get_param(QisMBoolParam::PRM_PSEUDO_CUTLINE_REM, &dbu); */ ,PRM_DBG_FILE /* reserved for internal use only -- int,const char* > int dbg = 1; QisMBoolSettingsV2* opts; const char* file_path = 0; > opts->Set_param(QisMBoolParam::PRM_DBG_FILE, dbg, "settings.txt"); > opts->Get_param(QisMBoolParam::PRM_DBG_FILE, &dbg, &file_path); */ };};Extension #2 for QisMBoolSettings
xxxxxxxxxxclass QisMBoolSettingsV2: public QisMBoolSettings { ... };Copy settings from another object or create a new object with current settings
The newly created object (Clone) MUST be destroyed using QisMBool::Delete_settings
xxxxxxxxxxvirtual void Copy(const QisMBoolSettings* obj) = 0;virtual QisMBoolSettings* Clone() const = 0;Set/Get QisMBoolSettings parameter
type indicates the type of the parameter. MUST be one of the QisMBoolParam::Type values
... is the variable list of arguments related to that paramter type.
see QisMBoolParam for the various types and it's usage w.r.t these two methods
WARNING -- the arguments to these methods MUST be passed exactly as specified in the QisMBoolParam comments to avoid undefined behavior
xxxxxxxxxxvirtual bool Set_param(const int type, ...) = 0;virtual bool Get_param(const int type, ...) = 0;Extension #3 for QisMBoolSettings
xxxxxxxxxxclass QisMBoolSettingsV3: public QisMBoolSettingsV2 { ... };Get a pointer to the QisMBool API
xxxxxxxxxxvirtual QisMBool* Parent() = 0;virtual const QisMBool* Parent() const = 0;Interface to an instance of QisMBool which performs various boolean operations on polygonal data
xxxxxxxxxxclass QisMBoolInst { ... };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
The topmost base class is version 1 (V1 implied).
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMBoolInst_cast(const int version) = 0;virtual const void* QisMBoolInst_cast(const int version) const = 0;virtual int QisMBoolInst_latest_version() const = 0;Reserved for internal use
xxxxxxxxxxvirtual int Get_bool_id() const = 0;Get more information about the last error condition
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;virtual int Get_last_error_code() const = 0;Perform Boolean operations (single threaded) such as Unary Union, Binary Union, Difference, XOR and Intersection on up to two sets of polygons
xy1 : Array of xy co-ordinates per polygons in set 1
nv1 : Array of number of vertices per polygon in set 1
n1 : Number of polygons in set 1
xy2 : Array of xy co-ordinates per polygon in set 2 (NULL for OP_UNARY_UNION)
nv2 : Array of number of vertices per polygon in set 2 (NULL for OP_UNARY_UNION)
n2 : Number of polygons in set 2 (0 for OP_UNARY_UNION)
options : Handle to a boolean settings object
opCode : A numeric code to specify the boolean operation to be performed between the two sets. Any one of QisMBoolFlag::OpCode
xyO : Buffer to retreive the array of xy co-ordinates of the output polygons
nvO : Buffer to retreive the array of number of vertices per output polygon
nO : Buffer to retreive the number of output polygons
See 'QISMBOOL POLYGON REPRESENTATION' above for polygon representation
Success : true
Failure : false. Call Get_last_error_msg() or Get_last_error_code() to get more information
This method allocates new memory to store the output polygons. This memory must be released eventually using Release() to avoid memory leaks
xxxxxxxxxxvirtual bool BooleanST( const int* const* xy1, const int* nv1, const int n1, const int* const* xy2, const int* nv2, const int n2, const QisMBoolSettings* options, const QisMBoolFlag::OpCode opCode, int*** xyO, int** nvO, int* nO ) = 0;Unionize a set of polygons using multiple threads
xy : Array of xy co-ordinates per polygons in set 1
nv : Array of number of vertices per polygon in set 1
n : Number of polygons in set 1
options : Handle to a boolean settings object
thrnum : Number of concurrent threads to be used to perform this operation
xyO : Buffer to retreive the array of xy co-ordinates of the output polygons
nvO : Buffer to retreive the array of number of vertices per output polygon
nO : Buffer to retreive the number of output polygons
See 'QISMBOOL POLYGON REPRESENTATION' above for polygon representation
Success : true
Failure : false. Call Get_last_error_msg() or Get_last_error_code() to get more information
This method allocates new memory to store the output polygons. This memory must be released eventually using Release() to avoid memory leaks
xxxxxxxxxxvirtual bool UnionMT( const int* const* xy, const int* nv, const int n, const QisMBoolSettings* options, const int thrnum, int*** xyO, int** nvO, int* nO ) = 0;Perform Boolean operations such as Unary Union, Binary Union, Difference, XOR and Intersection on up to two sets of polygons using multiple threads
xy1 : Array of xy co-ordinates per polygons in set 1
nv1 : Array of number of vertices per polygon in set 1
n1 : Number of polygons in set 1
xy2 : Array of xy co-ordinates per polygon in set 2
nv2 : Array of number of vertices per polygon in set 2
n2 : Number of polygons in set 2
options : Handle to a boolean settings object
opCode : A numeric code to specify the boolean operation to be performed between the two sets. Except OP_UNARY_UNION
thrnum : Number of concurrent threads to be used to perform this operation
xyO : Buffer to retreive the array of xy co-ordinates of the output polygons
nvO : Buffer to retreive the array of number of vertices per output polygon
nO : Buffer to retreive the number of output polygons
See 'QISMBOOL POLYGON REPRESENTATION' above for polygon representation
Success : true
Failure : false. Call Get_last_error_msg() or Get_last_error_code() to get more information
This method allocates new memory to store the output polygons. This memory must be released eventually using Release() to avoid memory leaks
xxxxxxxxxxvirtual bool BinaryMT( const int* const* xy1, const int* nv1, const int n1, const int* const* xy2, const int* nv2, const int n2, const QisMBoolSettings* options, const QisMBoolFlag::OpCode opCode, const int thrnum, int*** xyO, int** nvO, int* nO ) = 0;Release the memory allocated by the Boolean operations to store output polygons
xyO: Array of the X,Y co-ordinates of the output polygons
nvO: Array of number of vertices for each output polygon
nO: Number of output polygons.
See 'QISMBOOL POLYGON REPRESENTATION' above for polygon representation
Every successful call to BooleanST(), UnionMT() or BinaryMT() must be eventually matched by a call to this function or a memory leak will occur
See http://www.artwork.com/gdsii/qisbool/QisBool_Reference/QisBool.concepts.htm#PolygonRepresentation for more information on polygon representation
xxxxxxxxxxvirtual void Release(int** xyO, int* nvO, const int nO) = 0;Extension #2 for QisMBoolInst
xxxxxxxxxxclass QisMBoolInstV2: public QisMBoolInst { ... };Get a pointer to the QisMBool API
xxxxxxxxxxvirtual QisMBool* Parent() = 0;virtual const QisMBool* Parent() const = 0;Extension #3 for QisMBoolInst
xxxxxxxxxxclass QisMBoolInstV3: public QisMBoolInstV2 { ... };Export and import state of a boolean object to a text file
DO NOT hand edit this file without consulting Artwork Conversion
The state of a boolean object only changes when it is subject to an operation such as UnionMT or BinaryMT or using Apply_settings
xxxxxxxxxxvirtual bool Export_state(const char* txt_path) const = 0;virtual bool Import_state(const char* txt_path) = 0;Apply the specified settings to the boolean object
Returns false only if the settings object is invalid
xxxxxxxxxxvirtual bool Apply_settings(const QisMBoolSettings* settings) = 0;Gateway to the QisMBool extension
xxxxxxxxxxclass QisMBool: public 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
The topmost base class is version 1 (V1 implied).
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMBool_cast(const int version) = 0;virtual const void* QisMBool_cast(const int version) const = 0;virtual int QisMBool_latest_version() const = 0;Get more information about the last error condition
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;virtual int Get_last_error_code() const = 0;Create/Destroy an instance of QisMBool
argC, argT, argV : Reserved for internal use. Pass 0, NULL, NULL respectively
Every instance of QisMBool created using Create_instance() must be destroyed using Destroy_instance() to avoid memory leaks
This method is NOT thread-safe. All instances of QisMBool object MUST be created inside the main thread
xxxxxxxxxxvirtual QisMBoolInst* Create_instance( const int argC, const char* const* argT, void* const* argV ) = 0;virtual void Destroy_instance(QisMBoolInst* handle) = 0;Create/Destroy an instance of the boolean settings object
Every instance of QisMBool created using New_settings() must be destroyed using Delete_settings() to avoid memory leaks
This method is NOT thread-safe. All instances of QisMBool object MUST be destroyed inside the main thread
xxxxxxxxxxvirtual QisMBoolSettings* New_settings() = 0;virtual void Delete_settings(QisMBoolSettings* handle_) = 0;xxxxxxxxxxclass QisMBoolV2: public QisMBool { ... };Get a handle to QisMLib
xxxxxxxxxxvirtual QisMLib* Parent() = 0;virtual const QisMLib* Parent() const = 0;xxxxxxxxxxclass QisMBoolV3: public QisMBoolV2 { ... };Unionize a partitioned view of a db processing multiple tiles in parallel
filedb is the handle to a source db
tiles is the handle to a set of tiles (partitions)
n_procs is the no. of processor threads (no. tiles to be processed in parallel)
procs is a list of processor handles that will receive the boolean output for each tile
opt_code represents the type of the next optional parameter. It MUST be one of the QisMBoolFlag::UnionizeQueueMTOpts enums. The last opt_code MUST be UQMT_END (0) indicating the end of the list.
Returns true on success. Otherwise call Get_last_error_msg() for more information
xxxxxxxxxxvirtual bool Unionize_queue_mt( QisMFile* filedb, const QisMBoxSet* tiles, QisMBoolNotify* const* procs, const int n_procs, const int opt_code, ... ) = 0;Extension API for specialized boolean operations
xxxxxxxxxxclass QisMBoolX: public 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
The topmost base class is version 1 (V1 implied).
The cast returns NULL if a version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMBoolX_cast(const int version) = 0;virtual const void* QisMBoolX_cast(const int version) const = 0;virtual int QisMBoolX_latest_version() const = 0;Get more information about the last error condition
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;virtual int Get_last_error_code() const = 0;Test if a point lies on a polygon
x,y: X,Y-coordinate of the point to be tested
xy: XY-coordinates of the polygon to be tested against
nv: Number of xy pairs in the polygon (e.g 5 for a rectangle)
See 'QISMBOOL POLYGON REPRESENTATION' above for polygon representation
One of the QisMBoolFlag::PointCross codes representing the interaction between the point and polygon
xxxxxxxxxxvirtual QisMBoolFlag::PointCross Point_on_polygon( const int x, const int y, const int* xy, const int nv ) const = 0;Group polygons from a set into sets of geometrically connected polygons
inputXY: An array of xy coordinates of the polygons in the input set
inputNV: An array of the number of vertices for each polygon in the input set inputNV[i] = count(inputXY[i])/2 for each 0 <= i < nInput
nInput: Number of polygons in the input set
setIndices: Address of a buffer to point to an array of indices (0 <= index < nInput) for each connected set
setCounts: Address of a buffer to point to an array of number of indices/polygons in each connected set. setCounts[s] = count(setIndices[s]) for each 0 <= s < nSets
nSets: Array of a buffer to store the number of connected sets
See 'QISMBOOL POLYGON REPRESENTATION' above for polygon representation
Success: true
Failure: false. Call Get_last_error_msg or Get_last_error_code to get more information
Memory to store information about connected sets (setIndices, setCounts, nSets) is allocated internally and MUST be released using Release_sets to avoid memory leak
xxxxxxxxxxvirtual bool Find_connected_sets( const int* const* inputXY, const int* inputNV, const int nInput, int**& setIndices, int*& setCounts, int& nSets ) const = 0;Release the memory allocated to store information about connected polygons
setIndices, setCounts, nSets: Values obtained from Find_connected_sets
xxxxxxxxxxvirtual void Release_sets( int** setIndices, int* setCounts, const int nSets ) const = 0;xxxxxxxxxxclass QisMBoolXV2: public QisMBoolX { ... };For a given set of leonov polygons, compute the embedding level for each boundary (outer and hole) in the set.
This can be useful in situations where there is a leonov polygon inside the holes of another leonov polygon
n is the number of boundaries in the set
nv is an array of no. vertices per boundary
xy is an array of x,y co-ordinates per boundary
levels is a CLIENT-ALLOCATED array (of n items) to be used as a buffer to store the embedding level for each boundary in the input set
Returns true on success. If false, use Get_last_error_msg or Get_last_error_code for error details
The input set MUST be LEONOV
e.g for (0 <= p < n), xy[p] is the x,y co-ordinates, nv[p] is the no. vertices and levels[p] will indicate the embedding level for boundary p in the input set
xxxxxxxxxxvirtual bool Compute_leonov_embedding_levels( const int* const* xy, const int* nv, const int n, int* levels ) = 0;xxxxxxxxxxclass QisMBoolXV3: public QisMBoolXV2 { ... };Get a handle to QisMLib
xxxxxxxxxxvirtual QisMLib* Parent() = 0;virtual const QisMLib* Parent() const = 0;See qismbool.h for the relevant C++ API
xxxxxxxxxxbool.create_instance &bool={boolinst_id}
Create an instance of the Boolean object
Equivalent to QisMBool::Create_instance in qismbool.h
{boolinst_id} is name of a variable of type QisMBoolInst* to be associated with the newly created Boolean object
Requires ONE license of (11047) which is released by bool.destroy_instance
Every object created by this command MUST be eventually destroyed by bool.destroy_instance to avoid resource leaks
xxxxxxxxxxboolinst.export $bool={id} path={txt_file}
Export the state of the specified bool object {id} to a state file {txt_file}
This state file can be then used to set the state of any bool object using boolinst.import
DO NOT hand edit this file without consulting Artwork Conversion
xxxxxxxxxxboolinst.import $bool={id} path={txt_file}
Set the state of the specified bool object {id} to that reflected by the specified state file {txt_file}
This state file MUST have been created using boolinst.export
xxxxxxxxxxboolinst.apply $bool={id} $settings={id}
Apply the specified settings to the boolean object
xxxxxxxxxxbool.destroy_instance $bool={boolinst_id}
Destroy an instance of the Boolean object
Equivalent to QisMBool::Destroy_instance in qismbool.h
{boolinst_id} is name of a variable of type QisMBoolInst* associated with the object to be destroyed
xxxxxxxxxxbool.create_settings &settings={settings_id}
Create an instance of the Boolean settings object
Equivalent to QisMBool::New_settings in qismbool.h
{settings_id} is name of a variable of type QisMBoolSettingsV2* to be associated with the newly created object
Every object created by this command MUST be eventually destroyed by bool.destroy_settings to avoid memory leak
xxxxxxxxxxbool.destroy_settings $settings={settings_id}
Destroy an instance of the Boolean settings object
Equivalent to QisMBool::Delete_settings in qismbool.h
{settings_id} is name of a variable of type QisMBoolSettingsV2* associated with the object to be destroyed
xxxxxxxxxxboolsettings.set$settings={settings_id}[reset][sliver={sliver_value}][clip={minx},{miny},{maxx},{maxy}][butting={overlap}][maxvert={count}][passthru={ON | OFF}][mergestripes={ON | OFF}][convex={OFF | X | Y | FULL | HTRAP | VTRAP}][sizing={OFF | STD | ISOTR | NONISOTR}[,{sizing_x}[,{sizing_y}]]][rndcorners={RTANGLE | THREEPT | FIVEPT}][cutlines] [lnvout] [lnvin={A | B | ALL | NONE}][grid={grid_m}] [units={units_m}][dbg={text_file}][partition=NONE | AUTO,{numvert} | MANUAL,{nx},{ny} | AUTO+,{numvert}]
Set various Boolean settings
Equivalent to QisMBoolSettingsV2::Set_param in qismbool.h
{settings_id} is name of a variable of type QisMBoolSettingsV2* associated with the settings object to be used
reset if specified, resets all the settings to default values first before applying any other parameters
{sliver_value} if specified sets the sliver parameter for removal of polygons (slivers) smaller than the specified threshold (in file units). Default: no filtering of tiny polygons
{minx}..{maxy} if specified sets the clipping window (in file units). Any polygon crossing this window will be clipped. Default: no clipping
{overlap} if specified (even 0.0), sets the polygon output mode to BUTTING with the specified overlap value along butting edges (in file units). Default: Polygons with holes have cutlines
{count} if specified sets the max. vertex count for any output polygon. Larger polygons are broken up into smaller ones. Default: 8190 vertices
passthru if specified sets/resets the pass through mode. If ON, the core boolean operation will be bypassed and only the output formatting procedures (such as clipping) will be run (Works only with boolinst.union). Default: OFF
mergestripes if ON will force the removal of all edges that were created because of data partitioning across multiple threads. Default: OFF
convex if specified activates convex mode for the output polygons. Default: OFF
sizing if specified activates the sizing mode for output polygons. Default: OFF. For STD and ISOTR, {sizing_x} MUST be specified (in file units). For NONISOTR, both {sizing_x} and {sizing_y} MUST be specified
rndcorners if specified controls sharp corners are handled during sizing. Default: (if ISOTR | NONISOTR sizing) THREEPT
lnvout if specified sets the output polygon format to Leonov
cutlines if specified sets the output polygon format to cutlines
lnvin if specified indicates the format for the source polygons. A , B implies that only the specified operand is in Leonov format. ALL implies both operands are Leonov. NONE (default) implies none of the operands are Leonov.
{grid_m} and {units_m} if specified represent the data units and resolution. Default: 1e-9 (nm) and 1e-6 (um) respectively
All dimensional values in file units
dbg if specified generates a {text_file} with detailed information about the internal state of the boolean object
partition= sets the data partitioning scheme
NONE : no partitioning
AUTO : automatic based on no. vertices {numvert} of polygon crossing
MANUAL : {nx}, {ny} tiles
AUTO+ : automatic based on no. vertices {numvert} of polygon cossing and intersections
xxxxxxxxxxboolinst.union$bool={boolinst_id}$settings={settings_id}$in={input_bin_id}&out={output_bin_id}[thrnum={n_threads}][layer={layer}]
Unionize a set of polygons
Equivalent to QisMBoolInst::UnionMT in qismbool.h
{boolinst_id} is name of a variable of type QisMBoolInst* associated with the boolean object to be used
{settings_id} is name of a variable of type QisMBoolSettingsV2* associated with the object holding the boolean settings
{input_bin_id} is name of a variable of type QisMBStore* associated with a set of polygons to be used as the source
{output_bin_id} is name of a variable of type QisMBStore* to be associated with the newly created set of resulting polygons
{n_threads} if specified indicates the number of threads to be used for this operation. Default: no. system processors
layer if specified indicates the layer number to be associated with the output polygons. Default : 0
The output set of polygons MUST be eventually destroyed using boolinst.delete_store to avoid memory leak
xxxxxxxxxxboolinst.binary$bool={boolinst_id}$settings={settings_id}$bin_a={operand_a_bin_id}$bin_b={operand_b_bin_id}&out={output_bin_id}[op={UNION | INTERSECTION | DIFFERENCE | XOR}][thrnum={n_threads}][layer={layer}]
Perform binary operation between two sets of polygons
Equivalent to QisMBoolInst::BinaryMT in qismbool.h
{boolinst_id} is name of a variable of type QisMBoolInst* associated with the boolean object to be used
{settings_id} is name of a variable of type QisMBoolSettingsV2* associated with the object holding the boolean settings
{operand_a_bin_id} and {operand_b_bin_id} are names of variables of type QisMBStore* associated with a set of polygons to be used as the operand A and operand B respectively. The operation to be performed is A op B.
{output_bin_id} is name of a variable of type QisMBStore* to be associated with the newly created set of resulting polygons
op if specified represents the boolean operator. Default: UNION
{n_threads} if specified indicates the number of threads to be used for this operation. Default: no. system processors
layer if specified indicates the layer number to be associated with the output polygons. Default : 0
The output set of polygons MUST be eventually destroyed using boolinst.delete_store to avoid memory leak
xxxxxxxxxxboolinst.delete_store $bin={bin_id}
Destroy a set of polygons created by boolinst.union or boolinst.binary ONLY
{bin_id} is name of a variable of type QisMBStore* associated with the polygon set to be destroyed
Equivalent to QisMBoolInst::Release in qismbool.h
xxxxxxxxxxbool.unionize_to_file$filedb={id}$tiles={id}[out={path}][thrnum={nt},{np}][format=oasis][sliver={value},{units}][butting={overlap},{units}][nostripes][sizing={x},{y},{units}][maxvert={4 <= n <= 8190}][layers={string}][cell={name}][top={name}][lout={l}:{d}]
Generate a file on disk from the union of all data from a view of a database
$filedb={id} is the name of the database to serve as a the source
$tiles={id} is the name of a set of tiles that will serve as both the partition as well as ROI for the data to be unionized
out={path} if specified is the output file path. If omitted, the unionized data will not be written to disk
thrnum={nt},{np} determines the multi-threading. {nt} is the no. tiles to be processed in parallel while {np} is the no. threads per tile for boolean
format=oasis if specfied will generate an oasis file. Default: GDSII (if the output path is specified)
sliver= specifies the sliver {value} in {units} (m, cm, mm, um, nm, mils, inch)
butting= splits polygons with holes into butting polygons with the specified overlap {value} in {units}
nostripes if specified removes partition lines within a tile
sizing= if specified applies non-isometric sizing along X and Y in the specified {units}
maxvert= is the maximum no. vertices for any polygon (default: 8190)
layers= is the layers of interest (default: ALL)
cell= is the view cell (default: deepest top cell of the file)
top= if specified would be the name of the output top cell (default: TOP)
lout={l}:{d} specified the layer:datatype for the output data
| COUNT | CODE | OPERATION | NOTES |
|---|---|---|---|
| +1 | 11047 | C++ QisMBool::Create_instance() | ONCE per call |
| -1 | 11047 | C++ QisMBool::Destroy_instance() | ONCE per call |
| +1 | 11047 | Script bool.create_instance | ONCE per call |
| -1 | 11047 | Script bool.destroy_instance | ONCE per call |
| +/-N | 11047 | C++ QisMBoolV3::Unionize_queue_mt | N per call, N = no. processors |
Last Updated -- Thu Jan 22 18:58:17 UTC 2026