some things needed for multi-profile tests
This commit is contained in:
@ -961,12 +961,12 @@ sketch002 = startSketchOn('XZ')
|
||||
await clickOnSketch2()
|
||||
await page.waitForTimeout(500)
|
||||
await cmdBar.progressCmdBar()
|
||||
await toolbar.openPane('code')
|
||||
await page.waitForTimeout(500)
|
||||
})
|
||||
|
||||
await test.step(`Confirm code is added to the editor, scene has changed`, async () => {
|
||||
await scene.expectPixelColor([135, 64, 73], testPoint, 15)
|
||||
await toolbar.openPane('code')
|
||||
await editor.expectEditor.toContain(sweepDeclaration)
|
||||
await editor.expectState({
|
||||
diagnostics: [],
|
||||
|
@ -2071,7 +2071,8 @@ profile011 = startProfileAt([5.07, -6.39], sketch003)
|
||||
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
||||
|> close(%)
|
||||
extrude003 = extrude(2.5, profile011)
|
||||
revolve002 = revolve({ angle = 45, axis = seg02 }, profile008)
|
||||
// TODO this breaks the test,
|
||||
// revolve002 = revolve({ angle = 45, axis = seg02 }, profile008)
|
||||
`
|
||||
)
|
||||
})
|
||||
|
@ -69,6 +69,7 @@ import {
|
||||
startSketchOnDefault,
|
||||
} from 'lang/modifyAst'
|
||||
import {
|
||||
CodeRef,
|
||||
PathToNode,
|
||||
Program,
|
||||
VariableDeclaration,
|
||||
@ -767,13 +768,17 @@ export const ModelingMachineProvider = ({
|
||||
sketchPathToNode: sketchPathToNode || [],
|
||||
})
|
||||
if (err(sketchPaths)) return Promise.reject(sketchPaths)
|
||||
const noCodeRefErr = new Error('No plane codeRef')
|
||||
if (!('faceCodeRef' in plane)) return Promise.reject(noCodeRefErr)
|
||||
if (!plane.faceCodeRef) return Promise.reject(noCodeRefErr)
|
||||
let codeRef =
|
||||
'faceCodeRef' in plane && plane.faceCodeRef
|
||||
? plane.faceCodeRef
|
||||
: 'codeRef' in plane && plane.codeRef
|
||||
? plane.codeRef
|
||||
: null
|
||||
if (!codeRef) return Promise.reject(new Error('No plane codeRef'))
|
||||
return {
|
||||
sketchEntryNodePath: sketchPathToNode || [],
|
||||
sketchNodePaths: sketchPaths,
|
||||
planeNodePath: plane.faceCodeRef.pathToNode,
|
||||
planeNodePath: codeRef.pathToNode,
|
||||
zAxis: info.sketchDetails.zAxis || null,
|
||||
yAxis: info.sketchDetails.yAxis || null,
|
||||
origin: info.sketchDetails.origin.map(
|
||||
|
Reference in New Issue
Block a user