Points have position, but not length or direction. A point in space exists independently of any coordinate system which may be imposed, and thus is a coordinate-free object. However, we represent points using coordinates relative to a local or global coordinate system.

A Euclidean point in either 2D or 3D may be created, and is called
an *e2Pt* or *e3Pt*, respectively.

Vectors have length and direction, but not position. Like points, vectors exist independently of any coordinate system which may be imposed, and thus are also coordinate-free objects. Again, we represent vectors using coordinates relative to a local or global coordinate system.

A Cartesian vector in 2D or 3D is the most typical in modeling
and is called an *r2Vec* or *r3Vec*, respectively. A vector of
dimension other than 2 or 3 is called an *rnVec*.

The simplest way to create points and vectors is to just specify their coordinates. There are constructor functions for each kind of point and vector discussed above. These constructors infer the dimension of the point from the number of arguments.

pt(X,Y)

Returns- <e2Pt> Create a 2D Euclidean point with the given coordinates.
X, Y- <number> The X and Y coordinates of the point.

pt(X,Y,Z)

Returns- <e3Pt> Create a 3D Euclidean point with the given coordinates.
X, Y, Z- <number> The X, Y, and Z coordinates of the point.

ptL(CoordList)

Returns- <point> Creates a non-projective point from a list of coordinates.
CoordList- <listOf number> The list of coordinates.

ptX(Pt)

Returns- <number> The value of the X component of the point.
Pt- <point> The point to examine.

ptY(Pt)

Returns- <number> The value of the Y component of the point.
Pt- <point> The point to examine.

ptZ(Pt)

Returns- <number> The value of the Z component of the point.
Pt- <e3Pt> The point to examine.

e2(Pt)

Returns- <e2Pt> Coerce the given point to a 2D Euclidean point.
Pt- <point> A point of any kind.

e3(Pt)

Returns- <e3Pt> Coerce the given point to a 3D Euclidean point.
Pt- <point> A point of any kind.

pointP(Any)

Returns- <boolean> True if the argument is a point of any kind.
Any- <anything> The data item to test.

euclideanP(Any)

Returns- <boolean> True if the argument is a Euclidean point.
Any- <anything> The data item to test.

ptDim(Pt)

Returns- <integer:2--3> Get the dimensionality of the point argument. Note for projective points the W coordinate is not part of the dimension.
Pt- <point> The point to examine.

ptSize(Pt)

Returns- <integer> The number of coordinates in the point.
Pt- <point> The point to examine.

distPtPt(Pt1,Pt2)

Returns- <number> Calculate the distance between two points.
Pt1, Pt2- <point> Two points to check. The distance is always a positive value.

ptOffset(Pt,Vec)

Returns- <euclidPoint> Create a point offset from
Ptby the vectorVec. If the dimensions of the point and vector are different, the larger dimension is used.Pt- <euclidPoint> The reference point to offset from.
Vec- <geomVector> The vector to offset by.

ptScaledOffset(Pt,Vec,Factor)

Returns- <euclidPoint> Create a point offset from a reference point by
Vec*Factor.Pt- <euclidPoint> The reference point to offset from.
Vec- <geomVector> The direction to offset in.
Factor- <number> The scale factor to use in offsetting.

ptInterp(Pt1,Pt2,Param)

Returns- <euclidPoint> Interpolate a new point from two reference points.
Pt1, Pt2- <euclidPoint> The two points to use,
Pt1is the "zero point",Pt2is the "one point".Param- <number> The blending parameter. A value of 0.0 results in
Pt1, and value of 1.0 results inPt2.

ptBlend(PtList,CoeffList)

Returns- <euclidPoint> Perform a convex blend of a set of points and return a new point.
PtList- <listOf euclidPoint> This is the list of points to blend. The dimension of the resulting point is the same as the first point of this list.
CoeffList- <listOf number> This is the list of weight factors each point is to receive.

ptW(Pt)

Returns- <number> Extract the W component of the projective point.
Pt- <projPoint> The projective point to examine.

p2(Pt)

Returns- <p2Pt> Coerce a point to be a 2D projective point.
Pt- <point> The point to coerce.

p3(Pt)

Returns- <p3Pt> Coerce a point to be a 3D projective point.
Pt- <point> The point to coerce.

projPt(X,Y,W)

Returns- <p2Pt> Create a 2D projective point.
X, Y, W- <number> The components of the point.

projPt(X,Y,Z,W)

Returns- <p3Pt> Create a 3D projective point.
X, Y, Z, W- <number> The components of the point.

projectiveP(Any)

Returns- <boolean> Determine if an item is a projective point.
Any- <anything> Any datatype known to Alpha_1.

quat(Time, S, X, Y, Z)

