fix typo in function name, cleanup unused args (#317)

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2023-08-24 11:41:38 -07:00
committed by GitHub
parent a0730ded4e
commit d33ddb2f1b
4 changed files with 6 additions and 21 deletions

View File

@ -530,14 +530,12 @@ export class EngineCommandManager {
console.log('sending command', command)
this.engineConnection?.send(command)
}
sendModellingCommand({
sendModelingCommand({
id,
params,
range,
command,
}: {
id: string
params: any
range: SourceRange
command: EngineCommand
}): Promise<any> {

View File

@ -30,14 +30,8 @@ export const extrude: InternalFn = (
const extrudeSurfaces: ExtrudeSurface[] = []
const extrusionDirection = clockwiseSign(sketch.value.map((line) => line.to))
engineCommandManager.sendModellingCommand({
engineCommandManager.sendModelingCommand({
id,
params: [
{
length,
extrusionDirection: extrusionDirection,
},
],
range: sourceRange,
command: {
type: 'modeling_cmd_req',

View File

@ -253,9 +253,8 @@ export const line: SketchLineHelper = {
sourceRange,
data,
})
engineCommandManager.sendModellingCommand({
engineCommandManager.sendModelingCommand({
id,
params: [lineData, previousSketch],
range: sourceRange,
command: {
type: 'modeling_cmd_req',
@ -1535,18 +1534,13 @@ export const close: InternalFn = (
? sketchGroup.start.from
: getCoordsFromPaths(sketchGroup, 0)
const lineData: LineData = {
from: [...from, 0],
to: [...to, 0],
}
const id = makeId({
code,
sourceRange,
data: sketchGroup,
})
engineCommandManager.sendModellingCommand({
engineCommandManager.sendModelingCommand({
id,
params: [lineData],
range: sourceRange,
command: {
type: 'modeling_cmd_req',
@ -1608,9 +1602,8 @@ export const startSketchAt: InternalFn = (
data,
isPath: true,
})
engineCommandManager.sendModellingCommand({
engineCommandManager.sendModelingCommand({
id: pathId,
params: [lineData],
range: sourceRange,
command: {
type: 'modeling_cmd_req',

View File

@ -10,7 +10,7 @@ class MockEngineCommandManager {
startNewSession() {}
waitForAllCommands() {}
waitForReady = new Promise<void>((resolve) => resolve())
sendModellingCommand() {}
sendModelingCommand() {}
sendSceneCommand() {}
}