Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Changes * `ConvexHullMesh` is broken in Wolfram Language 12.2. It seems that only 1D examples evaluate, 2D and 3D example return unevaluated even if using examples from the documentation. * This PR adds a replacement for that function, `convexHullPolygon`. ## Comments * `WolframModelPlot` is completely broken without this function, so this is a critical PR. * Another PR fixing `WolframModelPlot` is coming shortly. * There are lots of tests, they are randomly generated, and visually verified. ## Examples * This is a helper function to verify the polygon: ```wl testPolygon[pts_] := Show[Graphics[({Opacity[0.4], Line[#], Opacity[0.1], Polygon[#]} &)@ First@SetReplace`PackageScope`convexHullPolygon[pts]], Graphics[Point[pts]]] ``` * Try it for a 5-points example: ```wl In[] := testPolygon[{{9, 6}, {8, 7}, {6, 7}, {5, 8}, {8, 2}}] ``` ![image](https://user-images.githubusercontent.com/1479325/95256943-2e454c80-07e9-11eb-9f42-73ce596d093d.png) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/maxitg/setreplace/432) <!-- Reviewable:end -->
- Loading branch information