add code mods for surfaces
Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -394,9 +394,11 @@ export function sketchOnExtrudedFace(
|
|||||||
'const'
|
'const'
|
||||||
)
|
)
|
||||||
|
|
||||||
console.log('sketchPathToNode', sketchPathToNode)
|
const expressionIndex = Math.max(
|
||||||
console.log('extrudePathToNode', extrudePathToNode)
|
sketchPathToNode[1][0] as number,
|
||||||
_node.body = [..._node.body, newSurface]
|
extrudePathToNode[1][0] as number
|
||||||
|
)
|
||||||
|
_node.body.splice(expressionIndex + 1, 0, newSurface)
|
||||||
|
|
||||||
// Create the variable for the sketch.
|
// Create the variable for the sketch.
|
||||||
const newSketchName = findUniqueName(
|
const newSketchName = findUniqueName(
|
||||||
@ -407,8 +409,8 @@ export function sketchOnExtrudedFace(
|
|||||||
newSketchName,
|
newSketchName,
|
||||||
createIdentifier(newSurfaceName)
|
createIdentifier(newSurfaceName)
|
||||||
)
|
)
|
||||||
_node.body = [..._node.body, sketchVariableDeclaration]
|
const sketchIndex = expressionIndex + 2
|
||||||
const sketchIndex = _node.body.length - 1
|
_node.body.splice(sketchIndex, 0, sketchVariableDeclaration)
|
||||||
|
|
||||||
let newPathToNode: PathToNode = [
|
let newPathToNode: PathToNode = [
|
||||||
['body', ''],
|
['body', ''],
|
||||||
|
|||||||
Reference in New Issue
Block a user