Returns- <quaternion>A time-quaternion combo point (5D).
Time- <number> A time.
S- <number>Second value is the 'S' of a quaternion (s, vec).
X, Y, Z- <number>Last 3 values are the vector of a quaterion (s, vec).

vec(X,Y)

Returns- <r2Vec> Create a 2D vector from the given values.
X, Y- <number> The X and Y components of the vector.

vec(X,Y,Z)

Returns- <r3Vec> Create a 3D vector from the given values.
X, Y, Z- <number> The X, Y, and Z components of the vector.

vecL(CoordList)

Returns- <point> Creates a vector from a list of coordinates.
CoordList- <listOf number> The list of coordinates.

vecX(Vec)

Returns- <number> The value of the X component of the vector.
Vec- <anyVector> The vector to examine.

vecY(Vec)

Returns- <number> The value of the Y component of the vector.
Vec- <anyVector> The vector to examine. Note the vector must have a dimension of at least 2.

vecZ(Vec)

Returns- <number> The value of the Z component of the vector.
Vec- <r3Vec | anyVector> The vector to examine. Note the vector must have a dimension of at least 3.

r2(Vec)

Returns- <r2Vec> Coerce the given vector to a 2D vector.
Vec- <anyVector> A vector of any kind.

r3(Vec)

Returns- <r3Vec> Coerce the given vector to a 3D vector.
Vec- <anyVector> A vector of any kind.

vecP(Any)

Returns- <boolean> True if the argument is a vector of any kind.
Any- <anything> The data item to test.

vecDim(Vec)

Returns- <integer> Get the dimensionality of the vector argument.
Vec- <anyVector> The vector to examine.

vecOrigin(Dim)

Returns- <anyVector> A vector of zeros.
Dim- <integer> The dimensionality of the desired zero vector.

vecAtAngle(Angle)

Returns- <r2Vec> Construct a vector at the given angle from positive X.
Angle- <number> The angle of the vector. Positive angles go counter-clockwise from the right.

vecAngle(Vec)

Returns- <number> Return the angle of the given vector in degrees from the X axis, positive values indicate counter-clockwise rotation.
Vec- <anyVector> The vector to test. Note the vector must have a dimension of at least 2.

vecLength(Vec)

Returns- <number> Calculate the length of the given vector.
Vec- <anyVector> The vector to examine.

unitVec(Vec)

Returns- <anyVector> Normalize the given vector.
Vec- <anyVector> The vector to normalize.

vecPlus(V1,V2)

Returns- <anyVector> Perform a component-wise sum of the two vectors. The result will have the same dimension as the larger of the two arguments.
V1, V2- <anyVector> The two vectors to sum. They need not be the same dimension.

vecMinus(V1,V2)

Returns- <anyVector> Perform a component-wise difference of the two vectors. The result will have the same dimension as the larger of the two arguments.
V1, V2- <anyVector> The two vectors to subtract,
V1minusV2.

vecFrom2Pts(BasePt,EndPt)

Returns- <geomVector> Calculate the component-wise difference of two points.
BasePt, EndPt- <euclidPoint> The two endpoints of the vector. They may be of different dimensions and the larger dimension is used.

vecScale(Vec,Factor)

Returns- <anyVector> Perform a component-wise scaling of a vector.
Vec- <anyVector> The vector to scale.
Factor- <number> The scale factor to use.

vecInterp(V1,V2,Param)

Returns- <anyVector> Linearly interpolate between two vectors.
V1, V2- <anyVector> The two vectors to interpolate between.
Param- <number> The blending factor. If the value is 0.0 then
V1results, if the value is 1.0V2results.

vecBlend(VecList,CoeffList)

Returns- <anyVector> Perform a convex blend of a set of vectors and return a new vector.
VecList- <listOf anyVector> A list of vectors to blend. The resulting vector will have a dimension the same as the first vector in the list.
CoeffList- <listOf number> A list of weight factors each vector is to receive.

dotProd(V1,V2)

Returns- <anyVector> Calculate the dot product of two vectors. The result will have the dimension of the largest argument.
V1, V2- <anyVector> The two vectors to product.

crossProd(V1,V2)

Returns- <geomVector> Calculate the cross product of two vectors. The result will have the dimension of the largest argument.
V1, V2- <geomVector> The two vectors to cross product.

E2Lines are represented by a line equation in the plane. The representation
for e3Lines is more complicated and will not be discussed here. Lines have
a direction, which can be extracted by the function **dirOfLine** described
below. For e2Lines there is also a concept of "inside", related to the
line's direction. By convention, the inside is to the right in the XY-plane
if you look in the direction of the line.

Points used in the construction of lines or extracted from lines are coerced to be euclidean. (Again, "point" below will mean a euclidean point unless otherwise specified.)

