Andrii Doroshenko (Xrayez)
883ef8570a
Expose 2D polygon boolean operations in Geometry singleton
...
Clipper 6.4.2 is used internally to perform polypaths clipping, as well
as inflating/deflating polypaths. The following methods were added:
```
Geometry.merge_polygons_2d(poly_a, poly_b) # union
Geometry.clip_polygons_2d(poly_a, poly_b) # difference
Geometry.intersect_polygons_2d(poly_a, poly_b) # intersection
Geometry.exclude_polygons_2d(poly_a, poly_b) # xor
Geometry.clip_polyline_with_polygon_2d(poly_a, poly_b)
Geometry.intersect_polyline_with_polygon_2d(poly_a, poly_b)
Geometry.offset_polygon_2d(polygon, delta) # inflate/deflate
Geometry.offset_polyline_2d(polyline, delta) # returns polygons
// This one helps to implement CSG-like behaviour:
Geometry.transform_points_2d(points, transform)
```
All the methods return an array of polygons/polylines. The resulting
polygons could possibly be holes which could be checked with
`Geometry.is_polygon_clockwise()` which was exposed to scripting as well.
2019-05-22 17:12:39 +03:00
..
2019-05-22 17:12:39 +03:00
2019-05-21 10:07:26 +02:00
2019-05-22 17:12:39 +03:00
2019-05-21 02:16:30 -04:00
2019-04-20 02:01:55 +02:00
2019-04-20 02:01:55 +02:00
2019-04-08 19:18:51 -03:00
2019-04-08 19:18:51 -03:00
2018-09-12 09:52:22 +02:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-02-16 04:00:19 +01:00
2019-02-16 04:00:19 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2018-09-15 14:45:54 +02:00
2019-05-03 15:06:05 -07:00
2019-05-03 15:06:05 -07:00
2019-01-07 17:34:44 +00:00
2019-04-20 02:01:55 +02:00
2019-04-20 02:01:55 +02:00
2019-02-17 13:38:52 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-05-19 13:10:35 +02:00
2019-04-29 23:38:42 +01:00
2019-04-29 23:38:42 +01:00
2019-01-01 12:58:10 +01:00
2019-02-12 13:34:25 +01:00
2019-01-01 12:58:10 +01:00
2019-02-12 13:34:25 +01:00
2019-05-05 14:03:56 +02:00
2019-05-05 14:03:56 +02:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-05-01 08:19:04 +02:00
2019-04-27 01:30:46 +02:00
2019-01-01 12:58:10 +01:00
2019-05-09 06:25:32 -04:00
2019-05-09 06:25:32 -04:00
2019-01-01 12:58:10 +01:00
2019-04-27 01:30:46 +02:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-02-12 13:34:25 +01:00
2019-01-01 12:58:10 +01:00
2019-05-20 22:37:01 +02:00
2019-05-20 22:37:01 +02:00
2019-04-20 02:01:55 +02:00
2019-04-09 17:09:48 +02:00
2019-01-01 12:58:10 +01:00
2019-01-30 06:43:56 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-02-12 13:34:25 +01:00
2019-02-12 13:34:25 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-04-15 15:30:54 +02:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-04-27 01:30:46 +02:00
2019-02-12 13:34:25 +01:00
2019-01-01 12:58:10 +01:00
2019-04-11 14:36:58 -03:00
2019-04-11 14:36:58 -03:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-03-20 21:43:55 +01:00
2019-03-20 21:43:55 +01:00
2019-05-03 15:06:05 -07:00
2019-05-03 15:06:05 -07:00
2019-05-22 13:12:21 +03:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-02-12 13:34:25 +01:00
2019-01-01 12:58:10 +01:00
2019-01-01 12:58:10 +01:00
2019-04-19 02:11:39 +02:00
2019-02-12 13:34:25 +01:00
2019-02-12 13:34:25 +01:00
2019-05-02 09:22:40 +02:00
2019-04-24 21:39:29 -04:00
2019-04-27 01:30:46 +02:00
2019-04-05 15:14:53 +02:00
2019-04-05 11:10:15 +03:00
2019-05-19 13:10:35 +02:00
2019-05-19 13:10:35 +02:00
2019-04-08 19:18:51 -03:00
2019-04-08 19:18:51 -03:00
2019-04-08 19:18:51 -03:00
2019-04-09 17:09:48 +02:00
2019-04-09 17:09:48 +02:00
2019-01-01 12:58:10 +01:00
2019-05-20 22:37:01 +02:00
2019-04-20 02:01:55 +02:00
2019-02-12 13:34:25 +01:00
2019-02-17 13:38:52 +01:00
2019-04-05 23:41:51 +02:00
2019-04-05 23:41:51 +02:00