fix typo in function name, cleanup unused args (#317)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -530,14 +530,12 @@ export class EngineCommandManager {
|
|||||||
console.log('sending command', command)
|
console.log('sending command', command)
|
||||||
this.engineConnection?.send(command)
|
this.engineConnection?.send(command)
|
||||||
}
|
}
|
||||||
sendModellingCommand({
|
sendModelingCommand({
|
||||||
id,
|
id,
|
||||||
params,
|
|
||||||
range,
|
range,
|
||||||
command,
|
command,
|
||||||
}: {
|
}: {
|
||||||
id: string
|
id: string
|
||||||
params: any
|
|
||||||
range: SourceRange
|
range: SourceRange
|
||||||
command: EngineCommand
|
command: EngineCommand
|
||||||
}): Promise<any> {
|
}): Promise<any> {
|
||||||
|
@ -30,14 +30,8 @@ export const extrude: InternalFn = (
|
|||||||
|
|
||||||
const extrudeSurfaces: ExtrudeSurface[] = []
|
const extrudeSurfaces: ExtrudeSurface[] = []
|
||||||
const extrusionDirection = clockwiseSign(sketch.value.map((line) => line.to))
|
const extrusionDirection = clockwiseSign(sketch.value.map((line) => line.to))
|
||||||
engineCommandManager.sendModellingCommand({
|
engineCommandManager.sendModelingCommand({
|
||||||
id,
|
id,
|
||||||
params: [
|
|
||||||
{
|
|
||||||
length,
|
|
||||||
extrusionDirection: extrusionDirection,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
range: sourceRange,
|
range: sourceRange,
|
||||||
command: {
|
command: {
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
|
@ -253,9 +253,8 @@ export const line: SketchLineHelper = {
|
|||||||
sourceRange,
|
sourceRange,
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
engineCommandManager.sendModellingCommand({
|
engineCommandManager.sendModelingCommand({
|
||||||
id,
|
id,
|
||||||
params: [lineData, previousSketch],
|
|
||||||
range: sourceRange,
|
range: sourceRange,
|
||||||
command: {
|
command: {
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
@ -1535,18 +1534,13 @@ export const close: InternalFn = (
|
|||||||
? sketchGroup.start.from
|
? sketchGroup.start.from
|
||||||
: getCoordsFromPaths(sketchGroup, 0)
|
: getCoordsFromPaths(sketchGroup, 0)
|
||||||
|
|
||||||
const lineData: LineData = {
|
|
||||||
from: [...from, 0],
|
|
||||||
to: [...to, 0],
|
|
||||||
}
|
|
||||||
const id = makeId({
|
const id = makeId({
|
||||||
code,
|
code,
|
||||||
sourceRange,
|
sourceRange,
|
||||||
data: sketchGroup,
|
data: sketchGroup,
|
||||||
})
|
})
|
||||||
engineCommandManager.sendModellingCommand({
|
engineCommandManager.sendModelingCommand({
|
||||||
id,
|
id,
|
||||||
params: [lineData],
|
|
||||||
range: sourceRange,
|
range: sourceRange,
|
||||||
command: {
|
command: {
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
@ -1608,9 +1602,8 @@ export const startSketchAt: InternalFn = (
|
|||||||
data,
|
data,
|
||||||
isPath: true,
|
isPath: true,
|
||||||
})
|
})
|
||||||
engineCommandManager.sendModellingCommand({
|
engineCommandManager.sendModelingCommand({
|
||||||
id: pathId,
|
id: pathId,
|
||||||
params: [lineData],
|
|
||||||
range: sourceRange,
|
range: sourceRange,
|
||||||
command: {
|
command: {
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
|
@ -10,7 +10,7 @@ class MockEngineCommandManager {
|
|||||||
startNewSession() {}
|
startNewSession() {}
|
||||||
waitForAllCommands() {}
|
waitForAllCommands() {}
|
||||||
waitForReady = new Promise<void>((resolve) => resolve())
|
waitForReady = new Promise<void>((resolve) => resolve())
|
||||||
sendModellingCommand() {}
|
sendModelingCommand() {}
|
||||||
sendSceneCommand() {}
|
sendSceneCommand() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user