There are several ways to construct lines. Vertical and horizontal
lines, parallel to the X and Y axes can be generated easily. For vertical
lines constructed with **lineVertical**, the "inside" is to the right
of the line. For horizontal lines constructed with **lineHorizontal**,
the "inside" is below the line. In other words, the direction of a **lineVertical**
is up and the direction of a **lineHorizontal** is to the right. The
direction of a line can be reversed using **reverseObj**.

lineVertical(Xoffset)

Returns- <e2Line> Create a 2D line with the indicated X coordinate parallel to the Y axis.
Xoffset- <number> The desired X coordinate of the vertical line.

lineHorizontal(Yoffset)

Returns- <e2Line> Create a 2D line with the indicated Y coordinate parallel to the X axis.
Yoffset- <number> The desired Y coordinate of the horizontal line.

linePtAngle(Pt,Angle)

Returns- <line> Create a line through the given point at the indicated angle. If an e3Pt is given the line will be a 3D line, otherwise it will be 2D.
Pt- <point> The point which the line should pass through.
Angle- <number> The angle of the line in degrees counter-clockwise from the positive X axis.

linePtVec(Pt,Vec)

Returns- <line> Create a line from the given point and vector. If either the point or vector are 3D, then the line will be 3D.
Pt- <point> The point the line should pass through.
Vec- <geomVector> A vector in the direction of the line's positive end.

lineThru2Pts(Pt1,Pt2)

Returns- <line> Create a line through the two points. If either point is 3D, then the the line will be 3D.
Pt1, Pt2- <point> The points defining the line. The positive direction of the line is from
Pt1toPt2.

linePtParallel(Pt,Line)

Returns- <line> Create a line through a point parallel to another line.
Pt- <point> The point the line should pass through.
Line- <line> The line it should be parallel to.

lineOffsetFromLine(Offset,Line)

Returns- <e2Line> Create a line offset from another line. The reference line must lie in the XY-plane.
Offset- <number> The offset distance, perpendicular to the reference line. A positive number offsets to the right of the reference line.
Line- <e2Line> The reference line (which must lie in the XY-plane).

linePtCircle(Pt,Cir,CcwFlag)

Returns- <line> Create a line through a point and tangent to a circle. If either the point or circle are 3D, then the line will be 3D.
Pt- <point> The point the line should pass through.
Cir- <circle> The circle the line should be tangent to.
CcwFlag- <boolean> If true, the line will be tangent to the counter-clockwise side of the circle.

lineTan2Circles(Cir1,Ccw1,Cir2,Ccw2)

Returns- <line> Construct a line tangent to two circles.
Cir1, Cir2- <circle> The two circles which the line must be tangent to. These circles must be coplanar.
Ccw1, Ccw2- <boolean> Flags to indicate where the tangent should touch each circle. If true the line should touch the circle going counter-clockwise.

lineP(Any)

Returns- <boolean> Determine if a given item is a line.
Any- <anything> Any datatype known to Alpha_1.

linesParallelP(Ln1,Ln2)

Returns- <boolean> Determine if the given two lines are parallel.
Ln1, Ln2- <line> The two lines to test.

dirOfLine(Line)

Returns- <geomVector> Determine the direction of the given line.
Line- <line> Any line.

dirPerpLine(Line)

Returns- <geomVector> Calculate the vector perpendicular to a line. The vector will point to the "inside" of the line.
Line- <e2Line> The reference line (must be in the XY-plane).

angleOfLine(Line)

Returns- <number> Determine the angle of a line in degrees from the positive X axis.
Line- <e2Line> Any line lying in the XY-plane.

angleBetween2Lines(Ln1,Ln2,LessThan90)

Returns- <number> Determine the angle (in degrees) between 2 lines.
Ln1, Ln2- <line> The two lines to use.
LessThan90(true)- <boolean> Optional. The two lines intersect at a point giving a small and a large angle at the point of intersection.
Lessthan90specifies which of the two possible angles to return. If true, the small angle is returned.

ptOnLine(Line)

Returns- <euclidPoint> Generate an arbitrary point on a given line.
Line- <line> Any 2D or 3D line.

ptOnLineWithX(Line,XCoord)

Returns- <euclidPoint> Calculate a point on a given line with a particular X coordinate.
Line- <line> The reference line.
XCoord- <number> The desired X coordinate of the point.

ptOnLineWithY(Line,YCoord)

Returns- <euclidPoint> Calculate a point on a given line with a particular Y coordinate.
Line- <line> The reference line.
YCoord- <number> The desired Y coordinate of the point.

ptOnLineWithZ(Line,ZCoord)

Returns- <e3Pt> Calculate a point on a given line with a particular Z coordinate.
Line- <line> The reference line.
ZCoord- <number> The desired Z coordinate of the point.

