v1.1
 
2D Modeling

Classes

struct  CircularProfile
 Circular profile. More...
 
struct  RectangularProfile
 Rectangular profile. More...
 
class  BoundingRect
 Bounding rectangle. More...
 
class  Curve2D
 Curve in two-dimensional space. More...
 
class  FillArea
 Fill area. More...
 
class  GeometrySet2D
 A set of geometric primitives that can include 2D curves and fills. More...
 
class  Matrix2D
 The matrix of transformation in a two-dimensional space. More...
 
class  Point2D
 Two-dimensional point. More...
 

Enumerations

enum  CoordinateSystem2D { Cartesian , Polar }
 Types of coordinate system in two dimensional space. More...
 

Functions

Curve2D CreateLineSegment2D (Point2D startPoint, Point2D endPoint)
 Creates a line segment based on two points.
 
Curve2D CreateArc2DByThreePoints (Point2D startPoint, Point2D intermediatePoint, Point2D endPoint)
 Creates a circular arc from startPoint to endPoint through intermediatePoint.
 
Curve2D CreateArc2DByCenterStartEndPoints (Point2D centerPoint, Point2D startPoint, Point2D endPoint, boolean clockwise)
 Creates a circular arc based on a center and two points.
 
Curve2D CreateCircle2D (Point2D center, number radius)
 Creates a circle.
 
Curve2D CreateRectangle2D (Point2D center, double angle, number width, number height)
 Creates a rectangle as composite curve of four line segments.
 
Curve2D CreateEllipse2D (Point2D center, number angle, number radiusAlongXAxis, number radiusAlongYAxis)
 Creates an ellipse.
 
Curve2D CreateEllipticalArc2DByCenterStartEndPoints (Point2D center, number angle, number radiusAlongXAxis, number radiusAlongYAxis, Point2D startPoint, Point2D endPoint, boolean clockwise)
 Creates elliptical arc.
 
Curve2D CreatePolyline2D (table points)
 Creates a composite curve from line segments by points.
 
Curve2D CreateParametricCurve2D (string xFunction, string yFunction, CoordinateSystem2D coordinateSystem, number tStart, number tEnd)
 Creates a curve described by parametric functions.
 
table IntersectCurves2D (Curve2D curve1, Curve2D curve2, boolean includeTouch)
 Finds the intersection points of two two-dimensional curves.
 
nil FilletCornerAfterSegment2D (Curve2D curve, number segment_index, number radius)
 Rounds the corner between the segment with index 'segment_index' and the next one.
 
nil FilletCorners2D (Curve2D curve, number radius)
 Rounds all corners of a composite curve.
 
Curve2D CreateCompositeCurve2D (table curves)
 Creates composite curve.The start point of every curve should be equal to the end point of previous.
 
table ClipCurvesByRegions (table curves, table regions, boolean invertRegions, boolean cutOnCurve)
 Clips curves by regions.
 

Enumeration Type Documentation

◆ CoordinateSystem2D

Types of coordinate system in two dimensional space.

Enumerator
Cartesian 

Cartesian coordinate system.

Polar 

Polar coordinate system.

Function Documentation

◆ ClipCurvesByRegions()

table ClipCurvesByRegions ( table curves,
table regions,
boolean invertRegions,
boolean cutOnCurve )

Clips curves by regions.

Parameters
curvesCurves to clip.
regionsRegions represented by FillArea for curves clipping.
invertRegionsInverts the regions.
cutOnCurveIf false, parts of the curve that coincide with the boundary segments are not removed.

◆ CreateArc2DByCenterStartEndPoints()

Curve2D CreateArc2DByCenterStartEndPoints ( Point2D centerPoint,
Point2D startPoint,
Point2D endPoint,
boolean clockwise )

Creates a circular arc based on a center and two points.

Parameters
centerPointThe center of the arc.
startPointThe start point of the arc. It defines the radius.
endPointThe end point of the arc.
clockwiseThe direction of the arc. true – clockwise, false – counterclockwise.

◆ CreateArc2DByThreePoints()

Curve2D CreateArc2DByThreePoints ( Point2D startPoint,
Point2D intermediatePoint,
Point2D endPoint )

Creates a circular arc from startPoint to endPoint through intermediatePoint.

