Kwargs: startProfileAt (#6424)
Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
This commit is contained in:
@ -19,7 +19,7 @@ export PI = 3.14159265358979323846264338327950288_
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 30,
|
||||
/// length = 2 * E ^ 2,
|
||||
@ -35,7 +35,7 @@ export E = 2.71828182845904523536028747135266250_
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 50,
|
||||
/// length = 10 * TAU,
|
||||
@ -51,7 +51,7 @@ export TAU = 6.28318530717958647692528676655900577_
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 30,
|
||||
/// length = 3 / cos(30deg),
|
||||
@ -68,7 +68,7 @@ export fn cos(@num: number(Angle)): number(_) {}
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 50,
|
||||
/// length = 15 / sin(135deg),
|
||||
@ -85,7 +85,7 @@ export fn sin(@num: number(Angle)): number(_) {}
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 50,
|
||||
/// length = 50 * tan((1/2): number(rad)),
|
||||
@ -103,7 +103,7 @@ export fn tan(@num: number(Angle)): number(_) {}
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = polar(angle = 30, length = 5), tag = $thing)
|
||||
/// |> line(end = [0, 5])
|
||||
/// |> line(end = [segEndX(thing), 0])
|
||||
|
@ -69,7 +69,7 @@ export END = 'end'
|
||||
/// ```
|
||||
/// // Create a helix around an edge.
|
||||
/// helper001 = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 10], tag = $edge001)
|
||||
///
|
||||
/// helixPath = helix(
|
||||
@ -157,7 +157,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// part001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([4, 12], %)
|
||||
/// |> startProfile(at = [4, 12])
|
||||
/// |> line(end = [2, 0])
|
||||
/// |> line(end = [0, -6])
|
||||
/// |> line(end = [4, -6])
|
||||
@ -181,7 +181,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// part001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([4, 12], %)
|
||||
/// |> startProfile(at = [4, 12])
|
||||
/// |> line(end = [2, 0])
|
||||
/// |> line(end = [0, -6])
|
||||
/// |> line(end = [4, -6])
|
||||
@ -195,7 +195,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// part001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([4, 12], %)
|
||||
/// |> startProfile(at = [4, 12])
|
||||
/// |> line(end = [2, 0])
|
||||
/// |> line(end = [0, -6])
|
||||
/// |> line(end = [4, -6])
|
||||
@ -207,7 +207,7 @@ export fn helix(
|
||||
/// |> revolve(axis = Y, angle = 180)
|
||||
///
|
||||
/// part002 = startSketchOn(part001, face = END)
|
||||
/// |> startProfileAt([4.5, -5], %)
|
||||
/// |> startProfile(at = [4.5, -5])
|
||||
/// |> line(end = [0, 5])
|
||||
/// |> line(end = [5, 0])
|
||||
/// |> line(end = [0, -5])
|
||||
@ -217,7 +217,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// box = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, -20])
|
||||
@ -234,7 +234,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// box = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, -20], tag = $revolveAxis)
|
||||
@ -251,7 +251,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// box = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20])
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, -20], tag = $revolveAxis)
|
||||
@ -269,7 +269,7 @@ export fn helix(
|
||||
///
|
||||
/// ```
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([10, 0], %)
|
||||
/// |> startProfile(at = [10, 0])
|
||||
/// |> line(end = [5, -5])
|
||||
/// |> line(end = [5, 5])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
@ -288,14 +288,14 @@ export fn helix(
|
||||
/// // Revolve two sketches around the same axis.
|
||||
///
|
||||
/// sketch001 = startSketchOn(XY)
|
||||
/// profile001 = startProfileAt([4, 8], sketch001)
|
||||
/// profile001 = startProfile(sketch001, at = [4, 8])
|
||||
/// |> xLine(length = 3)
|
||||
/// |> yLine(length = -3)
|
||||
/// |> xLine(length = -3)
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// profile002 = startProfileAt([-5, 8], sketch001)
|
||||
/// profile002 = startProfile(sketch001, at = [-5, 8])
|
||||
/// |> xLine(length = 3)
|
||||
/// |> yLine(length = -3)
|
||||
/// |> xLine(length = -3)
|
||||
@ -312,7 +312,7 @@ export fn helix(
|
||||
/// // Revolve around a path that has not been extruded.
|
||||
///
|
||||
/// profile001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20], tag = $revolveAxis)
|
||||
/// |> line(end = [20, 0])
|
||||
/// |> line(end = [0, -20])
|
||||
@ -327,7 +327,7 @@ export fn helix(
|
||||
/// // Revolve around a path that has not been extruded or closed.
|
||||
///
|
||||
/// profile001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20], tag = $revolveAxis)
|
||||
/// |> line(end = [20, 0])
|
||||
///
|
||||
@ -340,7 +340,7 @@ export fn helix(
|
||||
/// // Symmetrically revolve around a path.
|
||||
///
|
||||
/// profile001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20], tag = $revolveAxis)
|
||||
/// |> line(end = [20, 0])
|
||||
///
|
||||
@ -353,7 +353,7 @@ export fn helix(
|
||||
/// // Bidirectional revolve around a path.
|
||||
///
|
||||
/// profile001 = startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 20], tag = $revolveAxis)
|
||||
/// |> line(end = [20, 0])
|
||||
///
|
||||
@ -415,7 +415,7 @@ export fn toYards(@num: number(yd)): number(yd) {
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 50,
|
||||
/// length = 70 * cos(toRadians(45)),
|
||||
@ -433,7 +433,7 @@ export fn toRadians(@num: number(rad)): number(rad) {
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> angledLine(
|
||||
/// angle = 50,
|
||||
/// length = 70 * cos(toDegrees((PI/4): number(rad))),
|
||||
@ -455,7 +455,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `XY` plane using offset.
|
||||
/// squareSketch = startSketchOn(XY)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
@ -471,7 +471,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `XZ` plane using offset.
|
||||
/// squareSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
@ -487,7 +487,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `YZ` plane using offset.
|
||||
/// squareSketch = startSketchOn(YZ)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
@ -503,7 +503,7 @@ export fn toDegrees(@num: number(deg)): number(deg) {
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `-XZ` plane using offset.
|
||||
/// squareSketch = startSketchOn(-XZ)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> startProfile(at = [-100, 200])
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
@ -519,12 +519,12 @@ export fn toDegrees(@num: number(deg)): number(deg) {
|
||||
/// ```
|
||||
/// // A circle on the XY plane
|
||||
/// startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> circle( radius = 10, center = [0, 0] )
|
||||
///
|
||||
/// // Triangle on the plane 4 units above
|
||||
/// startSketchOn(offsetPlane(XY, offset = 4))
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> line(end = [0, 10])
|
||||
/// |> close()
|
||||
|
@ -13,7 +13,7 @@
|
||||
///
|
||||
/// ```
|
||||
/// exampleSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([-15, 0], %)
|
||||
/// |> startProfile(at = [-15, 0])
|
||||
/// |> line(end = [30, 0])
|
||||
/// |> line(end = [0, 30])
|
||||
/// |> line(end = [-30, 0])
|
||||
@ -43,7 +43,7 @@ export fn circle(
|
||||
/// ```
|
||||
/// // Mirror an un-closed sketch across the Y axis.
|
||||
/// sketch001 = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 10], %)
|
||||
/// |> startProfile(at = [0, 10])
|
||||
/// |> line(end = [15, 0])
|
||||
/// |> line(end = [-7, -3])
|
||||
/// |> line(end = [9, -1])
|
||||
@ -60,7 +60,7 @@ export fn circle(
|
||||
/// ```
|
||||
/// // Mirror a un-closed sketch across the Y axis.
|
||||
/// sketch001 = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 8.5], %)
|
||||
/// |> startProfile(at = [0, 8.5])
|
||||
/// |> line(end = [20, -8.5])
|
||||
/// |> line(end = [-20, -8.5])
|
||||
/// |> mirror2d(axis = Y)
|
||||
@ -71,11 +71,11 @@ export fn circle(
|
||||
/// ```
|
||||
/// // Mirror a un-closed sketch across an edge.
|
||||
/// helper001 = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> startProfile(at = [0, 0])
|
||||
/// |> line(end = [0, 10], tag = $edge001)
|
||||
///
|
||||
/// sketch001 = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 8.5], %)
|
||||
/// |> startProfile(at = [0, 8.5])
|
||||
/// |> line(end = [20, -8.5])
|
||||
/// |> line(end = [-20, -8.5])
|
||||
/// |> mirror2d(axis = edge001)
|
||||
@ -86,7 +86,7 @@ export fn circle(
|
||||
/// ```
|
||||
/// // Mirror an un-closed sketch across a custom axis.
|
||||
/// sketch001 = startSketchOn(XZ)
|
||||
/// |> startProfileAt([0, 8.5], %)
|
||||
/// |> startProfile(at = [0, 8.5])
|
||||
/// |> line(end = [20, -8.5])
|
||||
/// |> line(end = [-20, -8.5])
|
||||
/// |> mirror2d(
|
||||
@ -101,7 +101,7 @@ export fn circle(
|
||||
/// ```
|
||||
/// // Sketch on the face of a mirrored sketch, that has been extruded.
|
||||
/// sketch0011 = startSketchOn(XY)
|
||||
/// |> startProfileAt([6.77, 0], %)
|
||||
/// |> startProfile(at = [6.77, 0])
|
||||
/// |> yLine(length = 1.27)
|
||||
/// |> tangentialArc(endAbsolute = [5.96, 2.37])
|
||||
/// |> tangentialArc(endAbsolute = [-6.2, 2.44])
|
||||
|
@ -35,7 +35,7 @@ export type string
|
||||
///
|
||||
/// ```norun,inline
|
||||
/// startSketchOn(XZ)
|
||||
/// |> startProfileAt(origin, %)
|
||||
/// |> startProfile(at = origin)
|
||||
/// |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|
||||
/// |> angledLine(
|
||||
/// angle = segAng(rectangleSegmentA001) - 90,
|
||||
@ -69,7 +69,7 @@ export type string
|
||||
/// ```norun,inline
|
||||
/// fn rect(origin) {
|
||||
/// return startSketchOn(XZ)
|
||||
/// |> startProfileAt(origin, %)
|
||||
/// |> startProfile(at = origin)
|
||||
/// |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|
||||
/// |> angledLine(
|
||||
/// angle = segAng(rectangleSegmentA001) - 90,
|
||||
@ -98,7 +98,7 @@ export type string
|
||||
/// ```norun,inline
|
||||
/// fn rect(origin) {
|
||||
/// return startSketchOn(XZ)
|
||||
/// |> startProfileAt(origin, %)
|
||||
/// |> startProfile(at = origin)
|
||||
/// |> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|
||||
/// |> angledLine(
|
||||
/// angle = segAng(rectangleSegmentA001) - 90,
|
||||
@ -136,7 +136,7 @@ export type Plane
|
||||
///
|
||||
/// ```kcl,inline
|
||||
/// mySketch = startSketchOn(XY)
|
||||
/// |> startProfileAt([-12, 12], %)
|
||||
/// |> startProfile(at = [-12, 12])
|
||||
/// |> line(end = [24, 0])
|
||||
/// |> line(end = [0, -24])
|
||||
/// |> line(end = [-24, 0])
|
||||
@ -154,7 +154,7 @@ export type Plane
|
||||
/// ```kcl,inline
|
||||
/// fn createSketch() {
|
||||
/// return startSketchOn(XY)
|
||||
/// |> startProfileAt([-12, 12], %)
|
||||
/// |> startProfile(at = [-12, 12])
|
||||
/// |> line(end = [24, 0])
|
||||
/// |> line(end = [0, -24])
|
||||
/// |> line(end = [-24, 0])
|
||||
@ -180,7 +180,7 @@ export type Sketch
|
||||
///
|
||||
/// ```kcl,inline
|
||||
/// myPart = startSketchOn('XY')
|
||||
/// |> startProfileAt([-12, 12], %)
|
||||
/// |> startProfile(at = [-12, 12])
|
||||
/// |> line(end = [24, 0])
|
||||
/// |> line(end = [0, -24])
|
||||
/// |> line(end = [-24, 0])
|
||||
@ -199,7 +199,7 @@ export type Sketch
|
||||
/// ```kcl,inline
|
||||
/// fn createPart() {
|
||||
/// return startSketchOn('XY')
|
||||
/// |> startProfileAt([-12, 12], %)
|
||||
/// |> startProfile(at = [-12, 12])
|
||||
/// |> line(end = [24, 0])
|
||||
/// |> line(end = [0, -24])
|
||||
/// |> line(end = [-24, 0])
|
||||
|
Reference in New Issue
Block a user