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

alphashape.contains misses edge points #20

Open
DDeFilippis opened this issue Apr 1, 2021 · 1 comment
Open

alphashape.contains misses edge points #20

DDeFilippis opened this issue Apr 1, 2021 · 1 comment

Comments

@DDeFilippis
Copy link

  • Alpha Shape Toolbox version: 1.2.1
  • Python version:3.9.x
  • Operating System:OSx

Description

When creating an alphashpe with a set of points running alphashape.alphashape.contains() on all of the points the edge and corner points come up as false. the points are floating point numbers and this could be a rounding issue of some sort.

What I Did

Create random floating point coordinates and generate an alphashape using optimizealpha. Then run the alphashap.alphashape.contains() method on all of the points. All of the border points come back false. 

Use the script from https://stackoverflow.com/questions/61757304/how-to-determine-if-a-point-lies-inside-a-concave-hull-alpha-shape but also run the original points through the if statement and see what color they end up being.

What I Expected

Border points used to create an alphashape should be true if passed into the contain method for that alphashape object.

Acceptance Criteria

Border points used to create an alphashape will be true if passed into the contain method for that alphashape object.

@hschoeller
Copy link

Whether edge points are actually contained by the hull is a matter of definition (is the hull an open or a closed set). If you want points inside + edge points, simply retrieve the edge points with alphashape.alphashape.bounds

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

No branches or pull requests

2 participants