@@ -324,6 +324,7 @@ export function addSweep({
324324 path,
325325 wasmInstance,
326326 sectional,
327+ tolerance,
327328 relativeTo,
328329 translateProfileToPath,
329330 orientProfilePerpendicular,
@@ -339,6 +340,7 @@ export function addSweep({
339340 path : Selections
340341 wasmInstance : ModuleType
341342 sectional ?: boolean
343+ tolerance ?: KclCommandValue
342344 relativeTo ?: SweepRelativeTo
343345 translateProfileToPath ?: boolean
344346 orientProfilePerpendicular ?: boolean
@@ -438,6 +440,9 @@ export function addSweep({
438440 sectional !== undefined
439441 ? [ createLabeledArg ( 'sectional' , createLiteral ( sectional , wasmInstance ) ) ]
440442 : [ ]
443+ const toleranceExpr = tolerance
444+ ? [ createLabeledArg ( 'tolerance' , valueOrVariable ( tolerance ) ) ]
445+ : [ ]
441446 // `relativeTo` is legacy for new sweep calls; only preserve or update it when
442447 // editing existing code that already depends on that argument.
443448 const relativeToExpr =
@@ -501,6 +506,7 @@ export function addSweep({
501506 [
502507 createLabeledArg ( 'path' , pathExpr ) ,
503508 ...sectionalExpr ,
509+ ...toleranceExpr ,
504510 ...relativeToExpr ,
505511 ...tagStartExpr ,
506512 ...tagEndExpr ,
@@ -514,6 +520,9 @@ export function addSweep({
514520 if ( version && 'variableName' in version && version . variableName ) {
515521 insertVariableAndOffsetPathToNode ( version , modifiedAst , mNodeToEdit )
516522 }
523+ if ( tolerance && 'variableName' in tolerance && tolerance . variableName ) {
524+ insertVariableAndOffsetPathToNode ( tolerance , modifiedAst , mNodeToEdit )
525+ }
517526
518527 // 3. If edit, we assign the new function call declaration to the existing node,
519528 // otherwise just push to the end
@@ -543,6 +552,7 @@ export function addLoft({
543552 vDegree,
544553 bezApproximateRational,
545554 baseCurveIndex,
555+ tolerance,
546556 tagStart,
547557 tagEnd,
548558 bodyType,
@@ -555,6 +565,7 @@ export function addLoft({
555565 vDegree ?: KclCommandValue
556566 bezApproximateRational ?: boolean
557567 baseCurveIndex ?: KclCommandValue
568+ tolerance ?: KclCommandValue
558569 tagStart ?: string
559570 tagEnd ?: string
560571 bodyType ?: KclPreludeBodyType
@@ -619,6 +630,9 @@ export function addLoft({
619630 const baseCurveIndexExpr = baseCurveIndex
620631 ? [ createLabeledArg ( 'baseCurveIndex' , valueOrVariable ( baseCurveIndex ) ) ]
621632 : [ ]
633+ const toleranceExpr = tolerance
634+ ? [ createLabeledArg ( 'tolerance' , valueOrVariable ( tolerance ) ) ]
635+ : [ ]
622636 const tagStartExpr = tagStart
623637 ? [ createLabeledArg ( 'tagStart' , createTagDeclarator ( tagStart ) ) ]
624638 : [ ]
@@ -637,6 +651,7 @@ export function addLoft({
637651 ...vDegreeExpr ,
638652 ...bezApproximateRationalExpr ,
639653 ...baseCurveIndexExpr ,
654+ ...toleranceExpr ,
640655 ...tagStartExpr ,
641656 ...tagEndExpr ,
642657 ...bodyTypeExpr ,
@@ -654,6 +669,9 @@ export function addLoft({
654669 ) {
655670 insertVariableAndOffsetPathToNode ( baseCurveIndex , modifiedAst , mNodeToEdit )
656671 }
672+ if ( tolerance && 'variableName' in tolerance && tolerance . variableName ) {
673+ insertVariableAndOffsetPathToNode ( tolerance , modifiedAst , mNodeToEdit )
674+ }
657675
658676 // 3. If edit, we assign the new function call declaration to the existing node,
659677 // otherwise just push to the end
@@ -683,6 +701,7 @@ export function addRevolve({
683701 wasmInstance,
684702 axis,
685703 edge,
704+ tolerance,
686705 symmetric,
687706 bidirectionalAngle,
688707 tagStart,
@@ -697,6 +716,7 @@ export function addRevolve({
697716 wasmInstance : ModuleType
698717 axis ?: string
699718 edge ?: Selections
719+ tolerance ?: KclCommandValue
700720 symmetric ?: boolean
701721 bidirectionalAngle ?: KclCommandValue
702722 tagStart ?: string
@@ -764,6 +784,9 @@ export function addRevolve({
764784 symmetric !== undefined
765785 ? [ createLabeledArg ( 'symmetric' , createLiteral ( symmetric , wasmInstance ) ) ]
766786 : [ ]
787+ const toleranceExpr = tolerance
788+ ? [ createLabeledArg ( 'tolerance' , valueOrVariable ( tolerance ) ) ]
789+ : [ ]
767790 const bidirectionalAngleExpr = bidirectionalAngle
768791 ? [
769792 createLabeledArg (
@@ -789,6 +812,7 @@ export function addRevolve({
789812 [
790813 createLabeledArg ( 'angle' , valueOrVariable ( angle ) ) ,
791814 createLabeledArg ( 'axis' , getAxisResult . generatedAxis ) ,
815+ ...toleranceExpr ,
792816 ...symmetricExpr ,
793817 ...bidirectionalAngleExpr ,
794818 ...tagStartExpr ,
@@ -801,6 +825,9 @@ export function addRevolve({
801825 if ( 'variableName' in angle && angle . variableName ) {
802826 insertVariableAndOffsetPathToNode ( angle , modifiedAst , mNodeToEdit )
803827 }
828+ if ( tolerance && 'variableName' in tolerance && tolerance . variableName ) {
829+ insertVariableAndOffsetPathToNode ( tolerance , modifiedAst , mNodeToEdit )
830+ }
804831
805832 if (
806833 bidirectionalAngle &&
0 commit comments