v1.1
 
3D Modeling

Classes

class  Axis3D
 The axis is a vector which is attached to a fixed point. More...
 
class  Curve3D
 Curve in three-dimensional space. More...
 
class  Matrix3D
 The matrix of transformation in a three-dimensional space. More...
 
class  Placement3D
 Local coordinate system in three dimensional space. More...
 
class  Point3D
 Three-dimensional point. More...
 
class  Solid
 Solid body. More...
 
class  Vector3D
 Three-dimensional vector. More...
 

Topics

 Operation parameters
 

Enumerations

enum  CoordinateSystem3D { Cartesian , Cylindrical , Spherical }
 Types of coordinate system in three dimensional space. More...
 

Functions

Curve3D CreateLineSegment3D (Point3D startPoint, Point3D endPoint)
 Creates line segment.
 
Curve3D CreateCircle3D (Point3D center, Vector3D normal, number radius)
 Creates circle.
 
Curve3D CreateArc3DByThreePoints (Point3D startPoint, Point3D intermediatePoint, Point3D endPoint)
 Creates circular arc from startPoint to endPoint through intermediatePoint.
 
Curve3D CreateArc3DByCenterStartEndPoints (Point3D centerPoint, Point3D startPoint, Point3D endPoint, bool clockwise)
 Creates circular arc by center, start and end points.
 
Curve3D CreateEllipse3D (Point3D center, Vector3D normal, Vector3D majorVector, number majorRadius, number minorRadius)
 Creates ellipse.
 
Curve3D CreateRectangle3D (Point3D center, Vector3D normal, Vector3D widthVector, number width, number height)
 Creates a rectangle as the closed composite curve of the four line segments in 3D space.
 
Curve3D CreateEllipticalArc3D (Point3D center, Vector3D normal, Vector3D majorVector, number majorRadius, number minorRadius, Point3D startPoint, Point3D endPoint, boolean clockwise)
 Creates elliptical arc.
 
Curve3D CreateParametricCurve3D (string xFunction, string yFunction, string zFunction, CoordinateSystem3D coordinateSystem, number tStart, number tEnd, Placement3D oPlacement)
 Creates a curve described by parametric functions in 3D space.
 
Curve3D CreatePolyline3D (table points)
 Creates a composite curve from line segments by points.
 
Curve3D CreateCompositeCurve3D (table curves)
 Creates a composite curve.The start point of every curve should be equal to the end point of previous one.
 
Axis3D CreateXAxis3D ()
 Creates X axis.
 
Axis3D CreateYAxis3D ()
 Creates Y axis.
 
Axis3D CreateZAxis3D ()
 Creates Z axis.
 
Solid CreateBlock (number xSize, number ySize, number zSize, Placement3D oPlacement)
 Creates a rectangular parallelepiped.
 
Solid CreateRightCircularCylinder (number radius, number height, Placement3D oPlacement)
 Creates a right circular cylinder.
 
Solid CreateRightEllipticalCylinder (number radiusX, number radiusY, number height, Placement3D oPlacement)
 Creates a right elliptical cylinder.
 
Solid CreateRightPrism (table points, number height, Placement3D oPlacement)
 Creates a right prism.
 
Solid CreateSphere (number radius, Point3D oPoint)
 Creates a sphere.
 
Solid CreateRightCircularCone (number radius, number height, Placement3D oPlacement)
 Creates a cone.
 
Solid CreateRectangularPyramid (number width, number depth, number height, Placement3D oPlacement)
 Creates a rectangular pyramid in local coordinate system.
 
Solid CreateSweptDiskSolid (number radius, number innerRadius, Curve3D path)
 Creates a swept disk solid.
 
Solid Extrude (Curve2D contour, ExtrusionParameters parameters, Placement3D oPlacement)
 Creates an extrusion solid.
 
Solid Loft (table profiles, table placements, LoftParameters oParameters)
 Creates lofted solid.
 
