diff --git a/content/pages/docs/kcl-lang/types.md b/content/pages/docs/kcl-lang/types.md index 3eb12ab4..47ede1ba 100644 --- a/content/pages/docs/kcl-lang/types.md +++ b/content/pages/docs/kcl-lang/types.md @@ -77,7 +77,11 @@ sketch001 = sketch(on = XZ) { } region001 = region(segments = [sketch001.line1, sketch001.line2]) extrude001 = extrude(region001, length = 5, tagEnd = $capEnd001) -fillet001 = fillet(extrude001, tags = getCommonEdge(faces = [region001.tags.line4, capEnd001]), radius = 1) +fillet001 = fillet( + extrude001, + edges = [{ sideFaces = [region001.tags.line4, capEnd001] }], + radius = 1, +) ``` @@ -90,8 +94,8 @@ When a function requires declaring a new tag (using the `$` syntax), the argumen A tag created using a tag declarator can be used by writing its name without the `$`, e.g., `myTag`. Where necessary to disambiguate from tag declarations, we call these tag identifiers. -In the example above we use the tag identifier `capEnd001` to get the edge in common -using `getCommonEdge(capEnd001)`. +In the example above we use the tag identifier `capEnd001` in an edge reference object +to select the edge shared by `region001.tags.line4` and `capEnd001`. Tags can identify an edge or face of a solid. Functions that take a tag identifier as an argument will use either [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) (for the edge of a solid) or [`TaggedFace`](/docs/kcl-std/types/std-types-TaggedFace). diff --git a/content/pages/docs/kcl-samples/axial-fan/motor.kcl b/content/pages/docs/kcl-samples/axial-fan/motor.kcl index f677bb34..a015096e 100644 --- a/content/pages/docs/kcl-samples/axial-fan/motor.kcl +++ b/content/pages/docs/kcl-samples/axial-fan/motor.kcl @@ -24,11 +24,15 @@ motorBody = extrude( ) |> appearance(color = "#021b55") |> fillet( - tags = [ - getCommonEdge(faces = [region001.tags.circle1, capStart001]), - getCommonEdge(faces = [region001.tags.circle1, capEnd001]) - ], radius = 2, + edges = [ + { + sideFaces = [region001.tags.circle1, capStart001] + }, + { + sideFaces = [region001.tags.circle1, capEnd001] + } + ], ) sketch002 = sketch(on = offsetPlane(XY, offset = 21)) { circle1 = circle(start = [var 1mm, var 0mm], center = [var 0mm, var 0mm]) diff --git a/content/pages/docs/kcl-samples/bench-for-kids/main.kcl b/content/pages/docs/kcl-samples/bench-for-kids/main.kcl index d6bced7f..24bfaf30 100644 --- a/content/pages/docs/kcl-samples/bench-for-kids/main.kcl +++ b/content/pages/docs/kcl-samples/bench-for-kids/main.kcl @@ -57,7 +57,15 @@ legExtrudedBody = extrude(legRegion, length = legHeight, tagStart = $legCapStart // Round the foot: use a slightly smaller radius to avoid fillet errors. legFilletRadius = legRadius * 0.9 -legBody = fillet(legExtrudedBody, tags = getCommonEdge(faces = [legRegion.tags.circle1, legCapStart]), radius = legFilletRadius) +legBody = fillet( + legExtrudedBody, + radius = legFilletRadius, + edges = [ + { + sideFaces = [legRegion.tags.circle1, legCapStart] + } + ], +) hide(legSketch) // Position and array the legs. @@ -99,7 +107,14 @@ earProfile = sketch(on = earPlane) { earRegion = region(segments = [earProfile.circle1]) hide(earProfile) earBody = extrude(earRegion, length = earHeight, tagEnd = $earCapEnd) - |> fillet(tags = getCommonEdge(faces = [earRegion.tags.circle1, earCapEnd]), radius = earFilletRadius) + |> fillet( + radius = earFilletRadius, + edges = [ + { + sideFaces = [earRegion.tags.circle1, earCapEnd] + } + ], + ) |> translate(x = 0, y = -earOffsetForward, z = earElevation) |> rotate( roll = 0, @@ -133,7 +148,14 @@ tailProfile = sketch(on = tailPlane) { tailRegion = region(segments = [tailProfile.circle1]) hide(tailProfile) tailBody = extrude(tailRegion, length = -tailLength, tagStart = $tailCapStart) - |> fillet(tags = getCommonEdge(faces = [tailRegion.tags.circle1, tailCapStart]), radius = tailFilletRadius) + |> fillet( + radius = tailFilletRadius, + edges = [ + { + sideFaces = [tailRegion.tags.circle1, tailCapStart] + } + ], + ) |> rotate(roll = -10, pitch = 0, yaw = 0) |> translate( x = 0, diff --git a/content/pages/docs/kcl-samples/bracket-with-slot/main.kcl b/content/pages/docs/kcl-samples/bracket-with-slot/main.kcl index ff963067..634a3fe7 100644 --- a/content/pages/docs/kcl-samples/bracket-with-slot/main.kcl +++ b/content/pages/docs/kcl-samples/bracket-with-slot/main.kcl @@ -2,7 +2,7 @@ // Sketch-solve reconstruction with matching feature order // Categories: Mechanical Components; Parametric -@settings(defaultLengthUnit = mm) +@settings(defaultLengthUnit = mm, kclVersion = 2.0) // model parameters halfBracketWidth = 20 @@ -73,31 +73,59 @@ bracketBodySolid = extrude( // Step 3: Add fillets insideBendFillet = fillet( bracketBodySolid, - tags = getCommonEdge(faces = [ - outlineRegion.tags.line5, - outlineRegion.tags.line4 - ]), radius = insideBendRadius, + edges = [ + { + sideFaces = [ + outlineRegion.tags.line4, + outlineRegion.tags.line3 + ] + } + ], ) outsideBendFillet = fillet( insideBendFillet, - tags = getCommonEdge(faces = [ - outlineRegion.tags.line1, - outlineRegion.tags.line2 - ]), radius = insideBendRadius + sheetMetalThickness, + edges = [ + { + sideFaces = [ + outlineRegion.tags.line1, + outlineRegion.tags.line6 + ] + } + ], ) freeEndCornerFillets = fillet( outsideBendFillet, - tags = [ - edgeId(outsideBendFillet, closestTo = [2mm, 20mm, 70mm]), - edgeId(outsideBendFillet, closestTo = [2mm, -20mm, 70mm]), - edgeId(outsideBendFillet, closestTo = [170mm, 20mm, 2mm]), - edgeId(outsideBendFillet, closestTo = [170mm, -20mm, 2mm]) - ], radius = halfBracketWidth, + edges = [ + { + sideFaces = [ + outlineRegion.tags.line2, + outsideBendFillet.faces.capStart + ] + }, + { + sideFaces = [ + outlineRegion.tags.line2, + outsideBendFillet.faces.capEnd + ] + }, + { + sideFaces = [ + outlineRegion.tags.line5, + outsideBendFillet.faces.capStart + ] + }, + { + sideFaces = [ + outlineRegion.tags.line5, + outsideBendFillet.faces.capEnd + ] + } + ], ) // Step 4: Countersunk tab hole via subtractive feature diff --git a/content/pages/docs/kcl-samples/bracket/main.kcl b/content/pages/docs/kcl-samples/bracket/main.kcl index 625e6fff..e05bb301 100644 --- a/content/pages/docs/kcl-samples/bracket/main.kcl +++ b/content/pages/docs/kcl-samples/bracket/main.kcl @@ -3,7 +3,7 @@ // Categories: Architecture & Construction; Mechanical Components; Parametric // Set units and enable experimental sketch constraints. -@settings(defaultLengthUnit = in, kclVersion = 1.0) +@settings(defaultLengthUnit = in, kclVersion = 2.0) // Define structural design inputs. allowableStress = 35000 // psi @@ -121,51 +121,67 @@ bracketBlank = extrude( // Apply the inside bend radius at the elbow of the bracket. bracketWithInsideFillet = fillet( bracketBlank, - tags = getCommonEdge(faces = [ - bracketProfileRegion.tags.line6, - bracketProfileRegion.tags.line5 - ]), radius = insideBendRadius, + edges = [ + { + sideFaces = [ + bracketProfileRegion.tags.line5, + bracketProfileRegion.tags.line4 + ] + } + ], ) // Apply the outside bend radius around the outer corner. bracketWithBendFillets = fillet( bracketWithInsideFillet, - tags = getCommonEdge(faces = [ - bracketProfileRegion.tags.line3, - bracketProfileRegion.tags.line1 - ]), radius = outsideBendRadius, + edges = [ + { + sideFaces = [ + bracketProfileRegion.tags.line2, + bracketProfileRegion.tags.line1 + ] + } + ], ) // Round the four free outside corners of the extruded bracket. bracketWithCornerFillets = fillet( bracketWithBendFillets, - tags = [ - getCommonEdge(faces = [ - bracketProfileRegion.tags.line2, - bracketEndFace - ]), - getCommonEdge(faces = [ - bracketProfileRegion.tags.line4, - bracketEndFace - ]), - getCommonEdge(faces = [ - bracketProfileRegion.tags.line4, - bracketStartFace - ]), - getCommonEdge(faces = [ - bracketProfileRegion.tags.line2, - bracketStartFace - ]) - ], radius = cornerFilletRadius, + edges = [ + { + sideFaces = [ + bracketProfileRegion.tags.line6, + bracketEndFace + ] + }, + { + sideFaces = [ + bracketProfileRegion.tags.line3, + bracketEndFace + ] + }, + { + sideFaces = [ + bracketProfileRegion.tags.line3, + bracketStartFace + ] + }, + { + sideFaces = [ + bracketProfileRegion.tags.line6, + bracketStartFace + ] + } + ], ) // Drill the shelf-side mounting holes into the horizontal leg. bracketWithShelfMountHoles = hole::holes( bracketWithCornerFillets, - face = bracketProfileRegion.tags.line5, + face = bracketProfileRegion.tags.line4, cutsAt = shelfMountHoleCenters, holeBottom = hole::flat(), holeBody = hole::blind(depth = shelfMountHoleDepth, diameter = shelfMountHoleDiameter), @@ -175,7 +191,7 @@ bracketWithShelfMountHoles = hole::holes( // Drill the wall-side mounting holes into the vertical leg. finalBracket = hole::holes( bracketWithShelfMountHoles, - face = bracketProfileRegion.tags.line6, + face = bracketProfileRegion.tags.line5, cutsAt = wallMountHoleCenters, holeBottom = hole::flat(), holeBody = hole::blind(depth = wallMountHoleDepth, diameter = wallMountHoleDiameter), diff --git a/content/pages/docs/kcl-samples/coilover-assembly/coilover-bottom.kcl b/content/pages/docs/kcl-samples/coilover-assembly/coilover-bottom.kcl index 7bbd5089..9133aa56 100644 --- a/content/pages/docs/kcl-samples/coilover-assembly/coilover-bottom.kcl +++ b/content/pages/docs/kcl-samples/coilover-assembly/coilover-bottom.kcl @@ -23,8 +23,10 @@ region001 = region(segments = [retainerPlateProfile.circle1]) retainerPlateExtrude = extrude(region001, length = retainerPlateLength, tagStart = $capStart001) |> chamfer( length = retainerPlateChamfer, - tags = [ - getCommonEdge(faces = [region001.tags.circle1, capStart001]) + edges = [ + { + sideFaces = [region001.tags.circle1, capStart001] + } ], ) @@ -64,8 +66,10 @@ region003 = region(segments = [lowerMountProfile.circle1]) lowerMountExtrude = extrude(region003, length = lowerMountLength, tagEnd = $capEnd001) |> chamfer( length = lowerMountChamfer, - tags = [ - getCommonEdge(faces = [region003.tags.circle1, capEnd001]) + edges = [ + { + sideFaces = [region003.tags.circle1, capEnd001] + } ], ) @@ -93,14 +97,18 @@ eyeEndExtrude = extrude( ) |> fillet( radius = eyeEndTipFillet, - tags = [ - getCommonEdge(faces = [region004.tags.circle1, capEnd002]) + edges = [ + { + sideFaces = [region004.tags.circle1, capEnd002] + } ], ) |> fillet( radius = eyeEndRootFillet, - tags = [ - getCommonEdge(faces = [region004.tags.circle1, capStart002]) + edges = [ + { + sideFaces = [region004.tags.circle1, capStart002] + } ], ) diff --git a/content/pages/docs/kcl-samples/coilover-assembly/coilover-top.kcl b/content/pages/docs/kcl-samples/coilover-assembly/coilover-top.kcl index 4d6545a2..94af2954 100644 --- a/content/pages/docs/kcl-samples/coilover-assembly/coilover-top.kcl +++ b/content/pages/docs/kcl-samples/coilover-assembly/coilover-top.kcl @@ -23,11 +23,13 @@ region010 = region(segments = [upperStopperProfile.circle1]) upperStopperExtrude = extrude(region010, length = -upperPistonRodStopLength, tagStart = $upperCapStart001) |> chamfer( length = 6mm, - tags = [ - getCommonEdge(faces = [ - region010.tags.circle1, - upperCapStart001 - ]) + edges = [ + { + sideFaces = [ + region010.tags.circle1, + upperCapStart001 + ] + } ], ) @@ -71,8 +73,10 @@ region012 = region(segments = [upperMountPlateProfile.circle1]) upperMountPlateExtrude = extrude(region012, length = upperMountPlateThickness, tagEnd = $upperCapEnd002) |> chamfer( length = 19mm, - tags = [ - getCommonEdge(faces = [region012.tags.circle1, upperCapEnd002]) + edges = [ + { + sideFaces = [region012.tags.circle1, upperCapEnd002] + } ], ) @@ -95,8 +99,10 @@ region013 = region(segments = [upperEyeEndProfile.circle1]) upperEyeEndExtrude = extrude(region013, length = eyeEndMountLength, tagEnd = $upperCapEnd003) |> fillet( radius = eyeEndTipFillet, - tags = [ - getCommonEdge(faces = [region013.tags.circle1, upperCapEnd003]) + edges = [ + { + sideFaces = [region013.tags.circle1, upperCapEnd003] + } ], ) diff --git a/content/pages/docs/kcl-samples/counterdrilled-weldment/main.kcl b/content/pages/docs/kcl-samples/counterdrilled-weldment/main.kcl index 1e873c06..f38992e1 100644 --- a/content/pages/docs/kcl-samples/counterdrilled-weldment/main.kcl +++ b/content/pages/docs/kcl-samples/counterdrilled-weldment/main.kcl @@ -80,11 +80,31 @@ hide(plateSketch) plateChamfered = chamfer( plateTopExtrude, length = boltDiameter * 2, - tags = [ - getNextAdjacentEdge(plateTopExtrude.sketch.tags.rightEdge), - getNextAdjacentEdge(plateTopExtrude.sketch.tags.bottomEdge), - getNextAdjacentEdge(plateTopExtrude.sketch.tags.topEdge), - getNextAdjacentEdge(plateTopExtrude.sketch.tags.leftEdge) + edges = [ + { + sideFaces = [ + plateTopExtrude.sketch.tags.rightEdge, + plateTopExtrude.sketch.tags.bottomEdge + ] + }, + { + sideFaces = [ + plateTopExtrude.sketch.tags.leftEdge, + plateTopExtrude.sketch.tags.bottomEdge + ] + }, + { + sideFaces = [ + plateTopExtrude.sketch.tags.rightEdge, + plateTopExtrude.sketch.tags.topEdge + ] + }, + { + sideFaces = [ + plateTopExtrude.sketch.tags.leftEdge, + plateTopExtrude.sketch.tags.topEdge + ] + } ], ) diff --git a/content/pages/docs/kcl-samples/crash-box/main.kcl b/content/pages/docs/kcl-samples/crash-box/main.kcl index 7d71322e..e774953d 100644 --- a/content/pages/docs/kcl-samples/crash-box/main.kcl +++ b/content/pages/docs/kcl-samples/crash-box/main.kcl @@ -75,13 +75,33 @@ crashBoxSolid = extrude(crashBoxRegion, length = crashBoxExtrudeLength) // Optional exterior edge softening crashBoxOuterCornerFillets = fillet( crashBoxSolid, - tags = [ - edgeId(crashBoxSolid, closestTo = [-200mm, -200mm, -600mm]), - edgeId(crashBoxSolid, closestTo = [200mm, -200mm, -600mm]), - edgeId(crashBoxSolid, closestTo = [200mm, 200mm, -600mm]), - edgeId(crashBoxSolid, closestTo = [-200mm, 200mm, -600mm]) - ], radius = 60, + edges = [ + { + sideFaces = [ + crashBoxRegion.tags.leftEdge, + crashBoxRegion.tags.bottomEdge + ] + }, + { + sideFaces = [ + crashBoxRegion.tags.bottomEdge, + crashBoxRegion.tags.rightEdge + ] + }, + { + sideFaces = [ + crashBoxRegion.tags.topEdge, + crashBoxRegion.tags.rightEdge + ] + }, + { + sideFaces = [ + crashBoxRegion.tags.leftEdge, + crashBoxRegion.tags.topEdge + ] + } + ], ) // Shell the crash box from both ends to create a constant wall thickness @@ -131,11 +151,21 @@ beamSolid = extrude( // Ease the beam pocket edges for a better fit beamEndFillets = fillet( beamSolid, - tags = [ - edgeId(beamSolid, closestTo = [-125mm, 0mm, -300mm]), - edgeId(beamSolid, closestTo = [125mm, 0mm, -300mm]) - ], radius = 80, + edges = [ + { + sideFaces = [ + beamRegion.tags.bottomEdge, + beamSolid.faces.capEnd001 + ] + }, + { + sideFaces = [ + beamSolid.faces.capStart001, + beamRegion.tags.bottomEdge + ] + } + ], ) hide(beamProfile) diff --git a/content/pages/docs/kcl-samples/curtain-wall-anchor-plate/main.kcl b/content/pages/docs/kcl-samples/curtain-wall-anchor-plate/main.kcl index 915b239a..e93cc8fc 100644 --- a/content/pages/docs/kcl-samples/curtain-wall-anchor-plate/main.kcl +++ b/content/pages/docs/kcl-samples/curtain-wall-anchor-plate/main.kcl @@ -72,20 +72,28 @@ anchorPlateBody = extrude(anchorPlateRegion, length = slabPlateWidth) // Includes fillets at internal and external corners for strength and safety insideBendFillRegion = fillet( anchorPlateBody, - tags = getCommonEdge(faces = [ - anchorPlateRegion.tags.line3, - anchorPlateRegion.tags.line4 - ]), radius = insideBendRadius, + edges = [ + { + sideFaces = [ + anchorPlateRegion.tags.line3, + anchorPlateRegion.tags.line4 + ] + } + ], ) anchorPlateOutsideFillet = fillet( insideBendFillRegion, - tags = getCommonEdge(faces = [ - anchorPlateRegion.tags.line6, - anchorPlateRegion.tags.line1 - ]), radius = outsideBendRadius, + edges = [ + { + sideFaces = [ + anchorPlateRegion.tags.line6, + anchorPlateRegion.tags.line1 + ] + } + ], ) // Define oblong holes for bolts, allowing positional adjustment diff --git a/content/pages/docs/kcl-samples/enclosure/main.kcl b/content/pages/docs/kcl-samples/enclosure/main.kcl index 9e4d4a14..b67c9825 100644 --- a/content/pages/docs/kcl-samples/enclosure/main.kcl +++ b/content/pages/docs/kcl-samples/enclosure/main.kcl @@ -37,23 +37,31 @@ baseRegion = region(segments = [baseProfile.line1, baseProfile.line2]) baseBody = extrude(baseRegion, length = height) |> fillet( radius = wallThickness * 4, - tags = [ - getCommonEdge(faces = [ - baseRegion.tags.line1, - baseRegion.tags.line2 - ]), - getCommonEdge(faces = [ - baseRegion.tags.line2, - baseRegion.tags.line3 - ]), - getCommonEdge(faces = [ - baseRegion.tags.line3, - baseRegion.tags.line4 - ]), - getCommonEdge(faces = [ - baseRegion.tags.line4, - baseRegion.tags.line1 - ]) + edges = [ + { + sideFaces = [ + baseRegion.tags.line1, + baseRegion.tags.line2 + ] + }, + { + sideFaces = [ + baseRegion.tags.line2, + baseRegion.tags.line3 + ] + }, + { + sideFaces = [ + baseRegion.tags.line3, + baseRegion.tags.line4 + ] + }, + { + sideFaces = [ + baseRegion.tags.line4, + baseRegion.tags.line1 + ] + } ], ) |> shell(faces = [END], thickness = wallThickness) @@ -246,23 +254,31 @@ lidRegion = region(segments = [lidSketch.line1, lidSketch.line2]) lidPlate = extrude(lidRegion, length = wallThickness) |> fillet( radius = wallThickness * 4, - tags = [ - getCommonEdge(faces = [ - lidRegion.tags.line1, - lidRegion.tags.line2 - ]), - getCommonEdge(faces = [ - lidRegion.tags.line2, - lidRegion.tags.line3 - ]), - getCommonEdge(faces = [ - lidRegion.tags.line3, - lidRegion.tags.line4 - ]), - getCommonEdge(faces = [ - lidRegion.tags.line4, - lidRegion.tags.line1 - ]) + edges = [ + { + sideFaces = [ + lidRegion.tags.line1, + lidRegion.tags.line2 + ] + }, + { + sideFaces = [ + lidRegion.tags.line2, + lidRegion.tags.line3 + ] + }, + { + sideFaces = [ + lidRegion.tags.line3, + lidRegion.tags.line4 + ] + }, + { + sideFaces = [ + lidRegion.tags.line4, + lidRegion.tags.line1 + ] + } ], ) @@ -407,23 +423,31 @@ lidLipRegion = region(segments = [lidLipSketch.line1, lidLipSketch.line2]) lidLip = extrude(lidLipRegion, length = wallThickness) |> fillet( radius = wallThickness * 3, - tags = [ - getCommonEdge(faces = [ - lidLipRegion.tags.line1, - lidLipRegion.tags.line2 - ]), - getCommonEdge(faces = [ - lidLipRegion.tags.line2, - lidLipRegion.tags.line3 - ]), - getCommonEdge(faces = [ - lidLipRegion.tags.line3, - lidLipRegion.tags.line4 - ]), - getCommonEdge(faces = [ - lidLipRegion.tags.line4, - lidLipRegion.tags.line1 - ]) + edges = [ + { + sideFaces = [ + lidLipRegion.tags.line1, + lidLipRegion.tags.line2 + ] + }, + { + sideFaces = [ + lidLipRegion.tags.line2, + lidLipRegion.tags.line3 + ] + }, + { + sideFaces = [ + lidLipRegion.tags.line3, + lidLipRegion.tags.line4 + ] + }, + { + sideFaces = [ + lidLipRegion.tags.line4, + lidLipRegion.tags.line1 + ] + } ], ) diff --git a/content/pages/docs/kcl-samples/exhaust-manifold/main.kcl b/content/pages/docs/kcl-samples/exhaust-manifold/main.kcl index 79e885e7..426224a1 100644 --- a/content/pages/docs/kcl-samples/exhaust-manifold/main.kcl +++ b/content/pages/docs/kcl-samples/exhaust-manifold/main.kcl @@ -279,40 +279,48 @@ hide(flangeSketch) flangeTopLeftFillet = fillet( flangeExtrude, radius = 1.5, - tags = [ - getCommonEdge(faces = [ - flangeRegion.tags.line6, - flangeRegion.tags.line7 - ]) + edges = [ + { + sideFaces = [ + flangeRegion.tags.line6, + flangeRegion.tags.line7 + ] + } ], ) flangeTopFillets = fillet( flangeTopLeftFillet, radius = 1.5, - tags = [ - getCommonEdge(faces = [ - flangeRegion.tags.line11, - flangeRegion.tags.line12 - ]) + edges = [ + { + sideFaces = [ + flangeRegion.tags.line11, + flangeRegion.tags.line12 + ] + } ], ) flangeBottomLeftFillet = fillet( flangeTopFillets, radius = 0.25, - tags = [ - getCommonEdge(faces = [ - flangeRegion.tags.line5, - flangeRegion.tags.line6 - ]) + edges = [ + { + sideFaces = [ + flangeRegion.tags.line5, + flangeRegion.tags.line6 + ] + } ], ) flangeBody = fillet( flangeBottomLeftFillet, radius = 0.25, - tags = [ - getCommonEdge(faces = [ - flangeRegion.tags.line12, - flangeRegion.tags.line13 - ]) + edges = [ + { + sideFaces = [ + flangeRegion.tags.line12, + flangeRegion.tags.line13 + ] + } ], ) diff --git a/content/pages/docs/kcl-samples/field-monitor-stand/main.kcl b/content/pages/docs/kcl-samples/field-monitor-stand/main.kcl index c110c912..16191e71 100644 --- a/content/pages/docs/kcl-samples/field-monitor-stand/main.kcl +++ b/content/pages/docs/kcl-samples/field-monitor-stand/main.kcl @@ -3,7 +3,7 @@ // Categories: Electronics & Computing; 3D Printable // Set units -@settings(defaultLengthUnit = mm) +@settings(defaultLengthUnit = mm, kclVersion = 2.0) // Define parameters plateLength = 121 @@ -144,11 +144,19 @@ bodyCut = subtract(body, tools = holeCutters) // Fillet the exterior edges bodyFinal = fillet( bodyCut, - tags = [ - getCommonEdge(faces = [bodyRegion.tags.line4, capStart001]), - getCommonEdge(faces = [bodyRegion.tags.line4, capEnd001]), - getCommonEdge(faces = [bodyRegion.tags.line2, capStart001]), - getCommonEdge(faces = [bodyRegion.tags.line2, capEnd001]) - ], radius = filletRadius, + edges = [ + { + sideFaces = [bodyRegion.tags.line3, capStart001] + }, + { + sideFaces = [bodyRegion.tags.line3, capEnd001] + }, + { + sideFaces = [bodyRegion.tags.line6, capStart001] + }, + { + sideFaces = [bodyRegion.tags.line6, capEnd001] + } + ], ) diff --git a/content/pages/docs/kcl-samples/focusrite-scarlett-mounting-bracket/main.kcl b/content/pages/docs/kcl-samples/focusrite-scarlett-mounting-bracket/main.kcl index 05b8d673..7d472bbd 100644 --- a/content/pages/docs/kcl-samples/focusrite-scarlett-mounting-bracket/main.kcl +++ b/content/pages/docs/kcl-samples/focusrite-scarlett-mounting-bracket/main.kcl @@ -37,23 +37,31 @@ bodyBlank = extrude(bodyRegion, length = length + 2 * thk, symmetric = true) bracketBody = fillet( bodyBlank, radius = radius, - tags = [ - getCommonEdge(faces = [ - bodyRegion.tags.line6, - bodyRegion.tags.line7 - ]), - getCommonEdge(faces = [ - bodyRegion.tags.line1, - bodyRegion.tags.line2 - ]), - getCommonEdge(faces = [ - bodyRegion.tags.line2, - bodyRegion.tags.line3 - ]), - getCommonEdge(faces = [ - bodyRegion.tags.line5, - bodyRegion.tags.line6 - ]) + edges = [ + { + sideFaces = [ + bodyRegion.tags.line6, + bodyRegion.tags.line7 + ] + }, + { + sideFaces = [ + bodyRegion.tags.line1, + bodyRegion.tags.line2 + ] + }, + { + sideFaces = [ + bodyRegion.tags.line2, + bodyRegion.tags.line3 + ] + }, + { + sideFaces = [ + bodyRegion.tags.line5, + bodyRegion.tags.line6 + ] + } ], ) @@ -81,15 +89,19 @@ rightTabCut = extrude(rightTabRegion, length = -tabThk) rightTab = fillet( rightTabCut, radius = holeDiam / 2, - tags = [ - getCommonEdge(faces = [ - rightTabRegion.tags.line1, - rightTabRegion.tags.line2 - ]), - getCommonEdge(faces = [ - rightTabRegion.tags.line2, - rightTabRegion.tags.line3 - ]) + edges = [ + { + sideFaces = [ + rightTabRegion.tags.line1, + rightTabRegion.tags.line2 + ] + }, + { + sideFaces = [ + rightTabRegion.tags.line2, + rightTabRegion.tags.line3 + ] + } ], ) |> patternLinear3d(axis = [0, -1, 0], instances = 2, distance = length + 2 * thk - (tabLength * 4 / 3)) @@ -116,15 +128,19 @@ leftTabCut = extrude(leftTabRegion, length = -tabThk) leftTab = fillet( leftTabCut, radius = holeDiam / 2, - tags = [ - getCommonEdge(faces = [ - leftTabRegion.tags.line1, - leftTabRegion.tags.line2 - ]), - getCommonEdge(faces = [ - leftTabRegion.tags.line2, - leftTabRegion.tags.line3 - ]) + edges = [ + { + sideFaces = [ + leftTabRegion.tags.line1, + leftTabRegion.tags.line2 + ] + }, + { + sideFaces = [ + leftTabRegion.tags.line2, + leftTabRegion.tags.line3 + ] + } ], ) |> patternLinear3d(axis = [0, -1, 0], instances = 2, distance = length + 2 * thk - (tabLength * 4 / 3)) diff --git a/content/pages/docs/kcl-samples/food-service-spatula/main.kcl b/content/pages/docs/kcl-samples/food-service-spatula/main.kcl index da99e1f8..cd485b7e 100644 --- a/content/pages/docs/kcl-samples/food-service-spatula/main.kcl +++ b/content/pages/docs/kcl-samples/food-service-spatula/main.kcl @@ -168,15 +168,19 @@ flipperBlank = extrude(flipperRegion, length = flipperThickness) flipper = fillet( flipperBlank, radius = flipperFilletRadius, - tags = [ - getCommonEdge(faces = [ - flipperRegion.tags.line1, - flipperRegion.tags.line2 - ]), - getCommonEdge(faces = [ - flipperRegion.tags.line2, - flipperRegion.tags.line3 - ]) + edges = [ + { + sideFaces = [ + flipperRegion.tags.line1, + flipperRegion.tags.line2 + ] + }, + { + sideFaces = [ + flipperRegion.tags.line2, + flipperRegion.tags.line3 + ] + } ], ) @@ -199,15 +203,19 @@ handleBlank = extrude(handleRegion, length = handleWidth) handle = fillet( handleBlank, radius = 4, - tags = [ - getCommonEdge(faces = [ - handleRegion.tags.line1, - handleRegion.tags.line2 - ]), - getCommonEdge(faces = [ - handleRegion.tags.line4, - handleRegion.tags.line5 - ]) + edges = [ + { + sideFaces = [ + handleRegion.tags.line1, + handleRegion.tags.line2 + ] + }, + { + sideFaces = [ + handleRegion.tags.line4, + handleRegion.tags.line5 + ] + } ], ) diff --git a/content/pages/docs/kcl-samples/fun-stacker-toy/main.kcl b/content/pages/docs/kcl-samples/fun-stacker-toy/main.kcl index 8bab20de..9f86096a 100644 --- a/content/pages/docs/kcl-samples/fun-stacker-toy/main.kcl +++ b/content/pages/docs/kcl-samples/fun-stacker-toy/main.kcl @@ -104,24 +104,32 @@ extrude001 = extrude(region007, length = -1in) |> appearance(color = "#ffffff") fillet001 = fillet( extrude001, - tags = [ - getCommonEdge(faces = [ - region007.tags.line2, - region007.tags.line1 - ]), - getCommonEdge(faces = [ - region007.tags.line3, - region007.tags.line2 - ]), - getCommonEdge(faces = [ - region007.tags.line3, - region007.tags.line4 - ]), - getCommonEdge(faces = [ - region007.tags.line4, - region007.tags.line1 - ]) - ], radius = 3in, + edges = [ + { + sideFaces = [ + region007.tags.line2, + region007.tags.line1 + ] + }, + { + sideFaces = [ + region007.tags.line3, + region007.tags.line2 + ] + }, + { + sideFaces = [ + region007.tags.line3, + region007.tags.line4 + ] + }, + { + sideFaces = [ + region007.tags.line4, + region007.tags.line1 + ] + } + ], ) hide(sketch002) diff --git a/content/pages/docs/kcl-samples/gdt-tutorial/main.kcl b/content/pages/docs/kcl-samples/gdt-tutorial/main.kcl index 8e633693..9736ad0a 100644 --- a/content/pages/docs/kcl-samples/gdt-tutorial/main.kcl +++ b/content/pages/docs/kcl-samples/gdt-tutorial/main.kcl @@ -37,13 +37,15 @@ gdt::datum( ) gdt::distance( - edges = [ - getCommonEdge(faces = [region001.tags.line3, capEnd001]) - ], tolerance = 0.1mm, framePosition = [0, 30], framePlane = XZ, fontSize = 9.3333mm, + edges = [ + { + sideFaces = [capEnd001, region001.tags.line3] + } + ], ) gdt::flatness( diff --git a/content/pages/docs/kcl-samples/gridfinity-baseplate-magnets/main.kcl b/content/pages/docs/kcl-samples/gridfinity-baseplate-magnets/main.kcl index 342f1c40..c9c69f36 100644 --- a/content/pages/docs/kcl-samples/gridfinity-baseplate-magnets/main.kcl +++ b/content/pages/docs/kcl-samples/gridfinity-baseplate-magnets/main.kcl @@ -171,23 +171,31 @@ magnetLayerCut = extrude(magnetBaseRegion, length = -magDepth) magnetLayer = fillet( magnetLayerCut, radius = cornerRadius, - tags = [ - getCommonEdge(faces = [ - magnetBaseRegion.tags.bottomEdge, - magnetBaseRegion.tags.rightEdge - ]), - getCommonEdge(faces = [ - magnetBaseRegion.tags.rightEdge, - magnetBaseRegion.tags.topEdge - ]), - getCommonEdge(faces = [ - magnetBaseRegion.tags.topEdge, - magnetBaseRegion.tags.leftEdge - ]), - getCommonEdge(faces = [ - magnetBaseRegion.tags.leftEdge, - magnetBaseRegion.tags.bottomEdge - ]) + edges = [ + { + sideFaces = [ + magnetBaseRegion.tags.bottomEdge, + magnetBaseRegion.tags.rightEdge + ] + }, + { + sideFaces = [ + magnetBaseRegion.tags.rightEdge, + magnetBaseRegion.tags.topEdge + ] + }, + { + sideFaces = [ + magnetBaseRegion.tags.topEdge, + magnetBaseRegion.tags.leftEdge + ] + }, + { + sideFaces = [ + magnetBaseRegion.tags.leftEdge, + magnetBaseRegion.tags.bottomEdge + ] + } ], ) magnetLayers = patternLinear3d( @@ -249,23 +257,31 @@ lowerMagnetBaseCut = extrude(lowerMagnetBaseRegion, length = -magDepth) lowerMagnetBase = fillet( lowerMagnetBaseCut, radius = cornerRadius, - tags = [ - getCommonEdge(faces = [ - lowerMagnetBaseRegion.tags.bottomEdge, - lowerMagnetBaseRegion.tags.rightEdge - ]), - getCommonEdge(faces = [ - lowerMagnetBaseRegion.tags.rightEdge, - lowerMagnetBaseRegion.tags.topEdge - ]), - getCommonEdge(faces = [ - lowerMagnetBaseRegion.tags.topEdge, - lowerMagnetBaseRegion.tags.leftEdge - ]), - getCommonEdge(faces = [ - lowerMagnetBaseRegion.tags.leftEdge, - lowerMagnetBaseRegion.tags.bottomEdge - ]) + edges = [ + { + sideFaces = [ + lowerMagnetBaseRegion.tags.bottomEdge, + lowerMagnetBaseRegion.tags.rightEdge + ] + }, + { + sideFaces = [ + lowerMagnetBaseRegion.tags.rightEdge, + lowerMagnetBaseRegion.tags.topEdge + ] + }, + { + sideFaces = [ + lowerMagnetBaseRegion.tags.topEdge, + lowerMagnetBaseRegion.tags.leftEdge + ] + }, + { + sideFaces = [ + lowerMagnetBaseRegion.tags.leftEdge, + lowerMagnetBaseRegion.tags.bottomEdge + ] + } ], ) lowerMagnetBases = patternLinear3d( diff --git a/content/pages/docs/kcl-samples/hand-trolley/axle.kcl b/content/pages/docs/kcl-samples/hand-trolley/axle.kcl index d6dc34e1..37f6dacd 100644 --- a/content/pages/docs/kcl-samples/hand-trolley/axle.kcl +++ b/content/pages/docs/kcl-samples/hand-trolley/axle.kcl @@ -34,11 +34,19 @@ grate = extrude( ) |> fillet( radius = 1, - tags = [ - getCommonEdge(faces = [region001.tags.line5, capStart001]), - getCommonEdge(faces = [region001.tags.line1, capEnd001]), - getCommonEdge(faces = [region001.tags.line5, capEnd001]), - getCommonEdge(faces = [region001.tags.line1, capStart001]) + edges = [ + { + sideFaces = [region001.tags.line5, capStart001] + }, + { + sideFaces = [region001.tags.line1, capEnd001] + }, + { + sideFaces = [region001.tags.line5, capEnd001] + }, + { + sideFaces = [region001.tags.line1, capStart001] + } ], ) diff --git a/content/pages/docs/kcl-samples/hand-trolley/weldment.kcl b/content/pages/docs/kcl-samples/hand-trolley/weldment.kcl index 2a3d881e..c9a57b4a 100644 --- a/content/pages/docs/kcl-samples/hand-trolley/weldment.kcl +++ b/content/pages/docs/kcl-samples/hand-trolley/weldment.kcl @@ -35,11 +35,19 @@ grate = extrude( ) |> fillet( radius = 1, - tags = [ - getCommonEdge(faces = [region001.tags.line5, capStart001]), - getCommonEdge(faces = [region001.tags.line1, capEnd001]), - getCommonEdge(faces = [region001.tags.line5, capEnd001]), - getCommonEdge(faces = [region001.tags.line1, capStart001]) + edges = [ + { + sideFaces = [region001.tags.line5, capStart001] + }, + { + sideFaces = [region001.tags.line1, capEnd001] + }, + { + sideFaces = [region001.tags.line5, capEnd001] + }, + { + sideFaces = [region001.tags.line1, capStart001] + } ], ) diff --git a/content/pages/docs/kcl-samples/helium-tank/main.kcl b/content/pages/docs/kcl-samples/helium-tank/main.kcl index f45ee919..7fb3ea48 100644 --- a/content/pages/docs/kcl-samples/helium-tank/main.kcl +++ b/content/pages/docs/kcl-samples/helium-tank/main.kcl @@ -76,11 +76,13 @@ valveBodyRegion = region(segments = [valveBodySketch.circle1]) valveBody = extrude(valveBodyRegion, length = 1.5, tagEnd = $capEnd001) |> fillet( radius = 0.1, - tags = [ - getCommonEdge(faces = [ - valveBodyRegion.tags.circle1, - capEnd001 - ]) + edges = [ + { + sideFaces = [ + valveBodyRegion.tags.circle1, + capEnd001 + ] + } ], ) |> appearance(color = "#9a4618") diff --git a/content/pages/docs/kcl-samples/hex-nut-with-chamfer/main.kcl b/content/pages/docs/kcl-samples/hex-nut-with-chamfer/main.kcl index d8f95df7..09a3faa8 100644 --- a/content/pages/docs/kcl-samples/hex-nut-with-chamfer/main.kcl +++ b/content/pages/docs/kcl-samples/hex-nut-with-chamfer/main.kcl @@ -92,14 +92,18 @@ chamferSourceSolid = extrude( // Apply chamfers to the auxiliary solid's circular end edges chamferedCircularSolid = chamfer( chamferSourceSolid, - tags = [ - getCommonEdge(faces = [region002.tags.circle1, chamferEndFace]), - getCommonEdge(faces = [ - region002.tags.circle1, - chamferStartFace - ]) - ], length = chamferLength, + edges = [ + { + sideFaces = [region002.tags.circle1, chamferEndFace] + }, + { + sideFaces = [ + region002.tags.circle1, + chamferStartFace + ] + } + ], ) // Keep only the shared volume to imprint the chamfers into the hex body diff --git a/content/pages/docs/kcl-samples/mounting-plate/main.kcl b/content/pages/docs/kcl-samples/mounting-plate/main.kcl index 1b92d3a7..68104e23 100644 --- a/content/pages/docs/kcl-samples/mounting-plate/main.kcl +++ b/content/pages/docs/kcl-samples/mounting-plate/main.kcl @@ -63,23 +63,31 @@ plateWithHoles = extrude(plateRegion, length = plateThickness) part = fillet( plateWithHoles, radius = filletRadius, - tags = [ - getCommonEdge(faces = [ - plateRegion.tags.bottomEdge, - plateRegion.tags.rightEdge - ]), - getCommonEdge(faces = [ - plateRegion.tags.leftEdge, - plateRegion.tags.bottomEdge - ]), - getCommonEdge(faces = [ - plateRegion.tags.leftEdge, - plateRegion.tags.topEdge - ]), - getCommonEdge(faces = [ - plateRegion.tags.rightEdge, - plateRegion.tags.topEdge - ]) + edges = [ + { + sideFaces = [ + plateRegion.tags.bottomEdge, + plateRegion.tags.rightEdge + ] + }, + { + sideFaces = [ + plateRegion.tags.leftEdge, + plateRegion.tags.bottomEdge + ] + }, + { + sideFaces = [ + plateRegion.tags.leftEdge, + plateRegion.tags.topEdge + ] + }, + { + sideFaces = [ + plateRegion.tags.rightEdge, + plateRegion.tags.topEdge + ] + } ], ) diff --git a/content/pages/docs/kcl-samples/multi-axis-robot/robot-arm-base.kcl b/content/pages/docs/kcl-samples/multi-axis-robot/robot-arm-base.kcl index e1348424..7a80791c 100644 --- a/content/pages/docs/kcl-samples/multi-axis-robot/robot-arm-base.kcl +++ b/content/pages/docs/kcl-samples/multi-axis-robot/robot-arm-base.kcl @@ -113,23 +113,31 @@ extrude003 = extrude(region003, length = 1) |> appearance(color = "#754110", roughness = 90, metalness = 90) chamfer001 = chamfer( sketch001, - tags = [ - getCommonEdge(faces = [ - region001.tags.line1, - region001.tags.line2 - ]), - getCommonEdge(faces = [ - region001.tags.line2, - region001.tags.line3 - ]), - getCommonEdge(faces = [ - region001.tags.line3, - region001.tags.line4 - ]), - getCommonEdge(faces = [ - region001.tags.line4, - region001.tags.line1 - ]) - ], length = 1, + edges = [ + { + sideFaces = [ + region001.tags.line1, + region001.tags.line2 + ] + }, + { + sideFaces = [ + region001.tags.line2, + region001.tags.line3 + ] + }, + { + sideFaces = [ + region001.tags.line3, + region001.tags.line4 + ] + }, + { + sideFaces = [ + region001.tags.line4, + region001.tags.line1 + ] + } + ], ) diff --git a/content/pages/docs/kcl-samples/pillow-block-bearing/block.kcl b/content/pages/docs/kcl-samples/pillow-block-bearing/block.kcl index f24c44c2..6417a31e 100644 --- a/content/pages/docs/kcl-samples/pillow-block-bearing/block.kcl +++ b/content/pages/docs/kcl-samples/pillow-block-bearing/block.kcl @@ -27,11 +27,31 @@ plateBody = extrude(region001, length = stockThickness) |> appearance(color = "#1e62eb") |> fillet( radius = boltDiameter * 1 / 3, - tags = [ - getNextAdjacentEdge(region001.tags.line2), - getNextAdjacentEdge(region001.tags.line1), - getNextAdjacentEdge(region001.tags.line3), - getNextAdjacentEdge(region001.tags.line4) + edges = [ + { + sideFaces = [ + region001.tags.line2, + region001.tags.line1 + ] + }, + { + sideFaces = [ + region001.tags.line4, + region001.tags.line1 + ] + }, + { + sideFaces = [ + region001.tags.line2, + region001.tags.line3 + ] + }, + { + sideFaces = [ + region001.tags.line4, + region001.tags.line3 + ] + } ], ) diff --git a/content/pages/docs/kcl-samples/propeller/main.kcl b/content/pages/docs/kcl-samples/propeller/main.kcl index 47cf1871..50995e76 100644 --- a/content/pages/docs/kcl-samples/propeller/main.kcl +++ b/content/pages/docs/kcl-samples/propeller/main.kcl @@ -100,11 +100,15 @@ hubBlank = extrude( ) hubRounded = fillet( hubBlank, - tags = [ - getCommonEdge(faces = [hubRegion.tags.outerCircle, hubEnd]), - getCommonEdge(faces = [hubRegion.tags.outerCircle, hubStart]) - ], radius = hubThickness / 6, + edges = [ + { + sideFaces = [hubRegion.tags.outerCircle, hubEnd] + }, + { + sideFaces = [hubRegion.tags.outerCircle, hubStart] + } + ], ) // Match the original one-sided chamfer on the central bore by using a revolved cutter. diff --git a/content/pages/docs/kcl-samples/scrub-daddy-holder/main.kcl b/content/pages/docs/kcl-samples/scrub-daddy-holder/main.kcl index 84476ed2..a462e790 100644 --- a/content/pages/docs/kcl-samples/scrub-daddy-holder/main.kcl +++ b/content/pages/docs/kcl-samples/scrub-daddy-holder/main.kcl @@ -53,28 +53,43 @@ pegSketch = sketch(on = offsetPlane(XY, offset = magnetThickness * 1.5)) { } pegRegion = region(segments = [pegSketch.circle1]) holder = extrude(pegRegion, length = spongeThickness - magnetThickness, tagEnd = $capEnd001) - |> fillet(tags = getCommonEdge(faces = [pegRegion.tags.circle1, capEnd001]), radius = 2) + |> fillet( + radius = 2, + edges = [ + { + sideFaces = [pegRegion.tags.circle1, capEnd001] + } + ], + ) |> patternCircular3d(instances = 2, axis = Z, center = [0, 0, 0]) fillet001 = fillet( base, - tags = [ - getCommonEdge(faces = [ - baseRegion.tags.line2, - baseRegion.tags.line1 - ]), - getCommonEdge(faces = [ - baseRegion.tags.line3, - baseRegion.tags.line2 - ]), - getCommonEdge(faces = [ - baseRegion.tags.line3, - baseRegion.tags.line4 - ]), - getCommonEdge(faces = [ - baseRegion.tags.line4, - baseRegion.tags.line1 - ]) - ], radius = 5, + edges = [ + { + sideFaces = [ + baseRegion.tags.line2, + baseRegion.tags.line1 + ] + }, + { + sideFaces = [ + baseRegion.tags.line3, + baseRegion.tags.line2 + ] + }, + { + sideFaces = [ + baseRegion.tags.line3, + baseRegion.tags.line4 + ] + }, + { + sideFaces = [ + baseRegion.tags.line4, + baseRegion.tags.line1 + ] + } + ], ) diff --git a/content/pages/docs/kcl-samples/sheet-metal-bracket/main.kcl b/content/pages/docs/kcl-samples/sheet-metal-bracket/main.kcl index a38df604..070e7339 100644 --- a/content/pages/docs/kcl-samples/sheet-metal-bracket/main.kcl +++ b/content/pages/docs/kcl-samples/sheet-metal-bracket/main.kcl @@ -3,7 +3,7 @@ // Categories: Mechanical Components; Industrial & Manufacturing // Set units -@settings(defaultLengthUnit = in, kclVersion = 1.0) +@settings(defaultLengthUnit = in, kclVersion = 2.0) // Input bolt pattern dimensions to mount the bracket mountingBoltDiameter = 1 / 4 @@ -233,11 +233,19 @@ hidden002 = hide(sketch002) solid001 = subtract(bracketProfile, tools = extrude001) |> fillet( - tags = [ - getCommonEdge(faces = [region0011.tags.arc2, capEnd001]), - getCommonEdge(faces = [region0011.tags.line11, capEnd001]), - getCommonEdge(faces = [region0011.tags.line11, capStart001]), - getCommonEdge(faces = [region0011.tags.arc2, capStart001]) - ], radius = flangeLength / 3, + edges = [ + { + sideFaces = [region0011.tags.line21, capEnd001] + }, + { + sideFaces = [region0011.tags.line10, capEnd001] + }, + { + sideFaces = [region0011.tags.line10, capStart001] + }, + { + sideFaces = [region0011.tags.line21, capStart001] + } + ], ) diff --git a/content/pages/docs/kcl-samples/socket-head-cap-screw/main.kcl b/content/pages/docs/kcl-samples/socket-head-cap-screw/main.kcl index 7b527393..0cf9ff97 100644 --- a/content/pages/docs/kcl-samples/socket-head-cap-screw/main.kcl +++ b/content/pages/docs/kcl-samples/socket-head-cap-screw/main.kcl @@ -19,7 +19,14 @@ headSketch = sketch(on = XZ) { } boltProfile = region(segments = [headSketch.circle1]) boltHead = extrude(boltProfile, length = -boltHeadLength, tagStart = $capStart001) - |> fillet(tags = getCommonEdge(faces = [boltProfile.tags.circle1, capStart001]), radius = 0.020) + |> fillet( + radius = 0.020, + edges = [ + { + sideFaces = [boltProfile.tags.circle1, capStart001] + } + ], + ) // Define the sketch of the hex pattern on the screw head hexSketch = sketch(on = faceOf(boltHead, face = START)) { diff --git a/content/pages/docs/kcl-samples/surgical-drill-guide/main.kcl b/content/pages/docs/kcl-samples/surgical-drill-guide/main.kcl index ce5c306a..932a52a1 100644 --- a/content/pages/docs/kcl-samples/surgical-drill-guide/main.kcl +++ b/content/pages/docs/kcl-samples/surgical-drill-guide/main.kcl @@ -151,8 +151,10 @@ hide(stem01Sketch) stem01 = extrude(stem01Region, length = bitLength, tagEnd = $capEnd004) |> chamfer( length = bitSize01 / 3, - tags = [ - getCommonEdge(faces = [stem01Region.tags.circle1, capEnd004]) + edges = [ + { + sideFaces = [stem01Region.tags.circle1, capEnd004] + } ], ) @@ -225,15 +227,19 @@ grip01 = extrude( ) |> fillet( radius = 1, - tags = [ - getCommonEdge(faces = [ - grip01Region.tags.outerCircle, - capEnd005 - ]), - getCommonEdge(faces = [ - grip01Region.tags.outerCircle, - capStart003 - ]) + edges = [ + { + sideFaces = [ + grip01Region.tags.outerCircle, + capEnd005 + ] + }, + { + sideFaces = [ + grip01Region.tags.outerCircle, + capStart003 + ] + } ], ) |> appearance(color = "#af7b23") @@ -273,8 +279,10 @@ hide(stem02Sketch) stem02 = extrude(stem02Region, length = bitLength, tagEnd = $capEnd003) |> chamfer( length = bitSize02 / 3, - tags = [ - getCommonEdge(faces = [stem02Region.tags.circle1, capEnd003]) + edges = [ + { + sideFaces = [stem02Region.tags.circle1, capEnd003] + } ], ) @@ -347,15 +355,19 @@ grip02 = extrude( ) |> fillet( radius = 1, - tags = [ - getCommonEdge(faces = [ - grip02Region.tags.outerCircle, - capStart002 - ]), - getCommonEdge(faces = [ - grip02Region.tags.outerCircle, - capEnd002 - ]) + edges = [ + { + sideFaces = [ + grip02Region.tags.outerCircle, + capStart002 + ] + }, + { + sideFaces = [ + grip02Region.tags.outerCircle, + capEnd002 + ] + } ], ) |> appearance(color = "#23af93") diff --git a/content/pages/docs/kcl-samples/usb-c/main.kcl b/content/pages/docs/kcl-samples/usb-c/main.kcl index 439681d1..54d3f542 100644 --- a/content/pages/docs/kcl-samples/usb-c/main.kcl +++ b/content/pages/docs/kcl-samples/usb-c/main.kcl @@ -52,25 +52,33 @@ shellBody = extrude( tagStart = $capStart001, ) |> fillet( - tags = [ - getCommonEdge(faces = [ - region001.tags.line3, - region001.tags.line4 - ]), - getCommonEdge(faces = [ - region001.tags.line3, - region001.tags.line2 - ]), - getCommonEdge(faces = [ - region001.tags.line2, - region001.tags.line1 - ]), - getCommonEdge(faces = [ - region001.tags.line4, - region001.tags.line1 - ]) - ], radius = shellCornerRadius, + edges = [ + { + sideFaces = [ + region001.tags.line3, + region001.tags.line4 + ] + }, + { + sideFaces = [ + region001.tags.line3, + region001.tags.line2 + ] + }, + { + sideFaces = [ + region001.tags.line2, + region001.tags.line1 + ] + }, + { + sideFaces = [ + region001.tags.line4, + region001.tags.line1 + ] + } + ], ) // Subtract cavity from shell and set shell appearance diff --git a/content/pages/docs/kcl-samples/wheel-hub/main.kcl b/content/pages/docs/kcl-samples/wheel-hub/main.kcl index 6333a6ab..a6eb8274 100644 --- a/content/pages/docs/kcl-samples/wheel-hub/main.kcl +++ b/content/pages/docs/kcl-samples/wheel-hub/main.kcl @@ -256,19 +256,27 @@ hide(flangeHoleProfile) // Solver reconstruction of the flange chamfers chamfer001 = chamfer( mountingFlangeBlank, - tags = getCommonEdge(faces = [ - mountingFlangeRegion.tags.outerCircle, - capStart001 - ]), length = lugSpacing / 30, + edges = [ + { + sideFaces = [ + mountingFlangeRegion.tags.outerCircle, + capStart001 + ] + } + ], ) chamfer002 = chamfer( chamfer001, - tags = getCommonEdge(faces = [ - mountingFlangeRegion.tags.outerCircle, - capEnd001 - ]), length = lugSpacing / 20, + edges = [ + { + sideFaces = [ + mountingFlangeRegion.tags.outerCircle, + capEnd001 + ] + } + ], ) mountingFlange = subtract([chamfer002], tools = [flangeHoleCutters]) diff --git a/content/pages/docs/kcl-std/functions/std-clone.md b/content/pages/docs/kcl-std/functions/std-clone.md index 9a8c3179..c3fa2937 100644 --- a/content/pages/docs/kcl-std/functions/std-clone.md +++ b/content/pages/docs/kcl-std/functions/std-clone.md @@ -162,11 +162,13 @@ sketch002 = clone(sketch001) fillet( sketch002, radius = 2, - tags = [ - getCommonEdge(faces = [ - sketch002.sketch.tags.face0, - sketch002.sketch.tags.face1 - ]) + edges = [ + { + sideFaces = [ + sketch002.sketch.tags.face0, + sketch002.sketch.tags.face1 + ] + } ], ) @@ -246,11 +248,31 @@ clonedMountingPlate = clone(mountingPlate) fillet( clonedMountingPlate, radius = filletRadius, - tags = [ - getNextAdjacentEdge(clonedMountingPlate.sketch.tags.edge1), - getNextAdjacentEdge(clonedMountingPlate.sketch.tags.edge2), - getNextAdjacentEdge(clonedMountingPlate.sketch.tags.edge3), - getNextAdjacentEdge(clonedMountingPlate.sketch.tags.edge4) + edges = [ + { + sideFaces = [ + clonedMountingPlate.sketch.tags.edge1, + clonedMountingPlate.sketch.tags.edge2 + ] + }, + { + sideFaces = [ + clonedMountingPlate.sketch.tags.edge2, + clonedMountingPlate.sketch.tags.edge3 + ] + }, + { + sideFaces = [ + clonedMountingPlate.sketch.tags.edge3, + clonedMountingPlate.sketch.tags.edge4 + ] + }, + { + sideFaces = [ + clonedMountingPlate.sketch.tags.edge1, + clonedMountingPlate.sketch.tags.edge4 + ] + } ], ) |> translate(x = 0, y = 50, z = 0) diff --git a/content/pages/docs/kcl-std/functions/std-gdt-annotation.md b/content/pages/docs/kcl-std/functions/std-gdt-annotation.md index 94c3fe18..9146861f 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-annotation.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-annotation.md @@ -81,7 +81,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -sideEdge = getCommonEdge(faces = [block.sketch.tags.edge1, top]) +sideEdge = { + sideFaces = [block.sketch.tags.edge1, top] +} gdt::annotation( edges = [sideEdge], annotation = "Deburr edge", diff --git a/content/pages/docs/kcl-std/functions/std-gdt-circularity.md b/content/pages/docs/kcl-std/functions/std-gdt-circularity.md index a8ce03c9..67d0e5c8 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-circularity.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-circularity.md @@ -98,7 +98,9 @@ cylinderSketch = sketch(on = XY) { } cylinder = extrude(region(segments = [cylinderSketch.perimeter]), length = 10mm, tagEnd = $top) -topEdge = getCommonEdge(faces = [cylinder.sketch.tags.perimeter, top]) +topEdge = { + sideFaces = [cylinder.sketch.tags.perimeter, top] +} gdt::circularity( edges = [topEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-concentricity.md b/content/pages/docs/kcl-std/functions/std-gdt-concentricity.md index f2faa3a1..e373422f 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-concentricity.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-concentricity.md @@ -125,10 +125,12 @@ controlledSketch = sketch(on = XY) { } controlledCylinder = extrude(region(segments = [controlledSketch.perimeter]), length = 10mm, tagEnd = $top) -topEdge = getCommonEdge(faces = [ - controlledCylinder.sketch.tags.perimeter, - top -]) +topEdge = { + sideFaces = [ + controlledCylinder.sketch.tags.perimeter, + top + ] +} gdt::datum( face = datumCylinder.sketch.tags.perimeter, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-cylindricity.md b/content/pages/docs/kcl-std/functions/std-gdt-cylindricity.md index 886a5035..40d1df1b 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-cylindricity.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-cylindricity.md @@ -99,7 +99,9 @@ cylinderSketch = sketch(on = XY) { } cylinder = extrude(region(segments = [cylinderSketch.perimeter]), length = 10mm, tagEnd = $top) -topEdge = getCommonEdge(faces = [cylinder.sketch.tags.perimeter, top]) +topEdge = { + sideFaces = [cylinder.sketch.tags.perimeter, top] +} gdt::cylindricity( edges = [topEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-distance.md b/content/pages/docs/kcl-std/functions/std-gdt-distance.md index ce5b3e04..3a225d4e 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-distance.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-distance.md @@ -58,7 +58,7 @@ startSketchOn(XY) |> close() |> extrude(length = 5, tagEnd = $top) -lengthEdge = getCommonEdge(faces = [side1, top]) +lengthEdge = { sideFaces = [side1, top] } gdt::distance( edges = [lengthEdge], tolerance = 0.05mm, @@ -90,7 +90,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -lengthEdge = getCommonEdge(faces = [block.sketch.tags.edge1, top]) +lengthEdge = { + sideFaces = [block.sketch.tags.edge1, top] +} gdt::distance( edges = [lengthEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-parallelism.md b/content/pages/docs/kcl-std/functions/std-gdt-parallelism.md index 4b81d184..e5faf164 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-parallelism.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-parallelism.md @@ -92,7 +92,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -sideEdge = getCommonEdge(faces = [block.sketch.tags.edge1, top]) +sideEdge = { + sideFaces = [block.sketch.tags.edge1, top] +} gdt::parallelism( edges = [sideEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-perpendicularity.md b/content/pages/docs/kcl-std/functions/std-gdt-perpendicularity.md index 7ec32b39..56630e67 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-perpendicularity.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-perpendicularity.md @@ -92,7 +92,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -sideEdge = getCommonEdge(faces = [block.sketch.tags.edge2, top]) +sideEdge = { + sideFaces = [block.sketch.tags.edge2, top] +} gdt::perpendicularity( edges = [sideEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-position.md b/content/pages/docs/kcl-std/functions/std-gdt-position.md index 3dac9033..7bfff8f3 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-position.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-position.md @@ -92,7 +92,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -sideEdge = getCommonEdge(faces = [block.sketch.tags.edge2, top]) +sideEdge = { + sideFaces = [block.sketch.tags.edge2, top] +} gdt::position( edges = [sideEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-profile.md b/content/pages/docs/kcl-std/functions/std-gdt-profile.md index c6f356cc..70e3212a 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-profile.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-profile.md @@ -64,7 +64,7 @@ startSketchOn(XY) |> close() |> extrude(length = 5, tagEnd = $top) -profileEdge = getCommonEdge(faces = [side1, top]) +profileEdge = { sideFaces = [side1, top] } gdt::profile( edges = [profileEdge], diff --git a/content/pages/docs/kcl-std/functions/std-gdt-profileLine.md b/content/pages/docs/kcl-std/functions/std-gdt-profileLine.md index 905c943d..e6a30755 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-profileLine.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-profileLine.md @@ -56,7 +56,7 @@ startSketchOn(XY) |> close() |> extrude(length = 5, tagEnd = $top) -profileEdge = getCommonEdge(faces = [side1, top]) +profileEdge = { sideFaces = [side1, top] } gdt::profileLine( edges = [profileEdge], @@ -88,7 +88,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -profileEdge = getCommonEdge(faces = [block.sketch.tags.edge1, top]) +profileEdge = { + sideFaces = [block.sketch.tags.edge1, top] +} gdt::profileLine( edges = [profileEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-runout.md b/content/pages/docs/kcl-std/functions/std-gdt-runout.md index ac974845..ac7723b9 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-runout.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-runout.md @@ -80,10 +80,12 @@ controlledShaft = extrude( tagEnd = $controlledFreeEnd, ) -controlledUpperShoulderEdge = getCommonEdge(faces = [ - controlledShaft.sketch.tags.upperPerimeter, - controlledShoulder -]) +controlledUpperShoulderEdge = { + sideFaces = [ + controlledShaft.sketch.tags.upperPerimeter, + controlledShoulder + ] +} datumSketch = sketch(on = YZ) { perimeter = circle(start = [var 18mm, var 0mm], center = [var 0mm, var 0mm]) diff --git a/content/pages/docs/kcl-std/functions/std-gdt-straightness.md b/content/pages/docs/kcl-std/functions/std-gdt-straightness.md index 7c02ab6e..b5ed8849 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-straightness.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-straightness.md @@ -130,7 +130,9 @@ blockProfile = sketch(on = XY) { } block = extrude(region(segments = [blockProfile.edge1, blockProfile.edge2]), length = 4mm, tagEnd = $top) -sideEdge = getCommonEdge(faces = [block.sketch.tags.edge1, top]) +sideEdge = { + sideFaces = [block.sketch.tags.edge1, top] +} gdt::straightness( edges = [sideEdge], tolerance = 0.05mm, diff --git a/content/pages/docs/kcl-std/functions/std-gdt-symmetry.md b/content/pages/docs/kcl-std/functions/std-gdt-symmetry.md index 846c33f3..a8b69430 100644 --- a/content/pages/docs/kcl-std/functions/std-gdt-symmetry.md +++ b/content/pages/docs/kcl-std/functions/std-gdt-symmetry.md @@ -151,10 +151,12 @@ latchBlockRegion = region(segments = [ latchProfile.datumWidthFace ]) latchBlock = extrude(latchBlockRegion, length = 12mm, tagEnd = $frontFace) -grooveFloorFrontEdge = getCommonEdge(faces = [ - latchBlock.sketch.tags.grooveFloor, - frontFace -]) +grooveFloorFrontEdge = { + sideFaces = [ + latchBlock.sketch.tags.grooveFloor, + frontFace + ] +} gdt::datum( face = latchBlock.sketch.tags.bottom, diff --git a/content/pages/docs/kcl-std/functions/std-sketch-extrude.md b/content/pages/docs/kcl-std/functions/std-sketch-extrude.md index 10d5551d..537ece5a 100644 --- a/content/pages/docs/kcl-std/functions/std-sketch-extrude.md +++ b/content/pages/docs/kcl-std/functions/std-sketch-extrude.md @@ -294,7 +294,7 @@ cylinder2 = circle(sketch004, center = [0.5, 0.5], radius = 0.25) // extrude a circle to a tagged edge (cyan cylinder) sketch005 = startSketchOn(offsetPlane(YZ, offset = 4)) cylinder3 = circle(sketch005, center = [0.5, 0.5], radius = 0.25) - |> extrude(to = getCommonEdge(faces = [facetag0, facetag1])) + |> extrude(to = { sideFaces = [facetag0, facetag1] }) |> appearance(color = '#00FFFF') // extrude a circle to a plane (magenta cylinder) diff --git a/content/pages/docs/kcl-std/functions/std-sketch-getCommonEdge.md b/content/pages/docs/kcl-std/functions/std-sketch-getCommonEdge.md index cd908f8d..e834f4dd 100644 --- a/content/pages/docs/kcl-std/functions/std-sketch-getCommonEdge.md +++ b/content/pages/docs/kcl-std/functions/std-sketch-getCommonEdge.md @@ -45,10 +45,7 @@ part001 = extrude(partRegion, length = scale, tagEnd = $end0) |> chamfer(length = 10mm, tags = [getOppositeEdge(partRegion.tags.line0)], tag = $chamfer0) // Select the edge shared by the chamfer and the extrusion's end face. -commonEdge = getCommonEdge(faces = [ - part001.faces.chamfer0, - part001.faces.end0 -]) +commonEdge = { sideFaces = [chamfer0, end0] } ``` diff --git a/content/pages/docs/kcl-std/functions/std-sketch-revolve.md b/content/pages/docs/kcl-std/functions/std-sketch-revolve.md index 93d0a33f..59f7752b 100644 --- a/content/pages/docs/kcl-std/functions/std-sketch-revolve.md +++ b/content/pages/docs/kcl-std/functions/std-sketch-revolve.md @@ -180,7 +180,7 @@ box = startSketchOn(XY) |> line(end = [20, 0]) |> line(end = [0, -20]) |> close() - |> extrude(length = 20) + |> extrude(length = 20, tagEnd = $capEnd001) sketch001 = startSketchOn(box, face = END) |> circle(center = [10, 10], radius = 4) @@ -209,11 +209,11 @@ box = startSketchOn(XY) |> line(end = [20, 0]) |> line(end = [0, -20], tag = $revolveAxis) |> close() - |> extrude(length = 20) + |> extrude(length = 20, tagEnd = $capEnd001) sketch001 = startSketchOn(box, face = END) |> circle(center = [10, 10], radius = 4) - |> revolve(angle = 90deg, axis = getOppositeEdge(revolveAxis)) + |> revolve(angle = 90deg, axis = { sideFaces = [revolveAxis, capEnd001] }) ``` @@ -238,11 +238,11 @@ box = startSketchOn(XY) |> line(end = [20, 0]) |> line(end = [0, -20], tag = $revolveAxis) |> close() - |> extrude(length = 20) + |> extrude(length = 20, tagEnd = $capEnd001) sketch001 = startSketchOn(box, face = END) |> circle(center = [10, 10], radius = 4) - |> revolve(angle = 90deg, axis = getOppositeEdge(revolveAxis), tolerance = 0.0001) + |> revolve(angle = 90deg, axis = { sideFaces = [revolveAxis, capEnd001] }, tolerance = 0.0001) ``` diff --git a/content/pages/docs/kcl-std/functions/std-solid-chamfer.md b/content/pages/docs/kcl-std/functions/std-solid-chamfer.md index 94b3e5a7..be58cc61 100644 --- a/content/pages/docs/kcl-std/functions/std-solid-chamfer.md +++ b/content/pages/docs/kcl-std/functions/std-solid-chamfer.md @@ -308,8 +308,7 @@ chamfer001 = chamfer( @settings(defaultLengthUnit = mm, kclVersion = 3.0) // Chamfer the top circular edge of an extruded 8 mm shaft. -// These two shafts show two equivalent edge-selection approaches: -// `getOppositeEdge` and a tagged end face with `getCommonEdge`. +// These two shafts show edge selection by a side face and end face. // Sketch two circles, one on the left, one on the right. // We'll use them for shafts below. @@ -329,12 +328,18 @@ rightRegion = region(segments = [rightShaftSketch.rightCircle]) // Extrude one circle into a shaft, // then use `leftRegion.tags.leftCircle` to reference the original circle // at the base of the shaft, -// then use `getOppositeEdge` to get the opposite circular edge at the *top* of the shaft. -leftShaft = extrude(leftRegion, length = 20mm) +// The end face selects the circular edge at the top of the shaft. +leftShaftBase = extrude(leftRegion, length = 20mm, tagEnd = $leftShaftTop) +leftShaft = leftShaftBase |> chamfer( length = 1mm, - tags = [ - getOppositeEdge(leftRegion.tags.leftCircle) + edges = [ + { + sideFaces = [ + leftRegion.tags.leftCircle, + leftShaftBase.faces.leftShaftTop + ] + } ], ) @@ -342,13 +347,19 @@ leftShaft = extrude(leftRegion, length = 20mm) rightShaftBase = extrude(rightRegion, length = 20mm, tagEnd = $rightShaftTop) // After extrusion, the circle identifies the cylindrical side face. -// `getCommonEdge` selects the top rim shared by that face and the top end face. -rightTopEdge = getCommonEdge(faces = [ - rightShaftBase.sketch.tags.rightCircle, - rightShaftBase.faces.rightShaftTop -]) - -rightShaft = chamfer(rightShaftBase, length = 1mm, tags = [rightTopEdge]) +// Their shared edge is the top rim. +rightShaft = chamfer( + rightShaftBase, + length = 1mm, + edges = [ + { + sideFaces = [ + rightRegion.tags.rightCircle, + rightShaftBase.faces.rightShaftTop + ] + } + ], +) ``` diff --git a/content/pages/docs/kcl-std/functions/std-solid-fillet.md b/content/pages/docs/kcl-std/functions/std-solid-fillet.md index b092c950..d448e89e 100644 --- a/content/pages/docs/kcl-std/functions/std-solid-fillet.md +++ b/content/pages/docs/kcl-std/functions/std-solid-fillet.md @@ -164,10 +164,14 @@ cornerFillet = fillet( ) topFillet = fillet( plate, - tags = getCommonEdge(faces = [ - plateRegion.tags.line1, - plate.faces.capEnd001 - ]), + edges = [ + { + sideFaces = [ + plateRegion.tags.line1, + plate.faces.capEnd001 + ] + } + ], radius = topFilletRadius, ) @@ -239,10 +243,14 @@ cornerFillet = fillet( ) topFillet = fillet( plate, - tags = getCommonEdge(faces = [ - plateRegion.tags.line1, - plate.faces.capEnd001 - ]), + edges = [ + { + sideFaces = [ + plateRegion.tags.line1, + plate.faces.capEnd001 + ] + } + ], radius = topFilletRadius, tangentChain = false, ) @@ -317,9 +325,19 @@ profile001 = region(segments = [sketch001.seg02, sketch001.seg01], intersectionI revolve001 = revolve(profile001, angle = 360deg, axis = X) |> fillet( radius = 10mm, - tags = [ - getCommonEdge(faces = [seg02, seg01]), - getCommonEdge(faces = [seg02, seg03]) + edges = [ + { + sideFaces = [ + profile001.tags.seg02, + profile001.tags.seg01 + ] + }, + { + sideFaces = [ + profile001.tags.seg02, + profile001.tags.seg03 + ] + } ], ) |> rotate(yaw = 70deg, pitch = 10deg) @@ -396,10 +414,14 @@ revolve001 = revolve(profile001, angle = 360deg, axis = X) fillet001 = fillet( revolve001, - tags = getCommonEdge(faces = [ - profile001.tags.seg02, - profile001.tags.seg01 - ]), + edges = [ + { + sideFaces = [ + profile001.tags.seg02, + profile001.tags.seg01 + ] + } + ], radius = 10, ) |> rotate(yaw = 70deg, pitch = 10deg) diff --git a/content/pages/docs/kcl-std/functions/std-transform-mirror3d.md b/content/pages/docs/kcl-std/functions/std-transform-mirror3d.md index f5d6c90c..47ac9ba2 100644 --- a/content/pages/docs/kcl-std/functions/std-transform-mirror3d.md +++ b/content/pages/docs/kcl-std/functions/std-transform-mirror3d.md @@ -169,10 +169,15 @@ sketch002 = sketch(on = XY) { } hidden002 = hide(sketch002) region002 = region(segments = [sketch002.line1, sketch002.line2]) -extrude001 = extrude(region002, length = 1) +extrude001 = extrude(region002, length = 1, tagEnd = $capEnd001) // Do the mirroring, across an edge of some solid. -shape2 = mirror3d([shape1], across = getOppositeEdge(extrude001.sketch.tags.line1)) +shape2 = mirror3d( + [shape1], + across = { + sideFaces = [region002.tags.line1, capEnd001] + }, +) ```