Parameters
startPointThe start point of the arc.
intermediatePointPoint lying on an arc.
endPointThe end point of the arc.

◆ CreateCircle2D()

Curve2D CreateCircle2D ( Point2D center,
number radius )

Creates a circle.

Parameters
centerCircle center.
radiusRadius.

◆ CreateCompositeCurve2D()

Curve2D CreateCompositeCurve2D ( table curves)

Creates composite curve.The start point of every curve should be equal to the end point of previous.

Parameters
curvesA set of curves (Curve2D).

◆ CreateEllipse2D()

Curve2D CreateEllipse2D ( Point2D center,
number angle,
number radiusAlongXAxis,
number radiusAlongYAxis )

Creates an ellipse.

Parameters
centerEllipse center.
angleCounterclockwise rotation angle relative center, in radians.
radiusAlongXAxisSemi-axis radius along X axis.
radiusAlongYAxisSemi-axis radius along Y axis.

◆ CreateEllipticalArc2DByCenterStartEndPoints()

Curve2D CreateEllipticalArc2DByCenterStartEndPoints ( Point2D center,
number angle,
number radiusAlongXAxis,
number radiusAlongYAxis,
Point2D startPoint,
Point2D endPoint,
boolean clockwise )

Creates elliptical arc.

Parameters
centerEllipse center.
angleCounterclockwise rotation angle relative center, in radians.
radiusAlongXAxisSemi-axis radius along X axis.
radiusAlongYAxisSemi-axis radius along Y axis.
startPointThe start point of the arc.
endPointThe end point of the arc.
clockwiseThe direction of the arc. true - clockwise, false - counterclockwise.

◆ CreateLineSegment2D()

Curve2D CreateLineSegment2D ( Point2D startPoint,
Point2D endPoint )

Creates a line segment based on two points.

Parameters
startPointThe start point of the segment.
endPointThe end point of the segment.

◆ CreateParametricCurve2D()

Curve2D CreateParametricCurve2D ( string xFunction,
string yFunction,
CoordinateSystem2D coordinateSystem,
number tStart,
number tEnd )

Creates a curve described by parametric functions.

This function generates a curve described by parametric functions xFunction and yFunction. The type of coordinate system (Cartesian, polar) is indicated by the parameter coordinateSystem. The initial value of the parameter tStart and the final value tEnd are used to define the parameter range of the curve.

The parametric functions xFunction(t) and yFunction(t) are scalar functions that depend on a common parameter t and are defined as symbolic expressions.

Parameters
xFunctionExpression that describes the dependence of the X-coordinate on the parameter.
yFunctionExpression that describes the dependence of the Y-coordinate on the parameter.
coordinateSystemCoordinate system.
tStartMinimum parameter value.
tEndMaximum parameter value.

◆ CreatePolyline2D()

Curve2D CreatePolyline2D ( table points)

Creates a composite curve from line segments by points.

Parameters
pointsSet of points (Point2D).

◆ CreateRectangle2D()

Curve2D CreateRectangle2D ( Point2D center,
double angle,
number width,
number height )

Creates a rectangle as composite curve of four line segments.

Parameters
centerRectangle center.
angleCounterclockwise rotation angle from the center, in radians.
widthWidth.
heightHeight.

◆ FilletCornerAfterSegment2D()

nil FilletCornerAfterSegment2D ( Curve2D curve,
number segment_index,
number radius )

Rounds the corner between the segment with index 'segment_index' and the next one.

Parameters
curveComposite curve with corners to fillet.
segment_indexThe index of the first segment of the composite curve, 1 <= segment_index < N-1, where N - the count of the segments in the composite curve.
radiusFillet radius.

◆ FilletCorners2D()

nil FilletCorners2D ( Curve2D curve,
number radius )

Rounds all corners of a composite curve.

Parameters
curveComposite curve with corners to fillet.
radiusFillet radius.

◆ IntersectCurves2D()

table IntersectCurves2D ( Curve2D curve1,
Curve2D curve2,
boolean includeTouch )

Finds the intersection points of two two-dimensional curves.

Parameters
curve1The first curve.
curve2The second curve.
includeTouchInclude touch points.
Returns
The list of intersection and/or touch points.