Solid Evolve (Curve2D profile, Placement3D placement, Curve3D path, EvolutionParameters oParameters)
 Creates an evolution solid.
 
Solid Revolve (Curve2D generatrixCurve, Placement3D initialCurvePlacement, Axis3D rotationAxis, RevolutionParameters parameters)
 Creates a revolution solid. The revolution body is built by rotating a flat generatrix curve around the axis by a given angle.
 
nil FilletCorners3D (Curve3D curve, number radius)
 Rounds all corners of a composite curve.
 
nil FilletCornerAfterSegment3D (Curve3D curve, number segmentIndex, number radius)
 Rounds the corner between the segment with index segmentIndex and next one.
 
Solid Unite (Solid solid1, Solid solid2)
 Performs a solids boolean union operation.
 
Solid Unite (table solids)
 Performs a solids boolean union operation.
 
Solid Subtract (Solid solid1, Solid solid2)
 Performs a solids boolean subtracting operation.
 
Solid Intersect (Solid solid1, Solid solid2)
 Performs a solids boolean intersection operation.
 

Enumeration Type Documentation

◆ CoordinateSystem3D

Types of coordinate system in three dimensional space.

Enumerator
Cartesian 

Cartesian coordinate system.

Cylindrical 

Cylindrical coordinate system.

Spherical 

Spherical coordinate system.

Function Documentation

◆ CreateArc3DByCenterStartEndPoints()

Curve3D CreateArc3DByCenterStartEndPoints ( Point3D centerPoint,
Point3D startPoint,
Point3D endPoint,
bool clockwise )

Creates circular arc by center, start and end 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. If it is true, then the direction is clockwise, if viewed against of the vector product of the vectors (startPoint - centerPoint) and (endPoint - centerPoint).

◆ CreateArc3DByThreePoints()

Curve3D CreateArc3DByThreePoints ( Point3D startPoint,
Point3D intermediatePoint,
Point3D endPoint )

Creates circular arc from startPoint to endPoint through intermediatePoint.

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

◆ CreateBlock()

Solid CreateBlock ( number xSize,
number ySize,
number zSize,
Placement3D oPlacement )

Creates a rectangular parallelepiped.

The bottom center is located at the origin of the given coordinate system, edges are parallel to axes.

Parameters
xSizeLength of edges parallel to the X axis.
ySizeLength of edges parallel to the Y axis.
zSizeLength of edges parallel to the Z axis.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreateCircle3D()

Curve3D CreateCircle3D ( Point3D center,
Vector3D normal,
number radius )

Creates circle.

Parameters
centerA circle center.
normalA vector orthogonal to the circle plane.
radiusRadius.

◆ CreateCompositeCurve3D()

Curve3D CreateCompositeCurve3D ( table curves)

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

Parameters
curvesA set of curves (Curve3D).

◆ CreateEllipse3D()

Curve3D CreateEllipse3D ( Point3D center,
Vector3D normal,
Vector3D majorVector,
number majorRadius,
number minorRadius )

Creates ellipse.

Parameters
centerThe center of the ellipse.
normalThe vector orthogonal to the plane of the ellipse.
majorVectorThe vector co-directed with the first semi-axis. The second semi-axis is co-directed with the vector product normal*majorVector.
majorRadiusThe value of the first semi-axis.
minorRadiusThe value of the second semi-axis.

◆ CreateEllipticalArc3D()

Curve3D CreateEllipticalArc3D ( Point3D center,
Vector3D normal,
Vector3D majorVector,
number majorRadius,
number minorRadius,
Point3D startPoint,
Point3D endPoint,
boolean clockwise )

Creates elliptical arc.

Parameters
centerThe center of the ellipse.
normalThe vector orthogonal to the plane of the ellipse.
majorVectorThe vector co-directed with the first semi-axis. The second semi-axis is co-directed with the vector product normal*majorVector.
majorRadiusThe value of the first semi-axis.
minorRadiusThe value of the second semi-axis.
startPointThe start point of the arc.
endPointThe end point of the arc.
clockwiseThe arc direction. If equal to true, the arc directs clockwise if viewed against vector 'normal'.