ptIntersect2Lines(Ln1,Ln2)

Returns- <euclidPoint> Calculate the intersection point of two lines. The lines need not be coplanar.
Ln1, Ln2- <line> The lines to intersect.

ptOnLineNearestLine(Ln1,Ln2)

Returns- <euclidPoint> Calculate the point on one line nearest another line.
Ln1, Ln2- <line> The two lines to use.

ptNearest2Lines(Ln1,Ln2)

Returns- <euclidPoint> Calculate a point which is the midpoint of the shortest line segment between to lines. This point is as near as possible to both lines.
Ln1, Ln2- <line> The two lines to use.

projectPtOntoLine(Pt,Line)

Returns- <euclidPoint> Calculate a point on a given line which is the perpendicular projection of a given point.
Pt- <point> The point to project.
Line- <line> The reference line to project onto.

distPtLine(Pt,Line)

Returns- <number> Calculate the unsigned distance from a point to a line.
Pt- <euclidPoint> The reference point.
Line- <line> The target line.

signedDistPtLine(Pt,Line,Vec)

Returns- <number> Calculate the signed distance between a point to a 2D line. The distance is negative if the point lies inside the line, otherwise it is positive. If the point is 3D, its projection onto the Z=0 plane is used.
Pt- <euclidPoint> The reference point.
Line- <line> The target line.

distLineLine(Ln1,Ln2)

Returns- <number> Compute the minimum distance between two (possibly parallel) lines.
Ln1, Ln2- <line> The two lines to use.

ptIntersectLinePoint(Ln1,Pt1)

Ln1- <line> The line to intersect.
Pt1- <point> The point to intersect.
Returns<euclidPoint> Returns a point at the intersection of a line and a point. This may seem a little silly, but this function is used in profedit for dependency propagation to the profile. The point must be extremely close to the line or NULL is returned.

Example code:

result: ptIntersectLinePoint(lineThru2Pts(pt(0,0),pt(0,5)), pt(0,4));

lineVerticalThruPt(Pt)

Returns- <line> Construct a 2D vertical line passing through the given 2D point.
Pt- <e2Pt> The point that the line will pass through. (If the point is not 2D, the line is through the projection of the point onto the xy plane.)

lineHorizontalThruPt(Pt)

Returns- <line> Construct a 2D horizontal line passing through the given 2D point.
Pt- <e2Pt> The point that the line will pass through. (If the point is not 2D, the line is through the projection of the point onto the xy plane.)

lineTanCircleAtAngle(Cir, Angle)

Returns- <line> Construct a 2D line at the given angle tangent to the given 2D circle.
Cir- <circle> The circle the line will be tangent to.
Angle- <number> The angle of the line, in degrees counter-clockwise from the positive X axis, similar to vecAtAngle and angleOfLine. The circle is considered to be counter-clockwise, so for example a line at angle 0 will start at the right edge of the circle and go up, and a line at angle 180 will start at the left edge of the circle and go down.

straightCurve(Pt1,Pt2)

Pt1- <circle> The start of the line segement.
Pt2- <point> The end of the line segment.
Returns<> Creates a line segment given two points.

Example code:

result: straightCurve(pt(0,0), pt(0,2));

lineXYAngle(X,Y,Angle)

X- <value> The X value.
Y- <value> The Y value.
Angle- <value> The angle in degrees from the X point to the Y point.
Returns<ln_obj> Constructs an E2 line through the given x and y values at the given angle about the Z axis. Angle is measured counterclockwise from the +X axis and is given in degrees.

Example code:

result: lineXYAngle(2, 3, 90);

polyline(Pt1, Pt2, ...)

Returns- <polyline> Construct a polyline (a collection of lines) which is formed by the points. The polyline
is notclosed. To be closed means that the polyline will connect the last point to the first point. To construct closed polylines, see PolygonPt1, Pt2, ...- <point...> The points which are connected together.

Alpha_1 provides only limited support for polygonal models, since the Alpha_1 system strives to provide a unified approach to modelling through trimmed NURBS models. However, polygonal representations are often how public domain models are distributed, thus we support importing polygonal models as collections of polylines in a simple-to-generate file format. We read a triangle format similar to the "ply" ASCII format. It is defined aspolygon(Pt1, Pt2, ...)

Returns- <polyline> Construct a polygon (a collection of lines) which is formed by the points. The polyline
isclosed. To be closed means that the polyline will connect the last point to the first point. To construct polylines which aren't closed, see PolylinePt1, Pt2, ...- <point...> The points which are connected together.

