QCAD
Open Source 2D CAD
ShapeAlgorithms.js File Reference

Functions

void ShapeAlgorithms ()
 

Function Documentation

void ShapeAlgorithms ( )
Returns
Array with only the circle shapes from the given shapes.
The shape of the given shapes that is closest to the given position.
Line that is orthogonal to line and tangential to circle.
Parallels to this shape.
Parameters
distanceDistance of first parallel or concentric arc or circle.
numberNumber of offset shapes to generate.
sidePositionRVector indicating what side of the shape the parallels should be RS.LeftHand or RS.RightHand or RS.BothSides.
Returns
Array of spline shapes representing the parallel curves to the given ellipse shape.
Intersection points between shape and other shapes.
Array of shapes to extend or trim to.
Parameters
docRDocument
entityIdID of entity to exclude (typically clicked entity).
shapeShape of (clicked) entity.
extendTrue if entity is being extended.
Returns
The two distances along the given shape identifying the intersections points closest to the given position.
Parameters
onShapeTrue: only return intersections on the shape (for trimming, breaking, default). False: Also consider intersection points outside of shape (for extending).
onOtherShapesTrue only return intersections on one of the other shapes (for extending).
Returns
RCircle through all three given points (RVector) or RLine if only two points are given.
RArc through all three given points (RVector) or RLine if only two points are given.
Array of shapes of type point, line, arc, circle, ellipse.
Array of shapes which represent the given shape split up at the given points.
Parameters
pointsArray of RVector, assumed to be on shape.
Returns
An arc, circle or ellipse, whichever can be used to represent the given ellipse best.
List of points (RVector) which all lay on the given shape with the given maximum distance.