Skip to content

Conversation

@pierremtb
Copy link
Contributor

@pierremtb pierremtb commented Jan 16, 2026

Closes #9268 and #9269

In this PR:

  • Updated all sketch constraint icons from Figma
  • Added most of the constraints to the feature tree maps with labels and icons:
    • Except Pierce and Curvature from Sketch Constraints #8169
    • Distance from ezpz is there as well, points to the dimension icon. We'll have to see what Dimensions for Sketch #8168 looks like once it's there
    • Normal and more cases for tangent are missing from ezpz I think?
  • Wired up right-click Delete on Constraints and Sketch Solve items, with a quick pw test
image

@vercel
Copy link

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
modeling-app Ready Ready Preview, Comment Jan 16, 2026 7:09pm

Request Review

@pierremtb pierremtb changed the title Add sketch solve constraints to feature tree icon and label map, update all sketch icons from Figma Add icons to sketch block constraints in feature tree Jan 16, 2026
@pierremtb pierremtb changed the title Add icons to sketch block constraints in feature tree Add icons and labels to sketch block constraints in feature tree Jan 16, 2026
@pierremtb pierremtb changed the title Add icons and labels to sketch block constraints in feature tree [SOLVE] Add icons and labels to sketch block constraints in feature tree Jan 16, 2026
@pierremtb pierremtb changed the title [SOLVE] Add icons and labels to sketch block constraints in feature tree [SOLVE] Better integrate Sketch Block and Constraints in the Feature Tree Jan 16, 2026
@pierremtb pierremtb marked this pull request as ready for review January 16, 2026 17:53
@pierremtb pierremtb requested a review from a team as a code owner January 16, 2026 17:53
@pierremtb pierremtb requested a review from Irev-Dev January 16, 2026 17:53
Comment on lines +157 to +187
// Sketch Solve Constraint case
const sketchBlock = getNodeFromPath<SketchBlock>(
astClone,
selection.codeRef.pathToNode,
wasmInstance,
'SketchBlock'
)
if (!err(sketchBlock) && sketchBlock.node.type === 'SketchBlock') {
const isItemInSketchBlock =
sketchBlock.deepPath.length > sketchBlock.shallowPath.length
const itemsIndex = -2 // index of items in body is second to last
const nodeIndex = sketchBlock.deepPath.at(itemsIndex)?.[0]
if (
isItemInSketchBlock &&
typeof nodeIndex === 'number' &&
sketchBlock.node.body.items[nodeIndex] !== undefined
) {
sketchBlock.node.body.items.splice(nodeIndex, 1)
return astClone
}

// Whole sketch block deletion case
if (
typeof nodeIndex === 'number' &&
astClone.body[nodeIndex] !== undefined
) {
astClone.body.splice(nodeIndex, 1)
return astClone
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more case 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We surely can move this new deletion case to Rust, but I feel like this is something we could do all at once once we move there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add delete to sketchSolve context menu Add icons and contextMenu-delete to sketch block constraints

2 participants