Bcc.ChamferBetween2Entities
Bcc.ChamferBetween2Entities({ChamferMethod, parameter1, parameter2, {Entity1}, {Entity2}})
Description
This function is utilized create a chamfer between 2 entities.
Parameters
The primary input of this function is a Table which can include the following keys:
- ChamferMethod - integer value representing the chamfer creation method:
- 0: Angle and First Distance
- 1: Angle and Second Distance
- 2: First Distance and Second Distance
- parameter1 and parameter2 - this are the input angles and distances, and the meaning of the double value specified here changes depending on the ChamferMethod specified:
- ChamferMethod=0 - parameter1 is the angle and parameter2 is the first distance
- ChamferMethod=1 - parameter1 is the angle and parameter2 is the second distance
- ChamferMethod=2 - parameter1 is the first distance and parameter2 is the second distance
- Entity1 - table containing the first entity definition
- Entity2 - table containing the second entity definition
Return
Returns a ContourChain with second entity as the chamfer line if success, otherwise the result will be nil
Examples
-- Create 2 line entities
line1 = { EntityType="Line", StartPoint={-15,-25,0}, EndPoint={15,-25,0}}
line2 = { EntityType="Line", StartPoint={ 25,-15,0}, EndPoint={25, 15,0}}
-- Define the chamfer method (could typically come from a dialog option)
method=0
-- Define the distances and/or angle that will be used for the chamfer
FirstDistance=10
SecondDistance=15
Angle=45
-- Check the method type and create the chamfer getting the new resulting chain back
if(method == 0) then
retList = Bcc.ChamferBetween2Entities(method,Angle,FirstDistance,line1,line2)
elseif method == 1 then
retList = Bcc.ChamferBetween2Entities(method,Angle,SecondDistance,line1,line2)
else
retList = Bcc.ChamferBetween2Entities(method,FirstDistance,SecondDistance,line1,line2)
end