new CurvedLine(index, start, parsedCommand, settings) → {CurvedLine}
Creates an instance of the CurvedLine class. This class does the computations
for the G2 and G3 commands.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The line number where this command appears. |
start |
Point | The 3D start point. |
parsedCommand |
ParsedCommand | The parsed command. |
settings |
Settings | The modularity settings. |
Returns:
An instance of the CurvedLine class.
- Type
- CurvedLine
Methods
getSize() → {Size}
Returns the size of the line.
Returns:
The size.
- Type
- Size
returnLine() → {Line|boolean}
Returns a line object of type "G2" or "G3" (corresponding to
parsedCommand).
Returns:
False if impossible line else the line object.
- Type
- Line | boolean
(inner) findCenterWithRadius(start, end, clockwise, crossAxe) → {object|boolean}
Finds the center of the arc. Returns false if impossible.
Parameters:
Name | Type | Description |
---|---|---|
start |
Point | The starting point of the arc. |
end |
Point | The ending point of the arc. |
clockwise |
boolean | If the arc goes clockwise. |
crossAxe |
string | The name of the axe given by the cross product of the vectors defining the plane. |
Returns:
The center point or false.
- Type
- object | boolean