Tag types (#7458)
* Replace tag type with tagIdent and tagDecl Signed-off-by: Nick Cameron <nrc@ncameron.org> * Replace tagIdent with TaggedEdge and TaggedFace Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -186,7 +186,7 @@ export fn startSketchOn(
|
||||
/// Profile whose start is being used.
|
||||
@planeOrSolid: Solid | Plane,
|
||||
/// Identify a face of a solid if a solid is specified as the input argument (`planeOrSolid`).
|
||||
face?: tag,
|
||||
face?: TaggedFace,
|
||||
): Plane | Face {}
|
||||
|
||||
/// Start a new profile at a given point.
|
||||
@ -231,7 +231,7 @@ export fn startProfile(
|
||||
@(snippetArray = ["0", "0"])
|
||||
at: Point2d,
|
||||
/// Tag this first starting point.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Construct a 2-dimensional circle, of the specified radius, centered at
|
||||
@ -268,7 +268,7 @@ export fn circle(
|
||||
@(includeInSnippet = true)
|
||||
diameter?: number(Length),
|
||||
/// Create a new tag which refers to this circle.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Extend a 2-dimensional sketch through a third dimension in order to
|
||||
@ -375,9 +375,9 @@ export fn extrude(
|
||||
/// If specified, will also extrude in the opposite direction to 'distance' to the specified distance. If 'symmetric' is true, this value is ignored.
|
||||
bidirectionalLength?: number(Length),
|
||||
/// A named tag for the face at the start of the extrusion, i.e. the original sketch.
|
||||
tagStart?: tag,
|
||||
tagStart?: TagDecl,
|
||||
/// A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch.
|
||||
tagEnd?: tag,
|
||||
tagEnd?: TagDecl,
|
||||
): [Solid; 1+] {}
|
||||
|
||||
/// Works just like the `extrude` command, but also twists the sketch around
|
||||
@ -647,9 +647,9 @@ export fn revolve(
|
||||
/// If specified, will also revolve in the opposite direction to 'angle' to the specified angle. If 'symmetric' is true, this value is ignored.
|
||||
bidirectionalAngle?: number(Angle),
|
||||
/// A named tag for the face at the start of the revolve, i.e. the original sketch.
|
||||
tagStart?: tag,
|
||||
tagStart?: TagDecl,
|
||||
/// A named tag for the face at the end of the revolve.
|
||||
tagEnd?: tag,
|
||||
tagEnd?: TagDecl,
|
||||
): [Solid; 1+] {}
|
||||
|
||||
/// Just like `patternTransform`, but works on 2D sketches not 3D solids.
|
||||
@ -708,7 +708,7 @@ export fn patternTransform2d(
|
||||
@(impl = std_rust)
|
||||
export fn getOppositeEdge(
|
||||
/// The tag of the edge you want to find the opposite edge of.
|
||||
@edge: tag,
|
||||
@edge: TaggedEdge,
|
||||
): Edge {}
|
||||
|
||||
/// Get the next adjacent edge to the edge given.
|
||||
@ -742,7 +742,7 @@ export fn getOppositeEdge(
|
||||
@(impl = std_rust)
|
||||
export fn getNextAdjacentEdge(
|
||||
/// The tag of the edge you want to find the next adjacent edge of.
|
||||
@edge: tag,
|
||||
@edge: TaggedEdge,
|
||||
): Edge {}
|
||||
|
||||
/// Get the previous adjacent edge to the edge given.
|
||||
@ -776,7 +776,7 @@ export fn getNextAdjacentEdge(
|
||||
@(impl = std_rust)
|
||||
export fn getPreviousAdjacentEdge(
|
||||
/// The tag of the edge you want to find the previous adjacent edge of.
|
||||
@edge: tag,
|
||||
@edge: TaggedEdge,
|
||||
): Edge {}
|
||||
|
||||
/// Get the shared edge between two faces.
|
||||
@ -805,7 +805,7 @@ export fn getPreviousAdjacentEdge(
|
||||
@(impl = std_rust)
|
||||
export fn getCommonEdge(
|
||||
/// The tags of the faces you want to find the common edge between.
|
||||
faces: [tag; 2],
|
||||
faces: [TaggedFace; 2],
|
||||
): Edge {}
|
||||
|
||||
/// Construct a circle derived from 3 points.
|
||||
@ -826,7 +826,7 @@ export fn circleThreePoint(
|
||||
/// 3rd point to derive the circle.
|
||||
p3: Point2d,
|
||||
/// Identifier for the circle to reference elsewhere.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Create a regular polygon with the specified number of sides that is either inscribed or circumscribed around a circle of the specified radius.
|
||||
@ -984,9 +984,9 @@ export fn sweep(
|
||||
/// What is the sweep relative to? Can be either 'sketchPlane' or 'trajectoryCurve'.
|
||||
relativeTo?: string = 'trajectoryCurve',
|
||||
/// A named tag for the face at the start of the sweep, i.e. the original sketch.
|
||||
tagStart?: tag,
|
||||
tagStart?: TagDecl,
|
||||
/// A named tag for the face at the end of the sweep.
|
||||
tagEnd?: tag,
|
||||
tagEnd?: TagDecl,
|
||||
): [Solid; 1+] {}
|
||||
|
||||
/// Create a 3D surface or solid by interpolating between two or more sketches.
|
||||
@ -1068,9 +1068,9 @@ export fn loft(
|
||||
/// Tolerance for the loft operation.
|
||||
tolerance?: number(Length),
|
||||
/// A named tag for the face at the start of the loft, i.e. the original sketch.
|
||||
tagStart?: tag,
|
||||
tagStart?: TagDecl,
|
||||
/// A named tag for the face at the end of the loft.
|
||||
tagEnd?: tag,
|
||||
tagEnd?: TagDecl,
|
||||
): Solid {}
|
||||
|
||||
/// Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
|
||||
@ -1184,7 +1184,7 @@ export fn patternCircular2d(
|
||||
@(impl = std_rust)
|
||||
export fn segEnd(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): Point2d {}
|
||||
|
||||
/// Compute the ending point of the provided line segment along the 'x' axis.
|
||||
@ -1203,7 +1203,7 @@ export fn segEnd(
|
||||
@(impl = std_rust)
|
||||
export fn segEndX(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Length) {}
|
||||
|
||||
/// Compute the ending point of the provided line segment along the 'y' axis.
|
||||
@ -1223,7 +1223,7 @@ export fn segEndX(
|
||||
@(impl = std_rust)
|
||||
export fn segEndY(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Length) {}
|
||||
|
||||
/// Compute the starting point of the provided line segment.
|
||||
@ -1254,7 +1254,7 @@ export fn segEndY(
|
||||
@(impl = std_rust)
|
||||
export fn segStart(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): Point2d {}
|
||||
|
||||
/// Compute the starting point of the provided line segment along the 'x' axis.
|
||||
@ -1273,7 +1273,7 @@ export fn segStart(
|
||||
@(impl = std_rust)
|
||||
export fn segStartX(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Length) {}
|
||||
|
||||
/// Compute the starting point of the provided line segment along the 'y' axis.
|
||||
@ -1293,7 +1293,7 @@ export fn segStartX(
|
||||
@(impl = std_rust)
|
||||
export fn segStartY(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Length) {}
|
||||
|
||||
/// Extract the 'x' axis value of the last line segment in the provided 2-d sketch.
|
||||
@ -1356,7 +1356,7 @@ export fn lastSegY(
|
||||
@(impl = std_rust)
|
||||
export fn segLen(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Length) {}
|
||||
|
||||
/// Compute the angle (in degrees) of the provided line segment.
|
||||
@ -1377,7 +1377,7 @@ export fn segLen(
|
||||
@(impl = std_rust)
|
||||
export fn segAng(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Angle) {}
|
||||
|
||||
/// Returns the angle coming out of the end of the segment in degrees.
|
||||
@ -1454,7 +1454,7 @@ export fn segAng(
|
||||
@(impl = std_rust)
|
||||
export fn tangentToEnd(
|
||||
/// The line segment being queried by its tag.
|
||||
@tag: tag,
|
||||
@tag: TaggedEdge,
|
||||
): number(Angle) {}
|
||||
|
||||
/// Extract the provided 2-dimensional sketch's profile's origin value.
|
||||
@ -1526,7 +1526,7 @@ export fn involuteCircular(
|
||||
/// If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start.
|
||||
reverse?: bool = false,
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Extend the current sketch with a new straight line.
|
||||
@ -1563,7 +1563,7 @@ export fn line(
|
||||
@(includeInSnippet = true)
|
||||
end?: Point2d,
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Draw a line relative to the current origin to a specified distance away
|
||||
@ -1598,7 +1598,7 @@ export fn xLine(
|
||||
/// Which absolute X value should this line go to? Incompatible with `length`.
|
||||
endAbsolute?: number(Length),
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Draw a line relative to the current origin to a specified distance away
|
||||
@ -1628,7 +1628,7 @@ export fn yLine(
|
||||
/// Which absolute Y value should this line go to? Incompatible with `length`.
|
||||
endAbsolute?: number(Length),
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Draw a line segment relative to the current origin using the polar
|
||||
@ -1665,7 +1665,7 @@ export fn angledLine(
|
||||
/// Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given.
|
||||
endAbsoluteY?: number(Length),
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Draw an angled line from the current origin, constructing a line segment
|
||||
@ -1694,11 +1694,11 @@ export fn angledLineThatIntersects(
|
||||
/// Which angle should the line be drawn at?
|
||||
angle: number(Angle),
|
||||
/// The tag of the line to intersect with.
|
||||
intersectTag: tag,
|
||||
intersectTag: TaggedEdge,
|
||||
/// The offset from the intersecting line.
|
||||
offset?: number(Length) = 0mm,
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Construct a line segment from the current origin back to the profile's
|
||||
@ -1732,7 +1732,7 @@ export fn close(
|
||||
/// The sketch you want to close.
|
||||
@sketch: Sketch,
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Draw a curved line segment along an imaginary circle.
|
||||
@ -1789,7 +1789,7 @@ export fn arc(
|
||||
/// Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd`.
|
||||
endAbsolute?: Point2d,
|
||||
/// Create a new tag which refers to this arc.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Starting at the current sketch's origin, draw a curved line segment along
|
||||
@ -1862,7 +1862,7 @@ export fn tangentialArc(
|
||||
/// Offset of the arc. `radius` must be given. Incompatible with `end` and `endAbsolute`.
|
||||
angle?: number(Angle),
|
||||
/// Create a new tag which refers to this arc.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Draw a smooth, continuous, curved line segment from the current origin to
|
||||
@ -1910,7 +1910,7 @@ export fn bezierCurve(
|
||||
/// Coordinate on the plane at which this line should end.
|
||||
endAbsolute?: Point2d,
|
||||
/// Create a new tag which refers to this line.
|
||||
tag?: tag,
|
||||
tag?: TagDecl,
|
||||
): Sketch {}
|
||||
|
||||
/// Use a 2-dimensional sketch to cut a hole in another 2-dimensional sketch.
|
||||
|
||||
Reference in New Issue
Block a user