ArcFromPoints
Description
An arc defined by start and end positions
BobCAD API supports 2 different table key definition formats for flexibility in coding.
Keys
The following Keys can be created inside a table to form an arc using start and end points:
Format 1 Keys
- xStart – double value of the X coordinate of the beginning of the arc
- yStart – double value of the Y coordinate of the beginning of the arc
- zStart – double value of the Z coordinate of the beginning of the arc
- xEnd – double value of the X coordinate of the end of the arc
- yEnd – double value of the Y coordinate of the end of the arc
- zEnd – double value of the Z coordinate of the end of the arc
- xCenter – double value of the X coordinate of the center of the arc
- yCenter – double value of the Y coordinate of the center of the arc
- zCenter – double value of the Z coordinate of the center of the arc
Format 2 Keys
- StartPoint = {x,y,z}
- EndPoint = {x,y,z}
- Center = {x,y,z}
Keys in both Format 1 and 2
- Type="ArcFromPoints" - Defines this table as an arc type entity defined with start and end points
- ArcPlaneMode - Specifies the orientation of the arc - Default is "G17" if excluded
- ArcPlaneMode="G17" - XY Plane
- ArcPlaneMode="G18" - XZ Plane
- ArcPlaneMode="G19" - YZ Plane
- Direction - Alternatively to the ArcPlaneMode, a direction vector can be specified
- Direction={1,0,0}
- IsClockwise - Boolean value of the arc direction
- true - clockwise
- false - counterclockwise
- LineStyle – The entity line style used. Possible values can be:
- None – This will utilize the active document linestyle – Same as omitting this parameter
- Solid
- Dash
- Dot
- DashDot
- DashDotDot
Example
Format 1
--Minimal definition
myArc = { Type="ArcFromPoints", xStart=1.0, yStart=0.0, zStart=0.0, xEnd=1.0, yEnd=1.0, zEnd=1.0, xCenter=0.0, yCenter=0.0, zCenter=0.0, IsClockwise=false }
--Defining the plane for the arc
myArc = { Type="ArcFromPoints", xStart=1.0, yStart=0.0, zStart=0.0, xEnd=1.0, yEnd=1.0, zEnd=1.0, xCenter=0.0, yCenter=0.0, zCenter=0.0, ArcPlaneMode="G17", IsClockwise=false }
--Defining the arc normal direction
myArc = { Type="ArcFromPoints", xStart=1.0, yStart=0.0, zStart=0.0, xEnd=1.0, yEnd=1.0, zEnd=1.0, xCenter=0.0, yCenter=0.0, zCenter=0.0, Direction={0.0,0.0,1.0}, IsClockwise=false }
--Complete definition
myArc = { CmdName="My Arc", Type="ArcFromPoints", xStart=1.0, yStart=0.0, zStart=0.0, xEnd=1.0, yEnd=1.0, zEnd=1.0, xCenter=0.0, yCenter=0.0, zCenter=0.0, ArcPlaneMode="G17", IsClockwise=false, Layer="Layer Name", Color="Blue", LineStyle="Solid" }
Format 2
--Minimal definition
myArc = { Type="ArcFromPoints", StartPoint={1.0,1.0,0.0}, EndPoint={0.0,1.0,0.0}, Center={0.0,0.0,0.0}, IsClockwise=false }
--Defining the plane for the arc
myArc = { Type="ArcFromPoints", StartPoint={1.0,1.0,0.0}, EndPoint={0.0,1.0,0.0}, Center={0.0,0.0,0.0}, ArcPlaneMode="G17", IsClockwise=false }
--Defining the arc normal direction
myArc = { Type="ArcFromPoints", StartPoint={1.0,1.0,0.0}, EndPoint={0.0,1.0,0.0}, Center={0.0,0.0,0.0}, Direction={0.0,0.0,1.0}, IsClockwise=false }
--Complete definition
myArc = { CmdName="My Arc", Type="ArcFromPoints", StartPoint={1.0,1.0,0.0}, EndPoint={0.0,1.0,0.0}, Center={0.0,0.0,0.0}, ArcPlaneMode="G17", IsClockwise=false, Layer="Layer Name", Color="Blue", LineStyle="Solid" }