DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.73k stars 634 forks source link

Convex hull not outputting as expected #7229

Closed ThomasMahon closed 4 years ago

ThomasMahon commented 8 years ago

Dynamo version

1.1.0

Operating system

Win 10

What did you do?

Convex Hull with 1D list of points (about 600)

What did you expect to see?

A Convex hull

What did you see instead?

image

dimven commented 8 years ago

It's not very intuitive but that's how Dynamo's CH implementation has worked since forever. If you'd like to create face triplets, just chop the list. If you want to visualize the faces, you can feed those triplets into one of the surface creation nodes.

ThomasMahon commented 8 years ago

I think it needs a big overhaul if that is the case. A convex hull function - as I'm sure you would agree - should do this: 10pointshull1

If the user is required to pick three points each time, then its flawed.

dimven commented 8 years ago

Hmm, I didn't notice that in your picture it didn't encapsulate all the points, it looks like a bug. Are your points flat? That might be causing some issue. It works as expected for 3d sets of points:

revit_2016-10-02_18-41-03

Clockwork has a node that works for 2d data sets called "UV.ConvexHull2D".

ThomasMahon commented 8 years ago

Yep, 2D points created using Point.ByCoordinates

image

I thought it might be related to large units limitations reported here #6963 so I attempted to scale the points and see if that improved things, but I got the same result.

dimven commented 8 years ago

Hmm the question then should be, does the built-in convex hull even work with 2d points?

andydandy74 commented 8 years ago

It's a 3D algorithm, see discussion in #5194

ThomasMahon commented 8 years ago

@dimven @andydandy74 3D only! I'm a bit surprised. Would have thought it would be split into 2D and 3D versions.

Hi @ikeough in ref to #5194 is this likely to be implemented in future Dynamo releases or should this be a community-driven initiative maybe building on the great work @dimven has started with UV.ConvexHull2D?

dimven commented 8 years ago

It's actually the great work of @andydandy74 and Wikipedia :)

ThomasMahon commented 8 years ago

Thanks for point that out! Great work @andydandy74 !

mccrone commented 7 years ago

@ThomasMahon @andydandy74 @dimven @kronz And here's another approach for any set of planar points. Input is a polycurve just to keep things organized. All in DesignScript. Ampersand package. convexhull

jnealb commented 7 years ago

@mccrone Nice.

Amoursol commented 4 years ago

Thank you for the submission of this Issue above - We very much do appreciate your time taken to look to improve Dynamo and help it grow and evolve into the future.

In order to better serve the active Dynamo user base and the evolving nature of Dynamo, the Dynamo team has made the decision to close any issue that hasn't had activity since 1st January 2019. This doesn't mean that these issues will not be addressed, but just that they are not being actively worked on as they do not align with our current Dynamo Public Roadmap.

If this issue is still relevant to you and your workflows, please do re-submit in a new Github Issue and link to this closed issue for historical context.

Many thanks, The Dynamo Team