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

Example tool to clip view based on element geometry #4794

Merged
merged 7 commits into from
Dec 13, 2022

Conversation

pmconne
Copy link
Member

@pmconne pmconne commented Dec 13, 2022

Fixes #3883.
Select one or more elements. The backend produces polyfaces from their geometry. We create a ClipVector from those polyfaces and apply it to the view.

TODO:

  • Add support for applying an offset to the polyfaces to expand them outward @EarlinLutz has WIP API on EDL/MeshOffset branch - not yet available.
  • Integrate V-HACD.js to perform convex mesh decomposition.
    • Ideally, do this in a WebWorker for demo purposes probably won't bother.
  • Add a keyin to configure the tolerances, mesh offset, and decomposition parameters. meh.
  • An API to ask whether a polyface is already convex, to avoid potentially expensive decomposition? none such exists.

@pmconne pmconne marked this pull request as ready for review December 13, 2022 21:31
@pmconne pmconne requested review from a team, bbastings and kabentley as code owners December 13, 2022 21:31
Copy link
Contributor

@bbastings bbastings left a comment

Choose a reason for hiding this comment

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

New tool looks good, could probably have sub-classed from ViewClipByElementTool and just overridden doClipToElements and toolId. :)

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.

Clip 3D volumes of a model based on geometry of one or more elements
2 participants