Sketch on chamfer UI (#3918)
* sketch on chamfer start * working * step app from getting in weird state when selection face to sketch on * sketch on chamfer tests * clean up * fix test * fix click selections for chamfers, add tests * fixture setup (#3964) * initial break up * rename main fixture file * add more expect state pattern * add fixture comment * add comments to chamfer function * typos * works without pipeExpr
This commit is contained in:
@ -4,19 +4,20 @@ import {
|
||||
ArrayExpression,
|
||||
BinaryExpression,
|
||||
CallExpression,
|
||||
Expr,
|
||||
ExpressionStatement,
|
||||
ObjectExpression,
|
||||
ObjectProperty,
|
||||
PathToNode,
|
||||
PipeExpression,
|
||||
Program,
|
||||
ProgramMemory,
|
||||
ReturnStatement,
|
||||
sketchGroupFromKclValue,
|
||||
SourceRange,
|
||||
SyntaxType,
|
||||
Expr,
|
||||
VariableDeclaration,
|
||||
VariableDeclarator,
|
||||
sketchGroupFromKclValue,
|
||||
ObjectExpression,
|
||||
} from './wasm'
|
||||
import { createIdentifier, splitPathAtLastIndex } from './modifyAst'
|
||||
import { getSketchSegmentFromSourceRange } from './std/sketchConstraints'
|
||||
@ -947,7 +948,7 @@ export function doesSceneHaveSweepableSketch(ast: Program) {
|
||||
export function getObjExprProperty(
|
||||
node: ObjectExpression,
|
||||
propName: string
|
||||
): { expr: Expr; index: number } | null {
|
||||
): { expr: ObjectProperty['value']; index: number } | null {
|
||||
const index = node.properties.findIndex(({ key }) => key.name === propName)
|
||||
if (index === -1) return null
|
||||
return { expr: node.properties[index].value, index }
|
||||
|
Reference in New Issue
Block a user