◆ CreateLineSegment3D()

Curve3D CreateLineSegment3D ( Point3D startPoint,
Point3D endPoint )

Creates line segment.

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

◆ CreateParametricCurve3D()

Curve3D CreateParametricCurve3D ( string xFunction,
string yFunction,
string zFunction,
CoordinateSystem3D coordinateSystem,
number tStart,
number tEnd,
Placement3D oPlacement )

Creates a curve described by parametric functions in 3D space.

This function generates a curve described by parametric functions xFunction, yFunction and zFunction. The type of coordinate system 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), yFunction(t) and zFunction(t) are scalar functions that depend on a common parameter t and are defined as symbolic expressions.

For a cylindrical coordinate system, the functions xFunction, yFunction, zFunction describe the parameters p, φ, z, respectively. For a spherical coordinate system, the functions xFunction, yFunction, zFunction describe the parameters r, θ, φ, respectively.

Parameters
xFunctionExpression describing the dependence of the X coordinate on the parameter.
yFunctionExpression describing the dependence of the Y coordinate on the parameter.
zFunctionExpression describing the dependence of the Z coordinate on the parameter.
coordinateSystemCoordinate system.
tStartMinimum parameter value.
tEndMaximum parameter value.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreatePolyline3D()

Curve3D CreatePolyline3D ( table points)

Creates a composite curve from line segments by points.

Parameters
pointsSet of points (Point3D).

◆ CreateRectangle3D()

Curve3D CreateRectangle3D ( Point3D center,
Vector3D normal,
Vector3D widthVector,
number width,
number height )

Creates a rectangle as the closed composite curve of the four line segments in 3D space.

Parameters
centerThe center of the rectangle.
normalThe vector orthogonal to the plane of the rectangle.
widthVectorThe vector parallel to the rectangle side of size 'width'.
widthWidth.
heightHeight.

◆ CreateRectangularPyramid()

Solid CreateRectangularPyramid ( number width,
number depth,
number height,
Placement3D oPlacement )

Creates a rectangular pyramid in local coordinate system.

The base center matches with the center of local coordinate system.

Parameters
widthBase width along the local X axis.
depthBase depth along the local Y axis.
heightHeight.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreateRightCircularCone()

Solid CreateRightCircularCone ( number radius,
number height,
Placement3D oPlacement )

Creates a cone.

Base center at the origin, the axis is the same as the Z axis.

Parameters
radiusBase radius.
heightHeight.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreateRightCircularCylinder()

Solid CreateRightCircularCylinder ( number radius,
number height,
Placement3D oPlacement )

Creates a right circular cylinder.

The bottom center is located at the origin of the given coordinate system, the axis is the same as the Z axis.

Parameters
radiusRadius.
heightHeight.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreateRightEllipticalCylinder()

Solid CreateRightEllipticalCylinder ( number radiusX,
number radiusY,
number height,
Placement3D oPlacement )

Creates a right elliptical cylinder.

The bottom center is located at the origin of the given coordinate system, the axis is the same as the Z axis.

Parameters
radiusXRadius along X axis.
radiusYRadius along Y axis.
heightHeight.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreateRightPrism()

Solid CreateRightPrism ( table points,
number height,
Placement3D oPlacement )

Creates a right prism.

The bottom face is located on the XY-plane of the transferred coordinate system, the axis coincides with the Z axis.

Parameters
pointsA list of points (Point2D) that defines the edges of the prism.
heightHeight.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.

◆ CreateSphere()

Solid CreateSphere ( number radius,
Point3D oPoint )

Creates a sphere.

Parameters
radiusRadius.
oPoint[opt] Center of the sphere, the default origin.

◆ CreateSweptDiskSolid()

Solid CreateSweptDiskSolid ( number radius,
number innerRadius,
Curve3D path )