Num of vertices Num of triangles vert1x vert1y vert1z ... vertNx vertNy vertNz Tri1V1 Tri1V2 Tri1V3 ... TriNV1 TriNV2 TriNV3Note that the vertex indices are zero-origin, that is the index of the first vertex is 0, the second one is 1, and so on. Here's a simple example containing two triangles:

4 2 -0.1 0.1 -0.1 0.1 0.1 0.0 -0.1 -0.1 0.0 0.1 -0.1 -0.1 0 1 2 3 1 2

polyFromTri(Tri filename)

Returns- <polyline> Construct a polyline which is a collection of triangles. We recommend that command output is suppressed using
$;at the end of the SCL command line, since a polyline of 5,000 triangles takes a long time to print out.Tri filename- <string> The name of the ASCII tri file. (See the file format above.)

arcRadTan2Lines(Radius,From,To,FrontOfLine,RightOfLine,Rev)

Returns- <arc> Create an arc with given radius tangent to two lines.
Radius- <number> The radius of the resulting arc.
From, To- <line> The start of the arc will be tangent to
From, the end will be tangent toTo.FrontOfLine- <boolean> Optional. If
FrontOfLineis T, then the constructed circle will touchLnon its front half, otherwise it will touch it on its back half. To understand the meaning of "front half", then considerLnas bisected by a perpendicular line passing through the center of the circle. The front half is the half farther along the direction of the line.RightOfLine- <boolean> Optional. If
RightOfLineis T, then the center of the constructed circle will fall on the right side of the line, otherwise it will fall to the left side. In order for this flag to make sense, the normal ofCirmust be facing the eye.Rev- <boolean> Optional. Whether to reverse the direction of the resulting arc (so that it begins on the line and ends on the circle).

arcTan3Lines(Start,Middle,End)

Returns- <arc> Create an arc tangent to three lines.
Start, Middle, End- <line> The lines the arc will be tangent to.

arcThru3Pts(EndPt1,MiddlePt,EndPt2)

Returns- <arc> Create an arc which begins and ends at two given points and passes through a third.
EndPt1, MiddlePt, EndPt2- <euclidPoint> The three points defining the arc.

arcEndCenterEnd(Start,CenterPt,End)

Returns- <arc> Construct an arc with the given end points and the indicated center.
Start, End- <euclidPoint> The end points of the arc.
CenterPt- <euclidPoint> The center of the arc.

arcEndCornerEnd(Start, CornerPt, End)

Returns- <arc> Construct an arc with the given endpoints and tangent to the two lines formed by each of the endpoints and the given corner point.
Start, End- <euclidPoint> The end points of the arc.
CornerPt- <euclidPoint> The corner point of the arc.

arcEndDirTanLine(EndPt, Direction, TanLine)

Returns- <arc> Construct an arc with the given endpoint and the given tangent direction there, and tangent to the given line.
EndPt- <euclidPoint> The endpoint of the arc.
Direction- <geomVector> The direction of the arc through the end point.
TanLine- <line> The line tangent to the arc.

arcRadTanArcLine(Rad, Arc, Ln, startOnCircle, outsideArc)

Returns- <arc> Constructs an arc with the given radius and tangent to the given arc and line.
Rad- <number> The radius of the arc.
Arc- <arc> The arc to be tangent to.
Ln- <line> The line to be tangent to.
startOnCircle(false)- <boolean> Indicates whether the constructed arc should start on the circle or on the line.
outsideArc(false)- <boolean> Indicates whether the outside or the inside arc is desired (if the given line and circle intersect.)

arcRadTanCircleLine(Rad,Cir,Ln,CSW,FrontOfLine,RightOfLine,Rev)

Returns- <arc> Construct an arc with a given radius tangent to a circle and a line.
Rad- <number> The radius of the arc.
Cir- <circle> The circle to to be tangent to.
Ln- <line> The line to be tangent to.
CSW- <boolean> Whether the arc curves the same way as the circle at the point of tangency.
FrontOfLine- <boolean> If
FrontOfLineis T, then the constructed circle will touchLnon its front half, otherwise it will touch it on its back half. To understand the meaning of "front half", then considerLnas bisected by a perpendicular line passing through the center of the circle. The front half is the half farther along the direction of the line.RightOfLine- <boolean> If
RightOfLineis T, then the center of the constructed circle will fall on the right side of the line, otherwise it will fall to the left side. In order for this flag to make sense, the normal ofCirmust be facing the eye.Rev- <boolean> Whether to reverse the direction of the resulting arc (so that it begins on the line and ends on the circle).

arcRadTan2Arcs(Rad, Arc1, Arc2, WhichArc)

Returns- <arc> Constructs an arc with the given radius, tangent to the first given arc at the start and to the second given arc at the end.
Rad- <number> The radius of the resulting arc.
Arc1, Arc2- <arc> The two arcs the new arc will be tangent to.
WhichArc(false)- <boolean>

