Declare std kwarg functions in KCL and migrate circle (#5955)
* Support calling KCL std KW fns, and move circle to KCL std Signed-off-by: Nick Cameron <nrc@ncameron.org> * Doc comments on parameters Signed-off-by: Nick Cameron <nrc@ncameron.org> * Update grammar Signed-off-by: Nick Cameron <nrc@ncameron.org> * Change use of counterClockWise to ccw Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -487,15 +487,12 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => {
|
||||
if (err(angleStart) || 'errors' in angleStart) return baseCommand
|
||||
|
||||
// counterClockWise options boolean arg
|
||||
if (
|
||||
!('counterClockWise' in operation.labeledArgs) ||
|
||||
!operation.labeledArgs.counterClockWise
|
||||
)
|
||||
if (!('ccw' in operation.labeledArgs) || !operation.labeledArgs.ccw)
|
||||
return baseCommand
|
||||
const counterClockWise =
|
||||
const ccw =
|
||||
codeManager.code.slice(
|
||||
operation.labeledArgs.counterClockWise.sourceRange[0],
|
||||
operation.labeledArgs.counterClockWise.sourceRange[1]
|
||||
operation.labeledArgs.ccw.sourceRange[0],
|
||||
operation.labeledArgs.ccw.sourceRange[1]
|
||||
) === 'true'
|
||||
|
||||
// radius kcl arg
|
||||
@ -536,7 +533,7 @@ const prepareToEditHelix: PrepareToEditCallback = async ({ operation }) => {
|
||||
const argDefaultValues: ModelingCommandSchema['Helix'] = {
|
||||
revolutions,
|
||||
angleStart,
|
||||
counterClockWise,
|
||||
ccw,
|
||||
radius,
|
||||
axis,
|
||||
length,
|
||||
|
Reference in New Issue
Block a user