Bool.dll Library Logo

 

Revision History

This page summarizes updates and revisions to Artwork's bool.dll library.

bool.dll Windows v2.271 10/19/12

Software crash on problematic polygon

This version of BoolDll fixes a program crash which was related to a polygon that was drawn in a questionable way.


bool.dll Windows64 v2.248 01/03/12

Software crash on Win64 in the DoBinary_MT function

This version of BoolDll fixes a bug that causes crash on Win64 in the DoBinary_MT function.

New function SetEnhancedValidation_MT

SetEnhancedValidation_MT

Syntax:
void SetEnhancedValidation_MT(short onOff, int bdll_handle);

Function:
This function controls if the input data will be undergo enhanced validation before being used for Boolean operations.
Sometimes, when the input data is very poorly constructed (e.g a leonov polygon's hole crosses the polygon's outer boundary), proceeding with the Boolean operations might cause a crash because the default validation scheme assumes that the input data has been checked for correctness and compliance.
By turning ON enhanced validation using this function, such a crash can be avoided and the Boolean functions (Boolean_MT, DoUnion_MT, DoBinary_MT) will return an error code.
This enhanced validation comes at the cost of reduced performance and is turned OFF by default.

Inputs:
onOff: 1 or 0 for ON or OFF respectively
bdll_handle: BoolDll thread handle


bool.dll Windows64 v2.239 09/10/11

First release on Windows 64 bit

This is the first version for Windows 64 bit. The 'vcredist_x86.exe' and 'vcredist_x64.exe' to be found in the installation will allow customers to use Booldll64 on bare-bone Windows 7 machines (those without Visual Studio or compatible binaries installed).


bool.dll Linux v2.234 07/25/11

New function BoolDllInit_MT to handle touching polygons

Consider a difference between layers 0 and 1 in diff.gds . The result of standard difference is diffA.gds (the results being a single polygon self touching a vertex @ 8350,12490). This result might be unacceptable. There are two ways to avoid generating self touching polygons as illustrated by diffB.gds and diffC.gds.
In diffB.gds the coinciding vertices are separated and the polygon becomes legal (on the picture below only a small vicinity of the touching point is shown). However, this solution might be unacceptable too since the position of one vertex has been changed. Another solution is to break the self touching polygon into two polygons as seen in diffC.gds . Although visually diffA.gds and diffC.gds look similar, the difference between them is that in diffA.gds there is only one polygon while in diffC.gds there are two SEPARATE polygons.

For implementing those solutions, a new version of Booldll now has as a new setup function:

void SetDisjointMode_MT(short disjointmode, int index) - see booldll.h

This function should be called after BoolDllInit_MT since the index is the return value from BoolDllInit_MT. If this function IS NOT called, the default value of disjointmode iz zero and the result of difference will be diffA.gds . If this function is called with disjointmode=1, the result will be diffB.gds and if it is called with disjointmode=2, the result will be diffC.gds .

If the user wants to return to the standard mode with disjointmode=0, he or she should call SetDisjointMode_MT with disjointmode=0.


bool.dll Windows v2.183 08/14/10

Windows release

Update release area to latest boolean engine.


bool.dll Windows v2.232 07/19/11

Certain polygons took long time to process

New releases to improve the processing speed.

Multi Threading

This version now includes "convenience" functions for OR, XOR, AND, and DIFF that automatically make use of striping and multi-threading. Please refer and follow the _OLD_STYLE compiler directive in the sample program in install_dir/sample/sample.cpp

You will need one license for every concurrent thread instantiated in BOOLDLL.
The API in the new convenience functions parallels that in the "classic" or old style Boolean_MT function. Below is an extract from the booldll.h header file to get you started.
The new convenience functions can provide many multiples of speed up ( > 10x ) over Boolean_MT for large data sets, the larger the data set the greater the improvement. For small data sets you should avoid invoking multiple threads as this will actually retard throughput.


/* **************************************************************** */
/* BOOLEAN FUNCTIONS */
/* **************************************************************** */
#define UNION_OPCODE        1
#define DIFFERENCE_OPCODE   2
#define XOR_OPCODE          3
#define INTERSECTION_OPCODE 4
#define BINARYUNION_OPCODE  5

int Boolean_MT( int*** XY_arr, int** pair_num_arr, int * N,
                int** XY1_arr, int * pair_num1_arr, int N1, 
                int** XY2_arr, int * pair_num2_arr, int N2, int code, int thrnum );

int DoUnion_MT(int*** XY_out_arr, int** pair_num_out_arr, int* Nout,
               int** XY_in_arr, int* pair_num_in_arr, int Polys,
               short index, short thrnum);

// XY_in_arr is an array of initial xydata, pair_num_in_arr is an array
// of vertex numbers and Polys is the number of initial polygon. The
// result of the union is: XY_out_arr is the address of the array of
// the final xydata, pair_num_out_arr is the address of the array of the
// final vertex numvers and Nout is the address of the number of final
// polygons. 
// index is the number returned by BoolDllInit_MT() and thrnum tells 
// the library how many threads should be used for performing union. 

int DoBinary_MT(int*** XY_out_arr, int** pair_num_out_arr, int* Nout,
                int** XY_in_arr1, int* pair_num_in_arr1, int Polys1,
                int** XY_in_arr2, int* pair_num_in_arr2, int Polys2,                
                short index, short thrnum, short operation);

// A function for performing binary boolean operations. The variable operation can
// take three values: DIFFERENCE_OPCODE, XOR_OPCODE or
// INTERSECTION_OPCODE
// The initial data now describes two operands and each of them is described as in
// DoUnion_MT. The variables describing the output, index and thrnum have the
// same meaning as in DoUnion_MT

#define DoDifference_MT(A,B,C,D,E,F,G,H,I,J,K) \
          DoBinary_MT(A,B,C,D,E,F,G,H,I,J,K,DIFFERENCE_OPCODE)

#define DoXor_MT(A,B,C,D,E,F,G,H,I,J,K) \
          DoBinary_MT(A,B,C,D,E,F,G,H,I,J,K,XOR_OPCODE)

#define DoIntersection_MT(A,B,C,D,E,F,G,H,I,J,K) \
          DoBinary_MT(A,B,C,D,E,F,G,H,I,J,K,INTERSECTION_OPCODE)


bool.dll Linux v2.231 07/18/11

New release for various Linux OS

New releases for Linux RHEL 3 and 4 in 32 and 64 bit.


bool.dll Windows v2.183 08/14/10

Windows release

Update release area to latest boolean engine.


bool.dll Windows v2.217 04/11/11

Re-entrant polygon Error

During sizing, the software had snapping issues in the cutline area. This has been fixed


bool.dll Windows v2.183 08/14/10

Windows release

Update release area to latest boolean engine.


bool.dll v2.136 02/09/09

Added Three Functions

    BoolConnectedSets

    taking a list of boundaries, finds "connected" sets of boundaries based on overlapping or touching and returns the number sets and pointers to the polygons in each set. This was originally developed for use in KLA's Care Area Wizard plug-in but currently not used.

    BoolClipPath2Region

    designed to clip a path using a boundary. Does not convert the results into a boundary but rather exports each segment of the path. Currently does not take the path width or end cap into account.

    BoolObjectInRegion

    designed to answer the question: is object1 inside of object2? Object 1 can be a path or boundary - object 2 must be a boundary.



  Documentation Download Price Revision History



ARTWORK CONVERSION SOFTWARE, INC.       Company Profile
417 Ingalls St., Santa Cruz, CA 95060    Tel (831) 426-6163     Fax 426-2824    email: info@artwork.com