arcRad(Arc)

Returns- <number> Determine the radius of a given arc.
Arc- <arc> The arc to examine.

radiusOfArc(Arc)

Returns- <number> Same as arcRad.
Arc- <arc> The arc to examine.

arcCtr(Arc)

Returns- <e3Pt> Determine the center of a given arc.
Arc- <arc> The arc to examine.

centerOfArc(Arc)

Returns- <number> Same as arcCtr.
Arc- <arc> The arc to examine.

arcCWP(Arc)

Returns- <boolean> Return
trueif the arc is clockwise,falseotherwise.Arc- <arc> The arc to examine.

arcStart(Arc)

Returns- <e3Pt> Determine the first point of an arc.
Arc- <arc> The arc to examine.

arcEnd(Arc)

Returns- <e3Pt> Determine the last point of an arc.
Arc- <arc> The arc to examine.

arcNormal(Arc)

Returns- <geomVector> Return a copy of the normal vector to the given arc.
Arc- <arc> The arc to examine.

startDirOfArc(Arc)

Returns- <geomVector> A vector given the tangent direction at the beginning of the arc.
Arc- <arc> The arc to examine.

endDirOfArc(Arc)

Returns- <geomVector> A vector given the tangent direction at the end of the arc.
Arc- <arc> The arc to examine.

otherArc(Arc)

Returns- <arc> Construct the missing portion of the given arc.
Arc- <arc> The arc to complete.

arcRadTan2Circles(Rad,Cir1,Cir2,CSW1,CSW2,RightOfLine)

Returns- <arc> Construct an arc with the given radius which is tangent to two circles.
Rad- <number> The radius of the resulting arc.
Cir1, Cir2- <circle> The two target circles the arc will be tangent to.
CSW1, CSW2- <boolean> If true, the arc will curve the same way as the circle at the point of tangency.
RightOfLine(true)- <boolean> Usually, there are two circles which could be constructed.
RightOfLineflag indicates on which side the line running from the center ofCir1to the center ofCir2the constructed circle will lie. A point is considered to be to the right of the line as you look from the center ofCir1to the center ofCir2.

arcCutFromCircle(Cir,Ln)

Returns- <arc> Cuts an arc from a circle. Direction of the arc is the same as that of the Circle
Circ- <circle> The circle from which to cut the arc.
Ln- <line> The line which intersects the circle, determing the arc. The line and the circle must be coplanar.

arcFromCirc(Pt1,Pt2,Circ1,Bool)

Pt1- <circle> The start of the circular arc.
Pt2- <point> The end of the circular arc.
Circ1- <point> The circle to make the circular arc from.
Bool- <point> a boolean value that assigns which arc to take.
Returns<circ_arc_obj> Takes a circle and two points on the circle and creates an arc from the first to the second.

Example code:

result: arcFromCirc(pt(0,5), pt(5,0), circleXYRad(0, 0, 5), true);

circleCtrRad(Ctr,Rad)

Returns- <circle> Construct a circle from a center point and radius.
Ctr- <euclidPoint> The center of the circle.
Rad- <number> The radius of the circle.

circleCtrPt(Ctr,EdgePoint)

Returns- <circle> Construct a circle from a center point and a point on its edge.
Ctr- <euclidPoint> The center of the circle.
EdgePoint- <euclidPoint> A point on the edge.

circleCtrRadNormal(Ctr,Rad,Normal)

Returns- <circle> Construct a circle from a center point, radius, and normal vector.
Ctr- <euclidPoint> The center of the circle.
Rad- <number> The radius of the circle.
Normal- <geomVec> The normal vector of the plane in which the circle will lie.

circleCtr(Circle)

Returns- <euclidPoint> Determine the center point of a circle.
Circle- <circle> The circle to examine.

circleRad(Circle)

Returns- <number> Determine the raduis of a circle.
Circle- <circle> The circle to examine.

circleRadTan2Circles(Rad,Cir1,Cir2,CSW1,CSW2,RightOfLine)

Returns- <circle> Construct a circle with a given radius, tangent to two other circles.
Rad- <number> Radius of the desired circle.
Cir1, Cir2- <circle> The two tangent circles.
CSW1(true), CSW2(false)- <boolean> Indicate whether the new circle will curve the same way (true) or the opposite way (false) at the tangency points with the given circles.
RightOfLine(true)- <boolean> Usually, there are two circles which could be constructed.
RightOfLineflag indicates on which side the line running from the center ofCir1to the center ofCir2the constructed circle will lie. A point is considered to be to the right of the line as you look from the center ofCir1to the center ofCir2.

circleRadTan2Lines(Radius,Line1,Line2,Front1,Front2)