Creates a swept disk solid.

A swept disk solid is the solid produced by sweeping a circular disk along a three dimensional curve.

Parameters
radiusThe radius of the circular disk to be swept.
innerRadiusThe radius of a circular hole in the center of the disk.
pathGuide curve.

◆ Evolve()

Solid Evolve ( Curve2D profile,
Placement3D placement,
Curve3D path,
EvolutionParameters oParameters )

Creates an evolution solid.

The evolution solid is built by moving the generating curve along the guide curve.

Parameters
profileGeneratrix curve.
placementCoordinate system (Placement3D) in the XY plane of which the profile is located.
pathGuide curve.
oParameters[opt] Evolution operation parameters.
Example
local profile = CreateCircle2D(Point2D(0, 0), 25)
local placement = Placement3D(Point3D(0, 0, 0), Vector3D(0, 0, 1), Vector3D(1, 0, 0))
local path = CreateCompositeCurve3D{CreateLineSegment3D(Point3D(0, 0, 0), Point3D(0, 0, 400)),
CreateArc3DByThreePoints(Point3D(0, 0, 400), Point3D(250, 0, 650), Point3D(500, 0, 400))}
parameter = EvolutionParameters()
parameter.OutwardOffset = 10
solid = Evolve(profile, placement, path, parameter):ShowTangentEdges(false)
Local coordinate system in three dimensional space.
Two-dimensional point.
Three-dimensional point.
Three-dimensional vector.
Solid Evolve(Curve2D profile, Placement3D placement, Curve3D path, EvolutionParameters oParameters)
Creates an evolution solid.
Curve3D CreateArc3DByThreePoints(Point3D startPoint, Point3D intermediatePoint, Point3D endPoint)
Creates circular arc from startPoint to endPoint through intermediatePoint.
Curve3D CreateLineSegment3D(Point3D startPoint, Point3D endPoint)
Creates line segment.
Curve3D CreateCompositeCurve3D(table curves)
Creates a composite curve.The start point of every curve should be equal to the end point of previous...
Curve2D CreateCircle2D(Point2D center, number radius)
Creates a circle.
Parameters for Evolve() function.
Definition EvolutionParameters.h:21

◆ Extrude()

Solid Extrude ( Curve2D contour,
ExtrusionParameters parameters,
Placement3D oPlacement )

Creates an extrusion solid.

The base lies in the XY-plane, solid depth, direction, draft angle are determined by operation parameters.

Parameters
contourBase contour.
parametersExtrusion operation parameters.
oPlacement[opt] The coordinate system in which the solid is created. If not specified, the global coordinate system is used.
Example
local contour = CreateEllipse2D(Point2D(0, 0), 0, 200, 100)
local placement = Placement3D(Point3D(0, 0, 0), Vector3D(1, 0, 0), Vector3D(0, 1, 0))
local parameters = ExtrusionParameters (200, 200)
parameters.OutwardOffset = 5
parameters.InwardOffset = 5
solid = Extrude(contour, parameters, placement)
Solid Extrude(Curve2D contour, ExtrusionParameters parameters, Placement3D oPlacement)
Creates an extrusion solid.
Curve2D CreateEllipse2D(Point2D center, number angle, number radiusAlongXAxis, number radiusAlongYAxis)
Creates an ellipse.
Parameters for Extrude().
Definition ExtrusionParameters.h:30

◆ FilletCornerAfterSegment3D()

nil FilletCornerAfterSegment3D ( Curve3D curve,
number segmentIndex,
number radius )

Rounds the corner between the segment with index segmentIndex and next one.

Parameters
curveComposite curve with corners to fillet.
segmentIndexThe index of the first segment of the contour, 1 <= segmentIndex < N-1 for open curve or 1 <= segmentIndex < N for closed curve, where N - the count of the segments in the composite curve.
radiusFillet radius.

◆ FilletCorners3D()

nil FilletCorners3D ( Curve3D curve,
number radius )

