Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

added 3d box selector #95

Merged
merged 10 commits into from
Jun 21, 2015
Merged

added 3d box selector #95

merged 10 commits into from
Jun 21, 2015

Conversation

hyOzd
Copy link
Contributor

@hyOzd hyOzd commented Jun 15, 2015

I added a new selector class which allows selecting items inside a given 3D box. I think it will be useful. I can also add some tests if you guys agree with the merge.

@jmwright
Copy link
Collaborator

I like it, but hopefully @dcowden will have a chance to comment since he conceived, designed and coded the selector system.

From the code, it looks like objects with portions that fall outside of the box will still be selected as long as their center is inside the box. Is that correct? If so, is that the intent?

Thumbs up from me on moving forward with tests in preparation for a merge.

@hyOzd
Copy link
Contributor Author

hyOzd commented Jun 15, 2015

From the code, it looks like objects with portions that fall outside of the box will still be selected as long as their center is inside the box. Is that correct? If so, is that the intent?

Yes, and that was my intent. Is there a way to get the bounding box of an edge/face?

@dcowden
Copy link
Owner

dcowden commented Jun 15, 2015

I think this is a great addition! there should be a way to get a bounding
box for an edge/face-- though i cannot recall upfront how to do it....

On Mon, Jun 15, 2015 at 3:22 PM, Hasan Yavuz ÖZDERYA <
notifications@github.com> wrote:

From the code, it looks like objects with portions that fall outside of
the box will still be selected as long as their center is inside the box.
Is that correct? If so, is that the intent?

Yes, and that was my intent. Is there a way to get the bounding box of an
edge/face?


Reply to this email directly or view it on GitHub
#95 (comment).

@jmwright
Copy link
Collaborator

Here's the bounding box functionality in CQ: https://github.com/dcowden/cadquery/blob/08791e1e31e0e7dabef5cf901eb4be0adc75df67/cadquery/freecad_impl/shapes.py

I'm not implying that there's anything wrong with the way you've done it either. We could just make a note in the wiki that a future improvement might be to allow the user to choose to exclude any objects whose bounding box falls outside of the selection box.

@dcowden
Copy link
Owner

dcowden commented Jun 15, 2015

yeah that would work.

On Mon, Jun 15, 2015 at 3:34 PM, Jeremy Wright notifications@github.com
wrote:

Here's the bounding box functionality in CQ:
https://github.com/dcowden/cadquery/blob/08791e1e31e0e7dabef5cf901eb4be0adc75df67/cadquery/freecad_impl/shapes.py

I'm not implying that there's anything wrong with the way you've done it
either. We could just make a note in the wiki that a future improvement
might be to allow the user to choose to exclude any objects whose bounding
box falls outside of the selection box.


Reply to this email directly or view it on GitHub
#95 (comment).

@hyOzd
Copy link
Contributor Author

hyOzd commented Jun 15, 2015

How about this?

Now the question is: which one should be default - bounding box test or center test? I favor the "center" option because it requires a smaller selection box as input, thus it's easier to avoid unwanted items. What do you guys think?

@jmwright
Copy link
Collaborator

Looks great to me. I could go either way on the default, but I think you make a strong argument for center. My vote is for that.

@dcowden
Copy link
Owner

dcowden commented Jun 15, 2015

I agree. I think in practice the center box will be easier to use
On Jun 15, 2015 5:30 PM, "Jeremy Wright" notifications@github.com wrote:

Looks great to me. I could go either way on the default, but I think you
make a strong argument for center. My vote is for that.


Reply to this email directly or view it on GitHub
#95 (comment).

@jmwright
Copy link
Collaborator

I see that the tests have been added. Is this ready to merge?

@hyOzd
Copy link
Contributor Author

hyOzd commented Jun 21, 2015

Yes, it is.

@jmwright
Copy link
Collaborator

Thanks!

jmwright added a commit that referenced this pull request Jun 21, 2015
Added 3d box selector with an option to use the bounding box for selection.
@jmwright jmwright merged commit 645e3cd into dcowden:master Jun 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants