Bcc.OffsetChainList
Bcc.OffsetChainList({ChainList, OffsetDistance, OffsetDirection, IsSharpCorner, IsIntersectAll, Tolerance)
Description
This function can be used to offset a chain a desired distance.
Parameters
The primary input of this function is a Table which can include the following keys:
- ChainList – The input list of chains chain to be offset. Please see the ChainList topic for more details on this table formatting.
- OffsetDistance – double value of the distance to offset the input chain
- OffsetDirection – "Left" or "Right" are the valid inputs. Defaults is "Left" if the parameter is excluded.
- IsSharpCorner – boolean value of whether the corners of the resulting chain should be filleted or sharp. Defaults is false if the parameter is excluded.
- IsIntersectAll – boolean value of whether to trim the resulting intersections between 2 closed chains if an overlap occurs. Default is false if the parameter is excluded.
- Tolerance – double representing the tolerance used for the offset. 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
chainList = {{Type="Polyline", List={pnt1, pnt2, pnt3, pnt4}}
-- Offset this chain by 10mm
-- Store the resulting chain in retList
retList = Bcc.OffsetChainList({ChainList=chainList, OffsetDistance=10, OffsetDirection="Right", IsSharpCorner=false, IsIntersectAll=true, Tolerance=0.003})