dhermes / bezier

Helper for Bézier Curves, Triangles, and Higher Order Objects
Apache License 2.0
261 stars 36 forks source link

Use`Surface.intersect()` for `classify_intersection5.png` #106

Open dhermes opened 6 years ago

dhermes commented 6 years ago

This depends on #107, i.e. it can't be resolved until / unless #107 is.


Currently, the surface of intersection is manually specified and that is required because it fails with

Traceback (most recent call last):
  File ".../docs/make_images.py", line 850, in classify_intersection5
    intersection, = surface1.intersect(surface2)
  File ".../bezier/surface.py", line 947, in intersect
    self._nodes, self._degree, other._nodes, other._degree, _verify)
  File "src/bezier/_speedup.pyx", line 1081, in bezier._speedup.surface_intersections
    raise NotImplementedError('Line segments parallel.')
dhermes commented 6 years ago

This was filed due to https://github.com/dhermes/bezier/commit/c7fe4b78ee0a3e31d68afd7100d16d06300325f3.

It turns out this isn't so cut-and-dry since those curved polygons are intentionally "split" at the point of tangency.