Rounds all corners of a composite curve.

Parameters
curveComposite curve with corners to fillet.
radiusFillet radius.

◆ Intersect()

Solid Intersect ( Solid solid1,
Solid solid2 )

Performs a solids boolean intersection operation.

Parameters
solid1The first operand of the operation.
solid2The second operand of the operation.

◆ Loft()

Solid Loft ( table profiles,
table placements,
LoftParameters oParameters )

Creates lofted solid.

The surface of the body passes along all given plane curves. The size of the profiles array must be equal to the size of the placements array.

Parameters
profilesArray of 2D section curves (Curve2D).
placementsArray of coordinate systems (Placement3D). The curves are located in the XY-planes.
oParameters[opt] Loft operation parameters.
Example
local profiles = {CreateRectangle2D(Point2D(0, 0), 0, 100, 200),
CreateCircle2D(Point2D(0, 0), 300)}
local placements = {Placement3D(Point3D(0, 0, 0), Vector3D(0, 0, 1), Vector3D(1, 0, 0)),
Placement3D(Point3D(1000, 0, 1000), Vector3D(1, 0, 0), Vector3D(0, 0, 1))}
parameters = LoftParameters()
parameters.GuideCurve = CreateArc3DByCenterStartEndPoints(Point3D(1000, 0, 0), Point3D(0, 0, 0), Point3D(1000, 0, 1000))
solid = Loft(profiles, placements, parameters)
Solid Loft(table profiles, table placements, LoftParameters oParameters)
Creates lofted solid.
Curve3D CreateArc3DByCenterStartEndPoints(Point3D centerPoint, Point3D startPoint, Point3D endPoint, bool clockwise)
Creates circular arc by center, start and end points.
Curve2D CreateRectangle2D(Point2D center, double angle, number width, number height)
Creates a rectangle as composite curve of four line segments.
Parameters for Loft().
Definition LoftParameters.h:36

◆ Revolve()

Solid Revolve ( Curve2D generatrixCurve,
Placement3D initialCurvePlacement,
Axis3D rotationAxis,
RevolutionParameters parameters )

Creates a revolution solid. The revolution body is built by rotating a flat generatrix curve around the axis by a given angle.

Parameters
generatrixCurveA generatrix curve.
initialCurvePlacementA coordinate system. The generatrix curve lies in the XY-plane.
rotationAxisA rotation axis.
parametersRevolution operation parameters.
Example
local generatrixCurve = CreateLineSegment2D(Point2D(0, 300), Point2D(400, 0))
local initialCurvePlacement = Placement3D(Point3D(0, 0, 0), Vector3D(1, 0, 0), Vector3D(0, 1, 0))
local parameters = RevolutionParameters(math.pi)
parameters.InwardOffset = 10
solid = Revolve(generatrixCurve, initialCurvePlacement, CreateZAxis3D(), parameters)
Solid Revolve(Curve2D generatrixCurve, Placement3D initialCurvePlacement, Axis3D rotationAxis, RevolutionParameters parameters)
Creates a revolution solid. The revolution body is built by rotating a flat generatrix curve around t...
Axis3D CreateZAxis3D()
Creates Z axis.
Curve2D CreateLineSegment2D(Point2D startPoint, Point2D endPoint)
Creates a line segment based on two points.
Parameters for Revolve().
Definition RevolutionParameters.h:18

◆ Subtract()

Solid Subtract ( Solid solid1,
Solid solid2 )

Performs a solids boolean subtracting operation.

Parameters
solid1The solid to subtract from.
solid2The solid to be subtracted.

◆ Unite() [1/2]

Solid Unite ( Solid solid1,
Solid solid2 )

Performs a solids boolean union operation.

Parameters
solid1The first operand of the operation.
solid2The second operand of the operation.

◆ Unite() [2/2]

Solid Unite ( table solids)

Performs a solids boolean union operation.

Parameters
solidsSolids for the union operation.