Returns- <circle> Construct a circle with a given radius (
Radius) tangent to two lines (Line1andLine2.) The lines must intersect.Radius- <number> Radius of the desired circle.
Line1, Line2- <line> Tangent lines for the circle to be constructed.
Front1(true), Front2(false)- <boolean> There are four possible circles that can be constructed from the given arguments. The flags
Front1andFront2are used to tell the constructor which circle to construct. To describe the meaning of "front", consider each line bisected by the other. The lines are divided into a front half and a back half. The front half of a line is the half which is farther along the line along its direction. IfFront1istrue, then the circle will touchLine1on the front half of the intersection, otherwise the circle will touchLine1on the back half. IfFront2istrue, then the circle will touchLine2on the front half of the intersection, otherwise the circle will touchLine2on the back half.

circleTan3Lines(Line1,Line2,Line3,LeftOfLine2)

Returns- A circle which is tangent to 3 lines.
Line1, Line2, Line3- <line> The three tangent lines. They are assumed to be planar, with lines
Line2andLine3intersectingLine1.LeftOfLine2(false)- <boolean> The
LeftOfLine2flag is used to specify on which side ofLine2the constructed circle will be. Iffalse(default) it will be on the right ofLine2.

ptIntersectCircleLine(Cir,Line,First)

Returns- <euclidPoint> Construct a point at the intersection of a circle and a line.
Cir- <circle> The circle to intersect.
Line- <line> The line to intersect it with.
First(true)- <boolean> Return the "first" intersection point. The first intersection is where the line direction of
Linepoints into the circleCir.

ptIntersectCirclePoint(Circ1,Pt1)

Circ1- <circle> The circle to intersect.
Pt1- <point> The point to intersect.
Returns<euclidPoint> Returns a point at the intersection of a line and a point. This may seem a little silly, but this function is used in profedit for dependency propagation to the profile. The point must be extremely close to the circle or NULL is returned.

Example code:

result: ptIntersectCirclePoint(circleXYRad(2, 0, 0), pt(0,2));

circleThru3Pts(EndPt1, MiddlePt, EndPt2)

Returns- <circle> Construct a circle passing through the three given points.
EndPt1, MiddlePt, EndPt2- <euclidPoint> The three points defining the circle.

circleEndCenterEnd(EndPt1, CenterPt, EndPt2)

Returns- <circle> Construct a circle going through the given endpoints and having the given center point.
EndPt1, EndPt2- <euclidPoint> The end points of the circle.
CenterPt- <euclidPoint> The center of the circle.

circleEndCornerEnd(EndPt1, CornerPt, EndPt2)

Returns- <circle> Construct a circle going through the given endpoints and tangent to the two lines formed by each of the endpoints and the given corner point.
EndPt1, EndPt2- <euclidPoint> The end points of the circle.
CornerPt- <euclidPoint> The corner point of the circle.

circleEndDirTanLine(EndPt, Direction, TanLine)

Returns- <circle> Construct a circle going through the given endpoint with the given tangent direction and tangent to the given line.
EndPt- <euclidPoint> The endpoint of the circle.
Direction- <geomVector> The direction of the arc through the end point.
TanLine- <line> The line tangent to the circle.

offsetCircle(Cir, Offset)

Returns- <circle> Construct a circle offset from the given circle by the given amount.
Cir- <circle> The circle to be offset from.
Offset- <number> The offset.

circleNormal(Cir)

Returns- <geomVector> Returns a copy of the normal vector to the given circle.
Cir- <circle> Any circle.

circleRadTanCircleLine(Radius, Cir, Line, Inside, FrontOfLine, RightOfLine)

Returns- <circle> Construct a circle with the given radius which is tangent to the given circle and line.
Radius- <number> Radius of the desired circle.
Cir- <circle> Circle that desired circle is tangent to.
Line- <line> Line that desired circle is tangent to.
Inside(true), FrontOfLine(false), RightOfLine(true)- <line> The optional flags indicate whether the constructed circle starts on the line or the circle and whether the inside or the outside circle is desired (if the given line and the given circle intersect). (There are up to 8 possible circles that can be constructed.) The default values for the flags simuate the behavior of the equivalent function in the old shape_edit.

circleXYRad(X,Y,Rad)

X- <value> The X value.
Y- <value> The Y value.
Rad- <value> The radius of the circle.
Returns<circ_obj> Constructs an E2 circle with the given x and y center and the given radius.

Example code:

result: circleXYRad(2, 2, 9);

ptIntersect2Curves(Crv1,Crv2,MaxSolutions,Tolerance,DetectEnds)

