Update test code
This commit is contained in:
@ -192,11 +192,11 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
|> line(end = [0, -1])
|
||||
|> close()
|
||||
|> extrude(length = 1)
|
||||
|> patternLinear3d({
|
||||
axis: [1, 0, 1],
|
||||
repetitions: 3,
|
||||
distance: 6
|
||||
}, %)`
|
||||
|> patternLinear3d(
|
||||
axis = [1, 0, 1],
|
||||
repetitions = 3,
|
||||
distance = 6
|
||||
)`
|
||||
)
|
||||
})
|
||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||
|
||||
@ -51,16 +51,16 @@ sketch002 = startSketchOn(sketch001, seg03)
|
||||
center = [-1.25, 1],
|
||||
radius = mountingHoleDiameter / 2,
|
||||
}, %)
|
||||
|> patternLinear2d({
|
||||
|> patternLinear2d(
|
||||
instances = 2,
|
||||
distance = 2.5,
|
||||
axis = [-1, 0],
|
||||
}, %)
|
||||
|> patternLinear2d({
|
||||
)
|
||||
|> patternLinear2d(
|
||||
instances = 2,
|
||||
distance = 4,
|
||||
axis = [0, 1],
|
||||
}, %)
|
||||
)
|
||||
|> extrude(%, length = -thickness-.01)
|
||||
|
||||
sketch003 = startSketchOn(sketch001, seg04)
|
||||
@ -68,11 +68,11 @@ sketch003 = startSketchOn(sketch001, seg04)
|
||||
center = [1, -1],
|
||||
radius = mountingHoleDiameter / 2,
|
||||
}, %)
|
||||
|> patternLinear2d({
|
||||
|> patternLinear2d(
|
||||
instances = 2,
|
||||
distance = 4,
|
||||
axis = [1, 0],
|
||||
}, %)
|
||||
)
|
||||
|> extrude(%, length = -thickness-0.1)
|
||||
`
|
||||
|
||||
|
||||
@ -944,13 +944,14 @@ mod tests {
|
||||
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
|
||||
assert_eq!(
|
||||
snippet,
|
||||
r#"patternCircular3d({
|
||||
instances = ${0:10},
|
||||
axis = [${1:3.14}, ${2:3.14}, ${3:3.14}],
|
||||
center = [${4:3.14}, ${5:3.14}, ${6:3.14}],
|
||||
arcDegrees = ${7:3.14},
|
||||
rotateDuplicates = ${8:false},
|
||||
}, ${9:%})${}"#
|
||||
r#"patternCircular3d(
|
||||
${0:%},
|
||||
instances = ${1:10},
|
||||
axis = [${2:3.14}, ${3:3.14}, ${4:3.14}],
|
||||
center = [${5:3.14}, ${6:3.14}, ${7:3.14}],
|
||||
arcDegrees = ${8:3.14},
|
||||
rotateDuplicates = ${9:false},
|
||||
)${}"#
|
||||
);
|
||||
}
|
||||
|
||||
@ -1006,11 +1007,12 @@ mod tests {
|
||||
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
|
||||
assert_eq!(
|
||||
snippet,
|
||||
r#"patternLinear2d({
|
||||
instances = ${0:10},
|
||||
distance = ${1:3.14},
|
||||
axis = [${2:3.14}, ${3:3.14}],
|
||||
}, ${4:%})${}"#
|
||||
r#"patternLinear2d(
|
||||
${0:%},
|
||||
instances = ${1:10},
|
||||
distance = ${2:3.14},
|
||||
axis = [${3:3.14}, ${4:3.14}],
|
||||
, )${}"#
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1543,13 +1543,13 @@ sphere = startSketchOn('XZ')
|
||||
}, %)
|
||||
|> close()
|
||||
|> revolve({ axis: 'x' }, %)
|
||||
|> patternCircular3d({
|
||||
|> patternCircular3d(
|
||||
axis: [0, 0, 1],
|
||||
center: [0, 0, 0],
|
||||
repetitions: 10,
|
||||
arcDegrees: 360,
|
||||
rotateDuplicates: true
|
||||
}, %)
|
||||
)
|
||||
|
||||
// Sketch and revolve the outside bearing
|
||||
outsideRevolve = startSketchOn('XZ')
|
||||
@ -1644,13 +1644,13 @@ sphere = startSketchOn('XZ')
|
||||
}, %)
|
||||
|> close()
|
||||
|> revolve({ axis = 'x' }, %)
|
||||
|> patternCircular3d({
|
||||
|> patternCircular3d(
|
||||
axis = [0, 0, 1],
|
||||
center = [0, 0, 0],
|
||||
repetitions = 10,
|
||||
arcDegrees = 360,
|
||||
rotateDuplicates = true
|
||||
}, %)
|
||||
)
|
||||
|
||||
// Sketch and revolve the outside bearing
|
||||
outsideRevolve = startSketchOn('XZ')
|
||||
|
||||
@ -180,12 +180,12 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// color = '#ff0000',
|
||||
/// metalness = 90,
|
||||
/// roughness = 90
|
||||
/// )
|
||||
/// |> patternLinear3d({
|
||||
/// axis = [1, 0, 1],
|
||||
/// instances = 7,
|
||||
/// distance = 6
|
||||
/// }, %)
|
||||
/// )
|
||||
/// |> patternLinear3d(
|
||||
/// axis = [1, 0, 1],
|
||||
/// instances = 7,
|
||||
/// distance = 6
|
||||
/// )
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
@ -199,16 +199,16 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// |> close()
|
||||
///
|
||||
/// example = extrude(exampleSketch, length = 1)
|
||||
/// |> patternLinear3d({
|
||||
/// |> patternLinear3d(
|
||||
/// axis = [1, 0, 1],
|
||||
/// instances = 7,
|
||||
/// distance = 6
|
||||
/// }, %)
|
||||
/// |> appearance(
|
||||
/// color = '#ff0000',
|
||||
/// metalness = 90,
|
||||
/// roughness = 90
|
||||
/// )
|
||||
/// )
|
||||
/// |> appearance({
|
||||
/// color = '#ff0000',
|
||||
/// metalness = 90,
|
||||
/// roughness = 90
|
||||
/// )
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
@ -219,12 +219,12 @@ pub async fn appearance(_exec_state: &mut ExecState, args: Args) -> Result<KclVa
|
||||
/// |> line(end = [-1, 0])
|
||||
/// |> line(end = [0, -5])
|
||||
/// |> close()
|
||||
/// |> patternCircular2d({
|
||||
/// |> patternCircular2d(
|
||||
/// center = [0, 0],
|
||||
/// instances = 13,
|
||||
/// arcDegrees = 360,
|
||||
/// rotateDuplicates = true
|
||||
/// }, %)
|
||||
/// )
|
||||
///
|
||||
/// example = extrude(exampleSketch, length = 1)
|
||||
/// |> appearance(
|
||||
|
||||
@ -1031,13 +1031,13 @@ sphere = startSketchOn('XZ')
|
||||
}, %)
|
||||
|> close()
|
||||
|> revolve({ axis: 'x' }, %)
|
||||
|> patternCircular3d({
|
||||
|> patternCircular3d(
|
||||
axis = [0, 0, 1],
|
||||
center = [0, 0, 0],
|
||||
repetitions = 10,
|
||||
arcDegrees = 360,
|
||||
rotateDuplicates = true
|
||||
}, %)
|
||||
)
|
||||
|
||||
// Sketch and revolve the outside bearing
|
||||
outsideRevolve = startSketchOn('XZ')
|
||||
@ -1098,13 +1098,13 @@ sphere = startSketchOn('XZ')
|
||||
}, %)
|
||||
|> close()
|
||||
|> revolve({ axis = 'x' }, %)
|
||||
|> patternCircular3d({
|
||||
|> patternCircular3d(
|
||||
axis = [0, 0, 1],
|
||||
center = [0, 0, 0],
|
||||
repetitions = 10,
|
||||
arcDegrees = 360,
|
||||
rotateDuplicates = true
|
||||
}, %)
|
||||
)
|
||||
|
||||
// Sketch and revolve the outside bearing
|
||||
outsideRevolve = startSketchOn('XZ')
|
||||
@ -1417,11 +1417,11 @@ tabs_r = startSketchOn({
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d({
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
repetitions = 1,
|
||||
distance = length - 10
|
||||
}, %)
|
||||
)
|
||||
// build the tabs of the mounting bracket (left side)
|
||||
tabs_l = startSketchOn({
|
||||
plane: {
|
||||
@ -1444,11 +1444,11 @@ tabs_l = startSketchOn({
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d({
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
repetitions = 1,
|
||||
distance = length - 10
|
||||
}, %)
|
||||
)
|
||||
"#;
|
||||
let program = crate::parsing::top_level_parse(some_program_string).unwrap();
|
||||
|
||||
@ -1542,11 +1542,11 @@ tabs_r = startSketchOn({
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d({
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
repetitions = 1,
|
||||
distance = length - 10
|
||||
}, %)
|
||||
)
|
||||
// build the tabs of the mounting bracket (left side)
|
||||
tabs_l = startSketchOn({
|
||||
plane = {
|
||||
@ -1569,11 +1569,11 @@ tabs_l = startSketchOn({
|
||||
radius = hole_diam / 2
|
||||
}, %), %)
|
||||
|> extrude(-thk, %)
|
||||
|> patternLinear3d({
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
repetitions = 1,
|
||||
distance = length - 10
|
||||
}, %)
|
||||
)
|
||||
"#
|
||||
);
|
||||
}
|
||||
|
||||
@ -6,16 +6,18 @@ exampleSketch = startSketchOn('XZ')
|
||||
|> close(%)
|
||||
|> extrude(length = 1)
|
||||
|
||||
pattn1 = patternLinear3d({
|
||||
pattn1 = patternLinear3d(
|
||||
exampleSketch,
|
||||
axis = [1, 0, 0],
|
||||
instances = 7,
|
||||
distance = 6
|
||||
}, exampleSketch)
|
||||
)
|
||||
|
||||
pattn2 = patternCircular3d({
|
||||
pattn2 = patternCircular3d(
|
||||
pattn1,
|
||||
axis = [0, 0, 1],
|
||||
center = [-20, -20, -20],
|
||||
instances = 41,
|
||||
arcDegrees = 360,
|
||||
rotateDuplicates = false
|
||||
}, pattn1)
|
||||
)
|
||||
|
||||
@ -6,14 +6,16 @@ exampleSketch = startSketchOn('XZ')
|
||||
|> close(%)
|
||||
|> extrude(length = 1)
|
||||
|
||||
pattn1 = patternLinear3d({
|
||||
pattn1 = patternLinear3d(
|
||||
exampleSketch,
|
||||
axis = [1, 0, 0],
|
||||
instances = 7,
|
||||
distance = 6
|
||||
}, exampleSketch)
|
||||
)
|
||||
|
||||
pattn2 = patternLinear3d({
|
||||
pattn2 = patternLinear3d(
|
||||
pattn1,
|
||||
axis = [0, 0, 1],
|
||||
distance = 1,
|
||||
instances = 7
|
||||
}, pattn1)
|
||||
)
|
||||
|
||||
@ -6,10 +6,18 @@ exampleSketch = startSketchOn('XZ')
|
||||
|> close()
|
||||
|> extrude(length = 1)
|
||||
|
||||
pattn1 = patternLinear3d({
|
||||
axis: [1, 0, 0],
|
||||
instances: 7,
|
||||
distance: 6
|
||||
}, exampleSketch)
|
||||
pattn1 = patternLinear3d(
|
||||
exampleSketch,
|
||||
axis = [1, 0, 0],
|
||||
instances = 7,
|
||||
distance = 6,
|
||||
)
|
||||
|
||||
pattn2 = patternCircular3d({axis: [0,0, 1], center: [-20, -20, -20], instances: 41, arcDegrees: 360, rotateDuplicates: false}, pattn1)
|
||||
pattn2 = patternCircular3d(
|
||||
pattn1,
|
||||
axis = [0,0, 1],
|
||||
center = [-20, -20, -20],
|
||||
instances = 41,
|
||||
arcDegrees = 360,
|
||||
rotateDuplicates = false,
|
||||
)
|
||||
|
||||
@ -95,11 +95,11 @@ const tabsR = startSketchOn(tabPlane)
|
||||
getNextAdjacentEdge(edge13)
|
||||
]
|
||||
}, %)
|
||||
|> patternLinear3d({
|
||||
axis: [0, -1, 0],
|
||||
instances: 2,
|
||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
||||
}, %)
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
instances = 2,
|
||||
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||
)
|
||||
|
||||
// build the tabs of the mounting bracket (left side)
|
||||
const tabsL = startSketchOn(tabPlane)
|
||||
@ -123,11 +123,11 @@ const tabsL = startSketchOn(tabPlane)
|
||||
getNextAdjacentEdge(edge22)
|
||||
]
|
||||
}, %)
|
||||
|> patternLinear3d({
|
||||
axis: [0, -1, 0],
|
||||
instances: 2,
|
||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
||||
}, %)
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
instances = 2,
|
||||
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||
)
|
||||
|
||||
// define a plane for retention bumps
|
||||
const retPlane = {
|
||||
|
||||
@ -95,11 +95,11 @@ const tabsR = startSketchOn(tabPlane)
|
||||
getNextAdjacentEdge(edge11)
|
||||
]
|
||||
}, %)
|
||||
|> patternLinear3d({
|
||||
axis: [0, -1, 0],
|
||||
instances: 2,
|
||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
||||
}, %)
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
instances = 2,
|
||||
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||
)
|
||||
|
||||
// build the tabs of the mounting bracket (left side)
|
||||
const tabsL = startSketchOn(tabPlane)
|
||||
@ -123,11 +123,11 @@ const tabsL = startSketchOn(tabPlane)
|
||||
getNextAdjacentEdge(edge22)
|
||||
]
|
||||
}, %)
|
||||
|> patternLinear3d({
|
||||
axis: [0, -1, 0],
|
||||
instances: 2,
|
||||
distance: length + 2 * thk - (tabLength * 4 / 3)
|
||||
}, %)
|
||||
|> patternLinear3d(
|
||||
axis = [0, -1, 0],
|
||||
instances = 2,
|
||||
distance = length + 2 * thk - (tabLength * 4 / 3)
|
||||
)
|
||||
|
||||
// define a plane for retention bumps
|
||||
const retPlane = {
|
||||
|
||||
@ -43,14 +43,14 @@ const peg = startSketchOn(s, "end")
|
||||
-(total_width / 2 - wSegments),
|
||||
-(total_length / 2 - lSegments)
|
||||
], radius: bumpDiam / 2 }, %)
|
||||
|> patternLinear2d({
|
||||
axis: [1, 0],
|
||||
instances: 6,
|
||||
distance: 7
|
||||
}, %)
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 10,
|
||||
distance: 7
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [1, 0],
|
||||
instances = 6,
|
||||
distance = 7
|
||||
)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 10,
|
||||
distance = 7
|
||||
)
|
||||
|> extrude(length = bumpHeight)
|
||||
|
||||
@ -6,14 +6,16 @@ exampleSketch = startSketchOn('XZ')
|
||||
|> close()
|
||||
|> extrude(length = 1)
|
||||
|
||||
pattn1 = patternLinear3d({
|
||||
axis: [1, 0, 0],
|
||||
instances: 7,
|
||||
distance: 6
|
||||
}, exampleSketch)
|
||||
pattn1 = patternLinear3d(
|
||||
exampleSketch,
|
||||
axis = [1, 0, 0],
|
||||
instances = 7,
|
||||
distance = 6
|
||||
)
|
||||
|
||||
pattn2 = patternLinear3d({
|
||||
axis: [0, 0, 1],
|
||||
distance: 1,
|
||||
instances: 7
|
||||
}, pattn1)
|
||||
pattn2 = patternLinear3d(
|
||||
pattn1,
|
||||
axis = [0, 0, 1],
|
||||
distance = 1,
|
||||
instances = 7
|
||||
)
|
||||
|
||||
@ -710,11 +710,11 @@ const sketch004fl = startSketchOn(extrude002fl, 'START')
|
||||
], %, $rectangleSegmentC003fl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude004fl = extrude(sketch004fl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -731,11 +731,11 @@ const sketch005fl = startSketchOn(extrude002fl, 'START')
|
||||
], %, $rectangleSegmentC004fl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude005fl = extrude(sketch005fl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -755,11 +755,11 @@ const sketch006fl = startSketchOn(extrude002fl, 'START')
|
||||
], %, $rectangleSegmentC005fl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude006fl = extrude(sketch006fl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -776,11 +776,11 @@ const sketch007fl = startSketchOn(extrude001fl, 'START')
|
||||
], %, $rectangleSegmentC006fl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude007fl = extrude(sketch007fl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -797,11 +797,11 @@ const sketch008fl = startSketchOn(extrude001fl, 'START')
|
||||
], %, $rectangleSegmentC007fl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude008fl = extrude(sketch008fl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -821,11 +821,11 @@ const sketch009fl = startSketchOn(extrude001fl, 'START')
|
||||
], %, $rectangleSegmentC008fl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude009fl = extrude(sketch009fl, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -839,11 +839,11 @@ const sketch010fl = startSketchOn(extrude001fl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010fl = extrude(sketch010fl, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -877,11 +877,11 @@ const sketch012fl = startSketchOn(extrude001fl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012fl = extrude(sketch012fl, length = -thickness)
|
||||
|
||||
// FRONT RIGHT VERTICAL RAIL
|
||||
@ -992,11 +992,11 @@ const sketch004fr = startSketchOn(extrude002fr, 'START')
|
||||
], %, $rectangleSegmentC003fr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude004fr = extrude(sketch004fr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1016,11 +1016,11 @@ const sketch005fr = startSketchOn(extrude002fr, 'START')
|
||||
], %, $rectangleSegmentC004fr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude005fr = extrude(sketch005fr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1040,11 +1040,11 @@ const sketch006fr = startSketchOn(extrude002fr, 'START')
|
||||
], %, $rectangleSegmentC005fr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude006fr = extrude(sketch006fr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1064,11 +1064,11 @@ const sketch007fr = startSketchOn(extrude001fr, 'START')
|
||||
], %, $rectangleSegmentC006fr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude007fr = extrude(sketch007fr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1088,11 +1088,11 @@ const sketch008fr = startSketchOn(extrude001fr, 'START')
|
||||
], %, $rectangleSegmentC007fr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude008fr = extrude(sketch008fr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1112,11 +1112,11 @@ const sketch009fr = startSketchOn(extrude001fr, 'START')
|
||||
], %, $rectangleSegmentC008fr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude009fr = extrude(sketch009fr, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1133,11 +1133,11 @@ const sketch010fr = startSketchOn(extrude001fr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010fr = extrude(sketch010fr, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1171,11 +1171,11 @@ const sketch012fr = startSketchOn(extrude001fr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012fr = extrude(sketch012fr, length = -thickness)
|
||||
|
||||
// RIGHT REAR VERTICAL RAIL
|
||||
@ -1286,11 +1286,11 @@ const sketch004rr = startSketchOn(extrude002rr, 'START')
|
||||
], %, $rectangleSegmentC003rr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude004rr = extrude(sketch004rr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1310,11 +1310,11 @@ const sketch005rr = startSketchOn(extrude002rr, 'START')
|
||||
], %, $rectangleSegmentC004rr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude005rr = extrude(sketch005rr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1334,11 +1334,11 @@ const sketch006rr = startSketchOn(extrude002rr, 'START')
|
||||
], %, $rectangleSegmentC005rr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude006rr = extrude(sketch006rr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1358,11 +1358,11 @@ const sketch007rr = startSketchOn(extrude001rr, 'START')
|
||||
], %, $rectangleSegmentC006rr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude007rr = extrude(sketch007rr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1382,11 +1382,11 @@ const sketch008rr = startSketchOn(extrude001rr, 'START')
|
||||
], %, $rectangleSegmentC007rr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude008rr = extrude(sketch008rr, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1406,11 +1406,11 @@ const sketch009rr = startSketchOn(extrude001rr, 'START')
|
||||
], %, $rectangleSegmentC008rr)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude009rr = extrude(sketch009rr, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1427,11 +1427,11 @@ const sketch010rr = startSketchOn(extrude001rr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010rr = extrude(sketch010rr, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1465,11 +1465,11 @@ const sketch012rr = startSketchOn(extrude001rr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012rr = extrude(sketch012rr, length = -thickness)
|
||||
|
||||
// REAR LEFT VETCIAL RAIL
|
||||
@ -1579,11 +1579,11 @@ const sketch004rl = startSketchOn(extrude002rl, 'START')
|
||||
], %, $rectangleSegmentC003rl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude004rl = extrude(sketch004rl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1603,11 +1603,11 @@ const sketch005rl = startSketchOn(extrude002rl, 'START')
|
||||
], %, $rectangleSegmentC004rl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude005rl = extrude(sketch005rl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1627,11 +1627,11 @@ const sketch006rl = startSketchOn(extrude002rl, 'START')
|
||||
], %, $rectangleSegmentC005rl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude006rl = extrude(sketch006rl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1651,11 +1651,11 @@ const sketch007rl = startSketchOn(extrude001rl, 'START')
|
||||
], %, $rectangleSegmentC006rl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude007rl = extrude(sketch007rl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1675,11 +1675,11 @@ const sketch008rl = startSketchOn(extrude001rl, 'START')
|
||||
], %, $rectangleSegmentC007rl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude008rl = extrude(sketch008rl, length = -thickness)
|
||||
|
||||
// EIA-310-D standard hole pattern
|
||||
@ -1699,11 +1699,11 @@ const sketch009rl = startSketchOn(extrude001rl, 'START')
|
||||
], %, $rectangleSegmentC008rl)
|
||||
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: railHeight,
|
||||
distance: 0.62 + 0.62 + 0.5
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = railHeight,
|
||||
distance = 0.62 + 0.62 + 0.5
|
||||
)
|
||||
const extrude009rl = extrude(sketch009rl, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1720,11 +1720,11 @@ const sketch010rl = startSketchOn(extrude001rl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010rl = extrude(sketch010rl, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1758,11 +1758,11 @@ const sketch012rl = startSketchOn(extrude001rl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012rl = extrude(sketch012rl, length = -thickness)
|
||||
|
||||
// GENERATE SERVER MODELS
|
||||
|
||||
@ -719,11 +719,11 @@ const sketch010fl = startSketchOn(extrude001fl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010fl = extrude(sketch010fl, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -757,11 +757,11 @@ const sketch012fl = startSketchOn(extrude001fl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012fl = extrude(sketch012fl, length = -thickness)
|
||||
|
||||
// FRONT RIGHT VERTICAL RAIL
|
||||
@ -869,11 +869,11 @@ const sketch010fr = startSketchOn(extrude001fr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010fr = extrude(sketch010fr, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -907,11 +907,11 @@ const sketch012fr = startSketchOn(extrude001fr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012fr = extrude(sketch012fr, length = -thickness)
|
||||
|
||||
// RIGHT REAR VERTICAL RAIL
|
||||
@ -1019,11 +1019,11 @@ const sketch010rr = startSketchOn(extrude001rr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010rr = extrude(sketch010rr, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1057,11 +1057,11 @@ const sketch012rr = startSketchOn(extrude001rr, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012rr = extrude(sketch012rr, length = -thickness)
|
||||
|
||||
// REAR LEFT VETCIAL RAIL
|
||||
@ -1168,11 +1168,11 @@ const sketch010rl = startSketchOn(extrude001rl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude010rl = extrude(sketch010rl, length = -thickness)
|
||||
|
||||
// define slots
|
||||
@ -1206,11 +1206,11 @@ const sketch012rl = startSketchOn(extrude001rl, 'START')
|
||||
|> xLine(-0.75 + .438, %)
|
||||
|> tangentialArcTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close()
|
||||
|> patternLinear2d({
|
||||
axis: [0, -1],
|
||||
instances: 2,
|
||||
distance: 1.22
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [0, -1],
|
||||
instances = 2,
|
||||
distance = 1.22
|
||||
)
|
||||
const extrude012rl = extrude(sketch012rl, length = -thickness)
|
||||
|
||||
// Define planes so the server can be moved
|
||||
|
||||
@ -66,16 +66,16 @@ const peg = startSketchOn(s, 'end')
|
||||
-(pitch*(wbumps-1)/2),
|
||||
-(pitch*(lbumps-1)/2)
|
||||
], radius: bumpDiam / 2 }, %)
|
||||
|> patternLinear2d({
|
||||
axis: [1, 0],
|
||||
instances: wbumps,
|
||||
distance: pitch
|
||||
}, %)
|
||||
|> patternLinear2d({
|
||||
axis: [0, 1],
|
||||
instances: lbumps,
|
||||
distance: pitch
|
||||
}, %)
|
||||
|> patternLinear2d(
|
||||
axis = [1, 0],
|
||||
instances = wbumps,
|
||||
distance = pitch
|
||||
)
|
||||
|> patternLinear2d(
|
||||
axis = [0, 1],
|
||||
instances = lbumps,
|
||||
distance = pitch
|
||||
)
|
||||
|> extrude(bumpHeight, %)
|
||||
// |> patternTransform(int(totalBumps-1), tr, %)
|
||||
|
||||
|
||||
@ -348,7 +348,7 @@ async fn kcl_test_patterns_linear_basic_with_math() {
|
||||
distance = 5
|
||||
part = startSketchOn('XY')
|
||||
|> circle({ center: [0,0], radius: 2 }, %)
|
||||
|> patternLinear2d({axis: [0,1], instances: num, distance: distance - 1}, %)
|
||||
|> patternLinear2d(axis = [0,1], instances = num, distance = distance - 1)
|
||||
|> extrude(length = 1)
|
||||
"#;
|
||||
|
||||
@ -360,7 +360,7 @@ part = startSketchOn('XY')
|
||||
async fn kcl_test_patterns_linear_basic() {
|
||||
let code = r#"part = startSketchOn('XY')
|
||||
|> circle({ center: [0,0], radius: 2 }, %)
|
||||
|> patternLinear2d({axis: [0,1], instances: 13, distance: 4}, %)
|
||||
|> patternLinear2d(axis = [0,1], instances = 13, distance = 4)
|
||||
|> extrude(length = 1)
|
||||
"#;
|
||||
|
||||
@ -377,7 +377,7 @@ async fn kcl_test_patterns_linear_basic_3d() {
|
||||
|> line(end = [0, -1])
|
||||
|> close()
|
||||
|> extrude(length = 1)
|
||||
|> patternLinear3d({axis: [1, 0, 1], instances: 4, distance: 6}, %)
|
||||
|> patternLinear3d(axis = [1, 0, 1], instances = 4, distance = 6)
|
||||
"#;
|
||||
|
||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||
@ -388,7 +388,7 @@ async fn kcl_test_patterns_linear_basic_3d() {
|
||||
async fn kcl_test_patterns_linear_basic_negative_distance() {
|
||||
let code = r#"part = startSketchOn('XY')
|
||||
|> circle({ center: [0,0], radius: 2 }, %)
|
||||
|> patternLinear2d({axis: [0,1], instances: 13, distance: -2}, %)
|
||||
|> patternLinear2d(axis = [0,1], instances = 13, distance = -2)
|
||||
|> extrude(length = 1)
|
||||
"#;
|
||||
|
||||
@ -400,7 +400,7 @@ async fn kcl_test_patterns_linear_basic_negative_distance() {
|
||||
async fn kcl_test_patterns_linear_basic_negative_axis() {
|
||||
let code = r#"part = startSketchOn('XY')
|
||||
|> circle({ center: [0,0], radius: 2 }, %)
|
||||
|> patternLinear2d({axis: [0,-1], instances: 13, distance: 2}, %)
|
||||
|> patternLinear2d(axis = [0,-1], instances = 13, distance = 2)
|
||||
|> extrude(length = 1)
|
||||
"#;
|
||||
|
||||
@ -412,7 +412,7 @@ async fn kcl_test_patterns_linear_basic_negative_axis() {
|
||||
async fn kcl_test_patterns_linear_basic_holes() {
|
||||
let code = r#"circles = startSketchOn('XY')
|
||||
|> circle({ center: [5, 5], radius: 1 }, %)
|
||||
|> patternLinear2d({axis: [1,1], instances: 13, distance: 3}, %)
|
||||
|> patternLinear2d(axis = [1,1], instances = 13, distance = 3)
|
||||
|
||||
rectangle = startSketchOn('XY')
|
||||
|> startProfileAt([0, 0], %)
|
||||
@ -1417,11 +1417,12 @@ sketch002 = plane001
|
||||
|
||||
let extrudes = [sketch001, sketch002]
|
||||
|
||||
pattn1 = patternLinear3d({
|
||||
axis: [0, 1, 0],
|
||||
instances: 3,
|
||||
distance: 20
|
||||
}, extrudes)
|
||||
pattn1 = patternLinear3d(
|
||||
extrudes,
|
||||
axis = [0, 1, 0],
|
||||
instances = 3,
|
||||
distance = 20
|
||||
)
|
||||
"#;
|
||||
|
||||
let result = execute_and_snapshot(code, UnitLength::Mm, None).await.unwrap();
|
||||
@ -1563,11 +1564,12 @@ part001 = cube([0,0], 20)
|
||||
tags: [getOppositeEdge(line1)]
|
||||
}, %)
|
||||
|
||||
pattn1 = patternLinear3d({
|
||||
axis: [1, 0, 0],
|
||||
instances: 4,
|
||||
distance: 40
|
||||
}, part001)
|
||||
pattn1 = patternLinear3d(
|
||||
part001,
|
||||
axis = [1, 0, 0],
|
||||
instances = 4,
|
||||
distance = 40
|
||||
)
|
||||
|
||||
"#;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user