Bcc.BooleanChainList
Bcc.BooleanChainList({ChainList1, ChainList2}, BooleanType, Tolerance)
Description
This function is utilized combine two or more closed chains via different methods
Parameters
The primary input of this function is a Table which can include the following keys:
- ChainList1 – The first chain of the boolean operation. Can be of types: Polyline, ContourList, ContourChain
- ChainList2 – The second chain of the boolean operation. Can be of types: Polyline, ContourList, ContourChain
- BooleanType - integer value representing the type of boolean operation to be performed:
- 0: Add/Union the chains together
- 1: Subtract/Difference of the chains
- 2: Intersection between the chains
- Tolerance – double representing the tolerance used for the operation. CAD system tolerance is used if this parameter is excluded.
Return
Returns an array of ContourChain lists
Examples
-- Define a 50mm square in a counterclockwise direction
pnt1 = { -25,-25, 0}
pnt2 = { 25,-25, 0}
pnt3 = { 25, 25, 0}
pnt4 = { -25, 25, 0}
-- Create the chain utilizing the points
chain1 = {{Type="Polyline", List={pnt1, pnt2, pnt3, pnt4}}
-- Define a 50mm square in a counterclockwise direction
pnt1 = { 0, 0, 0}
pnt2 = { 25, 0, 0}
pnt3 = { 25, 25, 0}
pnt4 = { 0, 25, 0}
-- Create the chain utilizing the points
chain2 = {{Type="Polyline", List={pnt1, pnt2, pnt3, pnt4}}
-- Get the resulting chain from the boolean operation
retChain = Bcc.BooleanChainList({chain1,chain2},0)