Returns- <euclidPoint | groupOf euclidPoint > Point or points at the
2-Dintersection(s) of two curves, sorted in increasing order of the parameter values of the first curve, and with Z values, if nonzero, taken from the first curve. Remember that even if you give it 3-D curves, the result is determined from the intersection of theX-Y projectionsof the curves.Crv1, Crv2- <curve> The two curves to intersect.
MaxSolutions(1)- <number>
(Optional)Positive integer, giving the maximum number of solutions to compute. If1(the default), a single point is returned and it is an error if the curves don't intersect. Otherwise a group of points is returned, and the group will be of size zero if there is no intersection. [ ] may be used to index the individual intersections out of the group.Tolerance(.001)- <number>
(Optional)Tolerance for intersection points. Defaults to.001.DetectEnds(false)- <boolean> Optional, indicates whether to detect coincident endpoints as an intersection. Defaults to
false.

planeThruPtWithNormal(Pt,Norm)

Returns- <plane> Construct a plane through the given point with given normal.
Pt- <euclidPoint> Point in the plane.
Norm- <geomVector> Normal of the plane.

planeFromAnchor(Anc)

Returns- <plane> Construct a plane that passes through the anchor's base, and normal aligned with the anchor's z axis. normal.
Anc- <anchor> Anchor specifying base and normal direction.

planeThru3Pts(Pt1,Pt2,Pt3)

Returns- <plane> Construct a plane containing the three non linear points.
Pt1- <euclidPoint> First point.
Pt2- <euclidPoint> Second point.
Pt3- <euclidPoint> Third point.

planeOffsetByDelta(Pln,Delta)

Returns- <plane> Construct a plane offset in the normal direction.
Pln- <plane> Plane.
Delta- <number> Distance to offset from
Pln.

planeNormal(Pln)

Returns- <geomVector> Normal vector of the plane.
Pln- <plane> Input plane.

signedDistPtPlane(Pln,Pt)

Returns- <number> Signed distance from a point to plane. Negative number indicates the point is behind the plane with respect to the plane normal.
Pln- <plane> Input plane.
Pt- <euclidPoint> Point to calculate distance from.

ptClosestPtPlane(Pln,Pt)

Returns- <euclidPoint> Closest point to the given point on the plane.
Pln- <plane> Input plane.
Pt- <euclidPoint> Point to calculate closest point on plane to.

distPtPlane(Pln,Pt)

Returns- <number> Distance from a point to plane.
Pln- <plane> Input plane.
Pt- <euclidPoint> Point to calculate distance from.

ptFrom3Planes(Pln1,Pln2,Pln3)

Returns- <euclidPoint> Point where the three planes intersect.
Pln1- <plane> First input plane.
Pln2- <plane> Second input plane.
Pln3- <plane> Third input plane.

ptIntersectLinePlane(Ln,Pln)

Returns- <euclidPoint> Intersection point of a line and plane if it exists.
Ln- <line> Line to intersect with plane.
Pln- <plane> Input plane.

lineIntersect2Planes(Pln1,Pln2)

Returns- <line> Calculate the intersection line of two planes. The planes must not be parallel.
Pln1, Pln2- <plane> The planes to intersect.

ptProjectPlane(Pt,Pln)

Returns- <euclidPoint> Projection of input point onto plane in the direction of the normal of the plane.
Pt- <euclidPt> Point to project onto plane.
Pln- <plane> Input plane.

ptProjectPlaneDir(Pln,Pt,Dir)

Returns- <euclidPoint> Projection of input point onto plane in the direction of the input vector.
Pln- <plane> Input plane.
Pt- <euclidPt> Point to project onto plane.
Dir- <geomVector> Direction to project point.

normalizePlane(Pln)

Returns- <plane> Construct a plane which is a normalized copy of the input.
Pln- <plane> Input plane to normalize.

ptIntersectSphereLine(Sphere,Line,First)

Returns- <euclidPoint> Construct a point at the intersection of a sphere and a line.
Sphere- <sphere> The sphere to intersect.
Line- <line> The line to intersect it with.
First(true)- <boolean> Return the "first" intersection point. The first intersection is where the line direction of
Linepoints into theSphere.

ptIntersectSphereCircle(Sphere,Circle,First)

Returns- <euclidPoint> Construct a point at the intersection of a sphere and a circle.
Sphere- <sphere> The sphere to intersect.
Circle- <circle> The circle to intersect it with.
First(true)- <boolean> Return the "first" intersection point. The first intersection is the point to the right of the line going from
Circlecenter toSpherecenter.

circIntersectSpherePlane(Sphere,Plane)

Returns- <circle> Construct a circle at the intersection of a sphere and a plane.
Sphere- <sphere> The sphere to intersect.
Plane- <plane> The plane to intersect it with.

Copyright © 1998, University of Utah a1-web@gr.cs.utah.edu