Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show offsetPlanes as selectable planes in the scene #4468

Closed
franknoirot opened this issue Nov 12, 2024 · 1 comment · Fixed by #4481 or #4552
Closed

Show offsetPlanes as selectable planes in the scene #4468

franknoirot opened this issue Nov 12, 2024 · 1 comment · Fixed by #4481 or #4552
Assignees
Labels
enhancement New feature or request ux-papercut User experience paper cuts

Comments

@franknoirot
Copy link
Collaborator

If the user has created a plane using either the offsetPlane or other plane-creating function in KCL (or via the UI after #2213 is complete), we should show them as a real plane in the scene that can be selected and therefore sketched on. Once #4274 is complete, these planes' visibility should also be able to be toggled within the feature tree's UI.

The following KCL code should result in a circle on the XY plane with a plane shown 10 units above it:

sketch001 = startSketchOn('XY')
  |> circle({ center: [-0.08, -0.08], radius: 5.37 }, %)

plane001 = offsetPlane("XY", 10)Ï

Engine notes

None. This would be a similar flow to the one used by the default planes, so should require nothing special to implement.

API/KCL notes

  1. Might need to add something to the API layer to create a visible plane that represents the plane, and return its UUID to the frontend?

Point-and-click notes

  1. Might need some logic on the frontend controlling what visibility to give a plane by default: if an offset plane has a sketch on it, maybe it should be hidden by default.
  2. I'm not sure if the "autoscaling" behavior shown by the default planes would apply to these offset planes as well.
@franknoirot franknoirot added enhancement New feature or request ux-papercut User experience paper cuts labels Nov 12, 2024
@franknoirot franknoirot self-assigned this Nov 13, 2024
@franknoirot
Copy link
Collaborator Author

franknoirot commented Nov 13, 2024

Game plan here is:

  • Alter the return type of the WASM offset_plane to return an entity ID in addition to its PlaneData, and add a side-effect function like make_default_plane that fires off the engine commands to create a visible plane representation.
    • Update any tests, doc comments, etc that need to in order to support this
  • Update the client side to add offset planes to the artifact graph
    • Add to artifact graph tests, etc to support this
  • Add or alter a snapshot test and a sketch-on-face test to ensure this new plane is usable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux-papercut User experience paper cuts
Projects
None yet
1 participant