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

Add polygon selection option to SelectTool #7001

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

saaaaaally
Copy link

  • Add new option for polygon selection in SelectTool.
  • Add keyin in SelectTool to allow testing of all different selection methods (box, line, pick, polygon)

polygon select key in demo

@bbastings
Copy link
Contributor

Who is asking for this?

ecfPts.push(ecfPt.toJSONXYZ() as XYAndZ);
ecfXYZPts.push(ecfPt.toJSONXYZ() as XYAndZ);

if (this.iModel.isGeoLocated) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is certainly not correct/needed? Why is this geo located specific code here?

@saaaaaally
Copy link
Author

saaaaaally commented Jul 24, 2024

Who is asking for this?

This is part of the inspection workflow in iTwin Experience, for improving ai detection crack selection.
Feature 1394017: Select tool in the 3D to be able to select in a polygon shape, not only rectangle

polygon selection

@bbastings
Copy link
Contributor

bbastings commented Jul 24, 2024

"This is part of the inspection workflow in iTwin Experience, for improving ai detection crack selection. [Feature 1394017]"

I suspect this won't be very robust for that use case. Because select works off reading the depth buffer and can only pick elements that light up a pixel, if your "cracks" are composed of lot of tiny line strings it's not going to pick them all up...

@bbastings
Copy link
Contributor

bbastings commented Jul 24, 2024

I really don't think we can add a new SelectionMethod. SelectTool is public and I know it's been sub-classed. You can provide your own default tool for your application by setting ToolAdmin.defaultToolId to your tool. You could also just write a PrimitiveTool specifically for crack selection (doesn't need to be default tool)?

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.

2 participants