cytriangle 1.0.1__cp312-cp312-macosx_14_0_arm64.whl → 1.0.2__cp312-cp312-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cytriangle might be problematic. Click here for more details.
- cytriangle/cytriangle.c +1264 -645
- cytriangle/cytriangle.cpython-312-darwin.so +0 -0
- cytriangle/cytriangle.pyx +33 -24
- cytriangle/cytriangleio.c +1460 -1454
- cytriangle/cytriangleio.cpython-312-darwin.so +0 -0
- cytriangle/cytriangleio.pxd +0 -1
- cytriangle/cytriangleio.pyx +38 -24
- {cytriangle-1.0.1.dist-info → cytriangle-1.0.2.dist-info}/METADATA +1 -1
- cytriangle-1.0.2.dist-info/RECORD +13 -0
- cytriangle-1.0.1.dist-info/RECORD +0 -13
- {cytriangle-1.0.1.dist-info → cytriangle-1.0.2.dist-info}/LICENSE +0 -0
- {cytriangle-1.0.1.dist-info → cytriangle-1.0.2.dist-info}/WHEEL +0 -0
cytriangle/cytriangle.c
CHANGED
|
@@ -1523,34 +1523,72 @@ static const char *__pyx_f[] = {
|
|
|
1523
1523
|
struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO;
|
|
1524
1524
|
struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle;
|
|
1525
1525
|
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_triangulate;
|
|
1526
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay;
|
|
1527
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull;
|
|
1528
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi;
|
|
1526
1529
|
|
|
1527
1530
|
/* "cytriangle/cytriangle.pyx":94
|
|
1528
1531
|
*
|
|
1529
1532
|
* # generic triangulation that accepts any switch
|
|
1530
|
-
* cpdef triangulate(self, triflags=''): # <<<<<<<<<<<<<<
|
|
1533
|
+
* cpdef triangulate(self, triflags='', verbose=False): # <<<<<<<<<<<<<<
|
|
1531
1534
|
* """
|
|
1532
1535
|
* Runs the main triangulation method on the in_ object with any additional
|
|
1533
1536
|
*/
|
|
1534
1537
|
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_triangulate {
|
|
1535
1538
|
int __pyx_n;
|
|
1536
1539
|
PyObject *triflags;
|
|
1540
|
+
PyObject *verbose;
|
|
1541
|
+
};
|
|
1542
|
+
|
|
1543
|
+
/* "cytriangle/cytriangle.pyx":132
|
|
1544
|
+
* return self.out
|
|
1545
|
+
*
|
|
1546
|
+
* cpdef delaunay(self, verbose=False): # <<<<<<<<<<<<<<
|
|
1547
|
+
* """
|
|
1548
|
+
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
1549
|
+
*/
|
|
1550
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay {
|
|
1551
|
+
int __pyx_n;
|
|
1552
|
+
PyObject *verbose;
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1555
|
+
/* "cytriangle/cytriangle.pyx":148
|
|
1556
|
+
* return self.out
|
|
1557
|
+
*
|
|
1558
|
+
* cpdef convex_hull(self, verbose=False): # <<<<<<<<<<<<<<
|
|
1559
|
+
* """
|
|
1560
|
+
* Run the main triangulation method on the in_ object with -Qzc flags enabled.
|
|
1561
|
+
*/
|
|
1562
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull {
|
|
1563
|
+
int __pyx_n;
|
|
1564
|
+
PyObject *verbose;
|
|
1565
|
+
};
|
|
1566
|
+
|
|
1567
|
+
/* "cytriangle/cytriangle.pyx":166
|
|
1568
|
+
* return self.out
|
|
1569
|
+
*
|
|
1570
|
+
* cpdef voronoi(self, verbose=False): # <<<<<<<<<<<<<<
|
|
1571
|
+
* """
|
|
1572
|
+
* Run the main triangulation method on the in_ object with -Qzv flags enabled.
|
|
1573
|
+
*/
|
|
1574
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi {
|
|
1575
|
+
int __pyx_n;
|
|
1576
|
+
PyObject *verbose;
|
|
1537
1577
|
};
|
|
1538
1578
|
|
|
1539
1579
|
/* "cytriangle/cytriangleio.pxd":3
|
|
1540
1580
|
* from cytriangle.ctriangle cimport triangulateio
|
|
1541
1581
|
*
|
|
1542
1582
|
* cdef class TriangleIO: # <<<<<<<<<<<<<<
|
|
1543
|
-
* cdef int out_flag
|
|
1544
1583
|
* cdef triangulateio* _io
|
|
1545
1584
|
*/
|
|
1546
1585
|
struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO {
|
|
1547
1586
|
PyObject_HEAD
|
|
1548
|
-
int out_flag;
|
|
1549
1587
|
struct triangulateio *_io;
|
|
1550
1588
|
};
|
|
1551
1589
|
|
|
1552
1590
|
|
|
1553
|
-
/* "cytriangle/cytriangle.pyx":
|
|
1591
|
+
/* "cytriangle/cytriangle.pyx":5
|
|
1554
1592
|
* import re
|
|
1555
1593
|
*
|
|
1556
1594
|
* cdef class CyTriangle: # <<<<<<<<<<<<<<
|
|
@@ -1569,9 +1607,9 @@ struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle {
|
|
|
1569
1607
|
|
|
1570
1608
|
struct __pyx_vtabstruct_10cytriangle_10cytriangle_CyTriangle {
|
|
1571
1609
|
PyObject *(*triangulate)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_triangulate *__pyx_optional_args);
|
|
1572
|
-
PyObject *(*delaunay)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch);
|
|
1573
|
-
PyObject *(*convex_hull)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch);
|
|
1574
|
-
PyObject *(*voronoi)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch);
|
|
1610
|
+
PyObject *(*delaunay)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay *__pyx_optional_args);
|
|
1611
|
+
PyObject *(*convex_hull)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull *__pyx_optional_args);
|
|
1612
|
+
PyObject *(*voronoi)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi *__pyx_optional_args);
|
|
1575
1613
|
};
|
|
1576
1614
|
static struct __pyx_vtabstruct_10cytriangle_10cytriangle_CyTriangle *__pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle;
|
|
1577
1615
|
/* #### Code section: utility_code_proto ### */
|
|
@@ -1910,6 +1948,9 @@ static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_ve
|
|
|
1910
1948
|
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
|
|
1911
1949
|
#endif
|
|
1912
1950
|
|
|
1951
|
+
/* PyUnicode_Unicode.proto */
|
|
1952
|
+
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);
|
|
1953
|
+
|
|
1913
1954
|
/* PyObjectFormatSimple.proto */
|
|
1914
1955
|
#if CYTHON_COMPILING_IN_PYPY
|
|
1915
1956
|
#define __Pyx_PyObject_FormatSimple(s, f) (\
|
|
@@ -1932,6 +1973,28 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
|
|
|
1932
1973
|
PyObject_Format(s, f))
|
|
1933
1974
|
#endif
|
|
1934
1975
|
|
|
1976
|
+
/* JoinPyUnicode.proto */
|
|
1977
|
+
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
|
|
1978
|
+
Py_UCS4 max_char);
|
|
1979
|
+
|
|
1980
|
+
/* UnicodeConcatInPlace.proto */
|
|
1981
|
+
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
|
|
1982
|
+
#if CYTHON_REFNANNY
|
|
1983
|
+
#define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
|
|
1984
|
+
#else
|
|
1985
|
+
#define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
|
|
1986
|
+
#endif
|
|
1987
|
+
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
|
|
1988
|
+
#if CYTHON_REFNANNY
|
|
1989
|
+
, void* __pyx_refnanny
|
|
1990
|
+
#endif
|
|
1991
|
+
);
|
|
1992
|
+
#else
|
|
1993
|
+
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
|
|
1994
|
+
#endif
|
|
1995
|
+
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
|
|
1996
|
+
PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))
|
|
1997
|
+
|
|
1935
1998
|
/* KeywordStringCheck.proto */
|
|
1936
1999
|
static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
|
|
1937
2000
|
|
|
@@ -2312,9 +2375,9 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
|
|
|
2312
2375
|
|
|
2313
2376
|
/* #### Code section: module_declarations ### */
|
|
2314
2377
|
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_triangulate *__pyx_optional_args); /* proto*/
|
|
2315
|
-
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
|
|
2316
|
-
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
|
|
2317
|
-
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
|
|
2378
|
+
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay *__pyx_optional_args); /* proto*/
|
|
2379
|
+
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull *__pyx_optional_args); /* proto*/
|
|
2380
|
+
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi *__pyx_optional_args); /* proto*/
|
|
2318
2381
|
|
|
2319
2382
|
/* Module declarations from "cytriangle.ctriangle" */
|
|
2320
2383
|
|
|
@@ -2335,24 +2398,26 @@ static PyObject *__pyx_builtin_RuntimeError;
|
|
|
2335
2398
|
/* #### Code section: string_decls ### */
|
|
2336
2399
|
static const char __pyx_k_[] = "";
|
|
2337
2400
|
static const char __pyx_k_A[] = "A";
|
|
2401
|
+
static const char __pyx_k_Q[] = "Q";
|
|
2402
|
+
static const char __pyx_k_V[] = "V";
|
|
2338
2403
|
static const char __pyx_k_a[] = "a";
|
|
2339
2404
|
static const char __pyx_k_p[] = "p";
|
|
2340
2405
|
static const char __pyx_k_q[] = "q";
|
|
2341
2406
|
static const char __pyx_k_r[] = "r";
|
|
2342
|
-
static const char
|
|
2407
|
+
static const char __pyx_k_z[] = "z";
|
|
2343
2408
|
static const char __pyx_k_gc[] = "gc";
|
|
2344
2409
|
static const char __pyx_k_np[] = "np";
|
|
2345
2410
|
static const char __pyx_k_re[] = "re";
|
|
2346
|
-
static const char
|
|
2347
|
-
static const char
|
|
2411
|
+
static const char __pyx_k_zc[] = "zc";
|
|
2412
|
+
static const char __pyx_k_zv[] = "zv";
|
|
2348
2413
|
static const char __pyx_k__11[] = ".";
|
|
2349
2414
|
static const char __pyx_k__12[] = "*";
|
|
2350
|
-
static const char
|
|
2415
|
+
static const char __pyx_k__38[] = "?";
|
|
2351
2416
|
static const char __pyx_k_new[] = "__new__";
|
|
2352
2417
|
static const char __pyx_k_opt[] = "opt";
|
|
2353
2418
|
static const char __pyx_k_out[] = "out";
|
|
2419
|
+
static const char __pyx_k_None[] = "None";
|
|
2354
2420
|
static const char __pyx_k_dict[] = "__dict__";
|
|
2355
|
-
static const char __pyx_k_kind[] = "kind";
|
|
2356
2421
|
static const char __pyx_k_main[] = "__main__";
|
|
2357
2422
|
static const char __pyx_k_name[] = "__name__";
|
|
2358
2423
|
static const char __pyx_k_opts[] = "opts";
|
|
@@ -2376,6 +2441,7 @@ static const char __pyx_k_vertex[] = "vertex";
|
|
|
2376
2441
|
static const char __pyx_k_disable[] = "disable";
|
|
2377
2442
|
static const char __pyx_k_regions[] = "regions";
|
|
2378
2443
|
static const char __pyx_k_to_dict[] = "to_dict";
|
|
2444
|
+
static const char __pyx_k_verbose[] = "verbose";
|
|
2379
2445
|
static const char __pyx_k_voronoi[] = "voronoi";
|
|
2380
2446
|
static const char __pyx_k_delaunay[] = "delaunay";
|
|
2381
2447
|
static const char __pyx_k_getstate[] = "__getstate__";
|
|
@@ -2429,13 +2495,13 @@ static const char __pyx_k_CyTriangle___setstate_cython[] = "CyTriangle.__setstat
|
|
|
2429
2495
|
static const char __pyx_k_Delaunay_triangulation_failed[] = "Delaunay triangulation failed";
|
|
2430
2496
|
static const char __pyx_k_src_cytriangle_cytriangle_pyx[] = "src/cytriangle/cytriangle.pyx";
|
|
2431
2497
|
static const char __pyx_k_CyTriangle_validate_input_flags[] = "CyTriangle.validate_input_flags";
|
|
2432
|
-
static const char __pyx_k_Delaunay_triangulation_and_conve[] = "Delaunay triangulation and convex hull
|
|
2433
|
-
static const char __pyx_k_Delaunay_triangulation_and_gener[] = "Delaunay triangulation and generation of
|
|
2498
|
+
static const char __pyx_k_Delaunay_triangulation_and_conve[] = "Delaunay triangulation and convex hull\n construction failed";
|
|
2499
|
+
static const char __pyx_k_Delaunay_triangulation_and_gener[] = "Delaunay triangulation and generation of\n voronoi diagram failed";
|
|
2434
2500
|
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xfa5e81c, 0xcb7eaaa, 0xa10a831) = (_in, _out, _vorout))";
|
|
2435
2501
|
static const char __pyx_k_Segment_list_must_be_provided_wh[] = "Segment list must be provided when using 'p' flag";
|
|
2436
2502
|
static const char __pyx_k_Triangle_list_must_be_provided_w[] = "Triangle list must be provided when using 'r' flag";
|
|
2437
2503
|
static const char __pyx_k_When_using_a_flag_for_area_const[] = "When using 'a' flag for area constraints, a global\n area flag (e.g. a0.2), 'A' flag, or local triangle area\n constraint list (e.g. [3.0, 1.0]) must be provided";
|
|
2438
|
-
static const char __pyx_k_When_using_q_flag_for_minimum_an[] = "When using 'q' flag for minimum angles, an angle
|
|
2504
|
+
static const char __pyx_k_When_using_q_flag_for_minimum_an[] = "When using 'q' flag for minimum angles, an angle\n must be provided";
|
|
2439
2505
|
/* #### Code section: decls ### */
|
|
2440
2506
|
static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_input_dict); /* proto */
|
|
2441
2507
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3in____get__(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self); /* proto */
|
|
@@ -2445,10 +2511,10 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_2input_dict(str
|
|
|
2445
2511
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_4output_dict(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_opt); /* proto */
|
|
2446
2512
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6voronoi_dict(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_opt); /* proto */
|
|
2447
2513
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input_flags(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_opts); /* proto */
|
|
2448
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_triflags); /* proto */
|
|
2449
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_12delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self); /* proto */
|
|
2450
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_14convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self); /* proto */
|
|
2451
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_16voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self); /* proto */
|
|
2514
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_triflags, PyObject *__pyx_v_verbose); /* proto */
|
|
2515
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_12delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_verbose); /* proto */
|
|
2516
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_14convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_verbose); /* proto */
|
|
2517
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_16voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_verbose); /* proto */
|
|
2452
2518
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_18__reduce_cython__(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self); /* proto */
|
|
2453
2519
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_20__setstate_cython__(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
|
|
2454
2520
|
static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_input_dict, PyObject *__pyx_v_flags); /* proto */
|
|
@@ -2507,21 +2573,20 @@ typedef struct {
|
|
|
2507
2573
|
PyObject *__pyx_kp_u_Delaunay_triangulation_and_gener;
|
|
2508
2574
|
PyObject *__pyx_kp_u_Delaunay_triangulation_failed;
|
|
2509
2575
|
PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
|
|
2576
|
+
PyObject *__pyx_kp_u_None;
|
|
2510
2577
|
PyObject *__pyx_n_s_PickleError;
|
|
2511
|
-
PyObject *
|
|
2512
|
-
PyObject *__pyx_n_u_Qz;
|
|
2513
|
-
PyObject *__pyx_n_b_Qzc;
|
|
2514
|
-
PyObject *__pyx_n_b_Qzv;
|
|
2578
|
+
PyObject *__pyx_n_u_Q;
|
|
2515
2579
|
PyObject *__pyx_n_s_RuntimeError;
|
|
2516
2580
|
PyObject *__pyx_kp_u_Segment_list_must_be_provided_wh;
|
|
2517
2581
|
PyObject *__pyx_kp_u_Triangle_list_must_be_provided_w;
|
|
2518
2582
|
PyObject *__pyx_kp_u_Triangulation_failed;
|
|
2583
|
+
PyObject *__pyx_n_u_V;
|
|
2519
2584
|
PyObject *__pyx_n_s_ValueError;
|
|
2520
2585
|
PyObject *__pyx_kp_u_When_using_a_flag_for_area_const;
|
|
2521
2586
|
PyObject *__pyx_kp_u_When_using_q_flag_for_minimum_an;
|
|
2522
2587
|
PyObject *__pyx_kp_u__11;
|
|
2523
2588
|
PyObject *__pyx_n_s__12;
|
|
2524
|
-
PyObject *
|
|
2589
|
+
PyObject *__pyx_n_s__38;
|
|
2525
2590
|
PyObject *__pyx_n_u_a;
|
|
2526
2591
|
PyObject *__pyx_kp_u_a_d_d;
|
|
2527
2592
|
PyObject *__pyx_n_s_asyncio_coroutines;
|
|
@@ -2541,7 +2606,6 @@ typedef struct {
|
|
|
2541
2606
|
PyObject *__pyx_n_s_input_dict;
|
|
2542
2607
|
PyObject *__pyx_n_s_is_coroutine;
|
|
2543
2608
|
PyObject *__pyx_kp_u_isenabled;
|
|
2544
|
-
PyObject *__pyx_n_s_kind;
|
|
2545
2609
|
PyObject *__pyx_n_s_main;
|
|
2546
2610
|
PyObject *__pyx_n_u_marker;
|
|
2547
2611
|
PyObject *__pyx_n_u_max_area;
|
|
@@ -2551,7 +2615,6 @@ typedef struct {
|
|
|
2551
2615
|
PyObject *__pyx_n_s_opt;
|
|
2552
2616
|
PyObject *__pyx_n_s_opts;
|
|
2553
2617
|
PyObject *__pyx_n_s_out;
|
|
2554
|
-
PyObject *__pyx_n_u_out;
|
|
2555
2618
|
PyObject *__pyx_n_s_output_dict;
|
|
2556
2619
|
PyObject *__pyx_n_u_p;
|
|
2557
2620
|
PyObject *__pyx_n_s_parsed_regions;
|
|
@@ -2592,9 +2655,13 @@ typedef struct {
|
|
|
2592
2655
|
PyObject *__pyx_n_s_update;
|
|
2593
2656
|
PyObject *__pyx_n_s_use_setstate;
|
|
2594
2657
|
PyObject *__pyx_n_s_validate_input_flags;
|
|
2658
|
+
PyObject *__pyx_n_s_verbose;
|
|
2595
2659
|
PyObject *__pyx_n_u_vertex;
|
|
2596
2660
|
PyObject *__pyx_n_s_voronoi;
|
|
2597
2661
|
PyObject *__pyx_n_s_voronoi_dict;
|
|
2662
|
+
PyObject *__pyx_n_u_z;
|
|
2663
|
+
PyObject *__pyx_n_u_zc;
|
|
2664
|
+
PyObject *__pyx_n_u_zv;
|
|
2598
2665
|
PyObject *__pyx_int_168863793;
|
|
2599
2666
|
PyObject *__pyx_int_213379754;
|
|
2600
2667
|
PyObject *__pyx_int_262531100;
|
|
@@ -2613,22 +2680,25 @@ typedef struct {
|
|
|
2613
2680
|
PyObject *__pyx_tuple__20;
|
|
2614
2681
|
PyObject *__pyx_tuple__22;
|
|
2615
2682
|
PyObject *__pyx_tuple__23;
|
|
2683
|
+
PyObject *__pyx_tuple__25;
|
|
2616
2684
|
PyObject *__pyx_tuple__27;
|
|
2617
2685
|
PyObject *__pyx_tuple__29;
|
|
2618
|
-
PyObject *
|
|
2619
|
-
PyObject *
|
|
2686
|
+
PyObject *__pyx_tuple__30;
|
|
2687
|
+
PyObject *__pyx_tuple__32;
|
|
2688
|
+
PyObject *__pyx_tuple__34;
|
|
2689
|
+
PyObject *__pyx_tuple__36;
|
|
2620
2690
|
PyObject *__pyx_codeobj__14;
|
|
2621
2691
|
PyObject *__pyx_codeobj__16;
|
|
2622
2692
|
PyObject *__pyx_codeobj__17;
|
|
2623
2693
|
PyObject *__pyx_codeobj__19;
|
|
2624
2694
|
PyObject *__pyx_codeobj__21;
|
|
2625
2695
|
PyObject *__pyx_codeobj__24;
|
|
2626
|
-
PyObject *__pyx_codeobj__25;
|
|
2627
2696
|
PyObject *__pyx_codeobj__26;
|
|
2628
2697
|
PyObject *__pyx_codeobj__28;
|
|
2629
|
-
PyObject *
|
|
2630
|
-
PyObject *
|
|
2631
|
-
PyObject *
|
|
2698
|
+
PyObject *__pyx_codeobj__31;
|
|
2699
|
+
PyObject *__pyx_codeobj__33;
|
|
2700
|
+
PyObject *__pyx_codeobj__35;
|
|
2701
|
+
PyObject *__pyx_codeobj__37;
|
|
2632
2702
|
} __pyx_mstate;
|
|
2633
2703
|
|
|
2634
2704
|
#if CYTHON_USE_MODULE_STATE
|
|
@@ -2691,21 +2761,20 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2691
2761
|
Py_CLEAR(clear_module_state->__pyx_kp_u_Delaunay_triangulation_and_gener);
|
|
2692
2762
|
Py_CLEAR(clear_module_state->__pyx_kp_u_Delaunay_triangulation_failed);
|
|
2693
2763
|
Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
|
|
2764
|
+
Py_CLEAR(clear_module_state->__pyx_kp_u_None);
|
|
2694
2765
|
Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
|
|
2695
|
-
Py_CLEAR(clear_module_state->
|
|
2696
|
-
Py_CLEAR(clear_module_state->__pyx_n_u_Qz);
|
|
2697
|
-
Py_CLEAR(clear_module_state->__pyx_n_b_Qzc);
|
|
2698
|
-
Py_CLEAR(clear_module_state->__pyx_n_b_Qzv);
|
|
2766
|
+
Py_CLEAR(clear_module_state->__pyx_n_u_Q);
|
|
2699
2767
|
Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
|
|
2700
2768
|
Py_CLEAR(clear_module_state->__pyx_kp_u_Segment_list_must_be_provided_wh);
|
|
2701
2769
|
Py_CLEAR(clear_module_state->__pyx_kp_u_Triangle_list_must_be_provided_w);
|
|
2702
2770
|
Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_failed);
|
|
2771
|
+
Py_CLEAR(clear_module_state->__pyx_n_u_V);
|
|
2703
2772
|
Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
|
|
2704
2773
|
Py_CLEAR(clear_module_state->__pyx_kp_u_When_using_a_flag_for_area_const);
|
|
2705
2774
|
Py_CLEAR(clear_module_state->__pyx_kp_u_When_using_q_flag_for_minimum_an);
|
|
2706
2775
|
Py_CLEAR(clear_module_state->__pyx_kp_u__11);
|
|
2707
2776
|
Py_CLEAR(clear_module_state->__pyx_n_s__12);
|
|
2708
|
-
Py_CLEAR(clear_module_state->
|
|
2777
|
+
Py_CLEAR(clear_module_state->__pyx_n_s__38);
|
|
2709
2778
|
Py_CLEAR(clear_module_state->__pyx_n_u_a);
|
|
2710
2779
|
Py_CLEAR(clear_module_state->__pyx_kp_u_a_d_d);
|
|
2711
2780
|
Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
|
|
@@ -2725,7 +2794,6 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2725
2794
|
Py_CLEAR(clear_module_state->__pyx_n_s_input_dict);
|
|
2726
2795
|
Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
|
|
2727
2796
|
Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
|
|
2728
|
-
Py_CLEAR(clear_module_state->__pyx_n_s_kind);
|
|
2729
2797
|
Py_CLEAR(clear_module_state->__pyx_n_s_main);
|
|
2730
2798
|
Py_CLEAR(clear_module_state->__pyx_n_u_marker);
|
|
2731
2799
|
Py_CLEAR(clear_module_state->__pyx_n_u_max_area);
|
|
@@ -2735,7 +2803,6 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2735
2803
|
Py_CLEAR(clear_module_state->__pyx_n_s_opt);
|
|
2736
2804
|
Py_CLEAR(clear_module_state->__pyx_n_s_opts);
|
|
2737
2805
|
Py_CLEAR(clear_module_state->__pyx_n_s_out);
|
|
2738
|
-
Py_CLEAR(clear_module_state->__pyx_n_u_out);
|
|
2739
2806
|
Py_CLEAR(clear_module_state->__pyx_n_s_output_dict);
|
|
2740
2807
|
Py_CLEAR(clear_module_state->__pyx_n_u_p);
|
|
2741
2808
|
Py_CLEAR(clear_module_state->__pyx_n_s_parsed_regions);
|
|
@@ -2776,9 +2843,13 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2776
2843
|
Py_CLEAR(clear_module_state->__pyx_n_s_update);
|
|
2777
2844
|
Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
|
|
2778
2845
|
Py_CLEAR(clear_module_state->__pyx_n_s_validate_input_flags);
|
|
2846
|
+
Py_CLEAR(clear_module_state->__pyx_n_s_verbose);
|
|
2779
2847
|
Py_CLEAR(clear_module_state->__pyx_n_u_vertex);
|
|
2780
2848
|
Py_CLEAR(clear_module_state->__pyx_n_s_voronoi);
|
|
2781
2849
|
Py_CLEAR(clear_module_state->__pyx_n_s_voronoi_dict);
|
|
2850
|
+
Py_CLEAR(clear_module_state->__pyx_n_u_z);
|
|
2851
|
+
Py_CLEAR(clear_module_state->__pyx_n_u_zc);
|
|
2852
|
+
Py_CLEAR(clear_module_state->__pyx_n_u_zv);
|
|
2782
2853
|
Py_CLEAR(clear_module_state->__pyx_int_168863793);
|
|
2783
2854
|
Py_CLEAR(clear_module_state->__pyx_int_213379754);
|
|
2784
2855
|
Py_CLEAR(clear_module_state->__pyx_int_262531100);
|
|
@@ -2797,22 +2868,25 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2797
2868
|
Py_CLEAR(clear_module_state->__pyx_tuple__20);
|
|
2798
2869
|
Py_CLEAR(clear_module_state->__pyx_tuple__22);
|
|
2799
2870
|
Py_CLEAR(clear_module_state->__pyx_tuple__23);
|
|
2871
|
+
Py_CLEAR(clear_module_state->__pyx_tuple__25);
|
|
2800
2872
|
Py_CLEAR(clear_module_state->__pyx_tuple__27);
|
|
2801
2873
|
Py_CLEAR(clear_module_state->__pyx_tuple__29);
|
|
2802
|
-
Py_CLEAR(clear_module_state->
|
|
2803
|
-
Py_CLEAR(clear_module_state->
|
|
2874
|
+
Py_CLEAR(clear_module_state->__pyx_tuple__30);
|
|
2875
|
+
Py_CLEAR(clear_module_state->__pyx_tuple__32);
|
|
2876
|
+
Py_CLEAR(clear_module_state->__pyx_tuple__34);
|
|
2877
|
+
Py_CLEAR(clear_module_state->__pyx_tuple__36);
|
|
2804
2878
|
Py_CLEAR(clear_module_state->__pyx_codeobj__14);
|
|
2805
2879
|
Py_CLEAR(clear_module_state->__pyx_codeobj__16);
|
|
2806
2880
|
Py_CLEAR(clear_module_state->__pyx_codeobj__17);
|
|
2807
2881
|
Py_CLEAR(clear_module_state->__pyx_codeobj__19);
|
|
2808
2882
|
Py_CLEAR(clear_module_state->__pyx_codeobj__21);
|
|
2809
2883
|
Py_CLEAR(clear_module_state->__pyx_codeobj__24);
|
|
2810
|
-
Py_CLEAR(clear_module_state->__pyx_codeobj__25);
|
|
2811
2884
|
Py_CLEAR(clear_module_state->__pyx_codeobj__26);
|
|
2812
2885
|
Py_CLEAR(clear_module_state->__pyx_codeobj__28);
|
|
2813
|
-
Py_CLEAR(clear_module_state->
|
|
2814
|
-
Py_CLEAR(clear_module_state->
|
|
2815
|
-
Py_CLEAR(clear_module_state->
|
|
2886
|
+
Py_CLEAR(clear_module_state->__pyx_codeobj__31);
|
|
2887
|
+
Py_CLEAR(clear_module_state->__pyx_codeobj__33);
|
|
2888
|
+
Py_CLEAR(clear_module_state->__pyx_codeobj__35);
|
|
2889
|
+
Py_CLEAR(clear_module_state->__pyx_codeobj__37);
|
|
2816
2890
|
return 0;
|
|
2817
2891
|
}
|
|
2818
2892
|
#endif
|
|
@@ -2853,21 +2927,20 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2853
2927
|
Py_VISIT(traverse_module_state->__pyx_kp_u_Delaunay_triangulation_and_gener);
|
|
2854
2928
|
Py_VISIT(traverse_module_state->__pyx_kp_u_Delaunay_triangulation_failed);
|
|
2855
2929
|
Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
|
|
2930
|
+
Py_VISIT(traverse_module_state->__pyx_kp_u_None);
|
|
2856
2931
|
Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
|
|
2857
|
-
Py_VISIT(traverse_module_state->
|
|
2858
|
-
Py_VISIT(traverse_module_state->__pyx_n_u_Qz);
|
|
2859
|
-
Py_VISIT(traverse_module_state->__pyx_n_b_Qzc);
|
|
2860
|
-
Py_VISIT(traverse_module_state->__pyx_n_b_Qzv);
|
|
2932
|
+
Py_VISIT(traverse_module_state->__pyx_n_u_Q);
|
|
2861
2933
|
Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
|
|
2862
2934
|
Py_VISIT(traverse_module_state->__pyx_kp_u_Segment_list_must_be_provided_wh);
|
|
2863
2935
|
Py_VISIT(traverse_module_state->__pyx_kp_u_Triangle_list_must_be_provided_w);
|
|
2864
2936
|
Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_failed);
|
|
2937
|
+
Py_VISIT(traverse_module_state->__pyx_n_u_V);
|
|
2865
2938
|
Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
|
|
2866
2939
|
Py_VISIT(traverse_module_state->__pyx_kp_u_When_using_a_flag_for_area_const);
|
|
2867
2940
|
Py_VISIT(traverse_module_state->__pyx_kp_u_When_using_q_flag_for_minimum_an);
|
|
2868
2941
|
Py_VISIT(traverse_module_state->__pyx_kp_u__11);
|
|
2869
2942
|
Py_VISIT(traverse_module_state->__pyx_n_s__12);
|
|
2870
|
-
Py_VISIT(traverse_module_state->
|
|
2943
|
+
Py_VISIT(traverse_module_state->__pyx_n_s__38);
|
|
2871
2944
|
Py_VISIT(traverse_module_state->__pyx_n_u_a);
|
|
2872
2945
|
Py_VISIT(traverse_module_state->__pyx_kp_u_a_d_d);
|
|
2873
2946
|
Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
|
|
@@ -2887,7 +2960,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2887
2960
|
Py_VISIT(traverse_module_state->__pyx_n_s_input_dict);
|
|
2888
2961
|
Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
|
|
2889
2962
|
Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
|
|
2890
|
-
Py_VISIT(traverse_module_state->__pyx_n_s_kind);
|
|
2891
2963
|
Py_VISIT(traverse_module_state->__pyx_n_s_main);
|
|
2892
2964
|
Py_VISIT(traverse_module_state->__pyx_n_u_marker);
|
|
2893
2965
|
Py_VISIT(traverse_module_state->__pyx_n_u_max_area);
|
|
@@ -2897,7 +2969,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2897
2969
|
Py_VISIT(traverse_module_state->__pyx_n_s_opt);
|
|
2898
2970
|
Py_VISIT(traverse_module_state->__pyx_n_s_opts);
|
|
2899
2971
|
Py_VISIT(traverse_module_state->__pyx_n_s_out);
|
|
2900
|
-
Py_VISIT(traverse_module_state->__pyx_n_u_out);
|
|
2901
2972
|
Py_VISIT(traverse_module_state->__pyx_n_s_output_dict);
|
|
2902
2973
|
Py_VISIT(traverse_module_state->__pyx_n_u_p);
|
|
2903
2974
|
Py_VISIT(traverse_module_state->__pyx_n_s_parsed_regions);
|
|
@@ -2938,9 +3009,13 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2938
3009
|
Py_VISIT(traverse_module_state->__pyx_n_s_update);
|
|
2939
3010
|
Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
|
|
2940
3011
|
Py_VISIT(traverse_module_state->__pyx_n_s_validate_input_flags);
|
|
3012
|
+
Py_VISIT(traverse_module_state->__pyx_n_s_verbose);
|
|
2941
3013
|
Py_VISIT(traverse_module_state->__pyx_n_u_vertex);
|
|
2942
3014
|
Py_VISIT(traverse_module_state->__pyx_n_s_voronoi);
|
|
2943
3015
|
Py_VISIT(traverse_module_state->__pyx_n_s_voronoi_dict);
|
|
3016
|
+
Py_VISIT(traverse_module_state->__pyx_n_u_z);
|
|
3017
|
+
Py_VISIT(traverse_module_state->__pyx_n_u_zc);
|
|
3018
|
+
Py_VISIT(traverse_module_state->__pyx_n_u_zv);
|
|
2944
3019
|
Py_VISIT(traverse_module_state->__pyx_int_168863793);
|
|
2945
3020
|
Py_VISIT(traverse_module_state->__pyx_int_213379754);
|
|
2946
3021
|
Py_VISIT(traverse_module_state->__pyx_int_262531100);
|
|
@@ -2959,22 +3034,25 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2959
3034
|
Py_VISIT(traverse_module_state->__pyx_tuple__20);
|
|
2960
3035
|
Py_VISIT(traverse_module_state->__pyx_tuple__22);
|
|
2961
3036
|
Py_VISIT(traverse_module_state->__pyx_tuple__23);
|
|
3037
|
+
Py_VISIT(traverse_module_state->__pyx_tuple__25);
|
|
2962
3038
|
Py_VISIT(traverse_module_state->__pyx_tuple__27);
|
|
2963
3039
|
Py_VISIT(traverse_module_state->__pyx_tuple__29);
|
|
2964
|
-
Py_VISIT(traverse_module_state->
|
|
2965
|
-
Py_VISIT(traverse_module_state->
|
|
3040
|
+
Py_VISIT(traverse_module_state->__pyx_tuple__30);
|
|
3041
|
+
Py_VISIT(traverse_module_state->__pyx_tuple__32);
|
|
3042
|
+
Py_VISIT(traverse_module_state->__pyx_tuple__34);
|
|
3043
|
+
Py_VISIT(traverse_module_state->__pyx_tuple__36);
|
|
2966
3044
|
Py_VISIT(traverse_module_state->__pyx_codeobj__14);
|
|
2967
3045
|
Py_VISIT(traverse_module_state->__pyx_codeobj__16);
|
|
2968
3046
|
Py_VISIT(traverse_module_state->__pyx_codeobj__17);
|
|
2969
3047
|
Py_VISIT(traverse_module_state->__pyx_codeobj__19);
|
|
2970
3048
|
Py_VISIT(traverse_module_state->__pyx_codeobj__21);
|
|
2971
3049
|
Py_VISIT(traverse_module_state->__pyx_codeobj__24);
|
|
2972
|
-
Py_VISIT(traverse_module_state->__pyx_codeobj__25);
|
|
2973
3050
|
Py_VISIT(traverse_module_state->__pyx_codeobj__26);
|
|
2974
3051
|
Py_VISIT(traverse_module_state->__pyx_codeobj__28);
|
|
2975
|
-
Py_VISIT(traverse_module_state->
|
|
2976
|
-
Py_VISIT(traverse_module_state->
|
|
2977
|
-
Py_VISIT(traverse_module_state->
|
|
3052
|
+
Py_VISIT(traverse_module_state->__pyx_codeobj__31);
|
|
3053
|
+
Py_VISIT(traverse_module_state->__pyx_codeobj__33);
|
|
3054
|
+
Py_VISIT(traverse_module_state->__pyx_codeobj__35);
|
|
3055
|
+
Py_VISIT(traverse_module_state->__pyx_codeobj__37);
|
|
2978
3056
|
return 0;
|
|
2979
3057
|
}
|
|
2980
3058
|
#endif
|
|
@@ -3029,21 +3107,20 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
3029
3107
|
#define __pyx_kp_u_Delaunay_triangulation_and_gener __pyx_mstate_global->__pyx_kp_u_Delaunay_triangulation_and_gener
|
|
3030
3108
|
#define __pyx_kp_u_Delaunay_triangulation_failed __pyx_mstate_global->__pyx_kp_u_Delaunay_triangulation_failed
|
|
3031
3109
|
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
|
|
3110
|
+
#define __pyx_kp_u_None __pyx_mstate_global->__pyx_kp_u_None
|
|
3032
3111
|
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
|
|
3033
|
-
#define
|
|
3034
|
-
#define __pyx_n_u_Qz __pyx_mstate_global->__pyx_n_u_Qz
|
|
3035
|
-
#define __pyx_n_b_Qzc __pyx_mstate_global->__pyx_n_b_Qzc
|
|
3036
|
-
#define __pyx_n_b_Qzv __pyx_mstate_global->__pyx_n_b_Qzv
|
|
3112
|
+
#define __pyx_n_u_Q __pyx_mstate_global->__pyx_n_u_Q
|
|
3037
3113
|
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
|
|
3038
3114
|
#define __pyx_kp_u_Segment_list_must_be_provided_wh __pyx_mstate_global->__pyx_kp_u_Segment_list_must_be_provided_wh
|
|
3039
3115
|
#define __pyx_kp_u_Triangle_list_must_be_provided_w __pyx_mstate_global->__pyx_kp_u_Triangle_list_must_be_provided_w
|
|
3040
3116
|
#define __pyx_kp_u_Triangulation_failed __pyx_mstate_global->__pyx_kp_u_Triangulation_failed
|
|
3117
|
+
#define __pyx_n_u_V __pyx_mstate_global->__pyx_n_u_V
|
|
3041
3118
|
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
|
|
3042
3119
|
#define __pyx_kp_u_When_using_a_flag_for_area_const __pyx_mstate_global->__pyx_kp_u_When_using_a_flag_for_area_const
|
|
3043
3120
|
#define __pyx_kp_u_When_using_q_flag_for_minimum_an __pyx_mstate_global->__pyx_kp_u_When_using_q_flag_for_minimum_an
|
|
3044
3121
|
#define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11
|
|
3045
3122
|
#define __pyx_n_s__12 __pyx_mstate_global->__pyx_n_s__12
|
|
3046
|
-
#define
|
|
3123
|
+
#define __pyx_n_s__38 __pyx_mstate_global->__pyx_n_s__38
|
|
3047
3124
|
#define __pyx_n_u_a __pyx_mstate_global->__pyx_n_u_a
|
|
3048
3125
|
#define __pyx_kp_u_a_d_d __pyx_mstate_global->__pyx_kp_u_a_d_d
|
|
3049
3126
|
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
|
|
@@ -3063,7 +3140,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
3063
3140
|
#define __pyx_n_s_input_dict __pyx_mstate_global->__pyx_n_s_input_dict
|
|
3064
3141
|
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
|
|
3065
3142
|
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
|
|
3066
|
-
#define __pyx_n_s_kind __pyx_mstate_global->__pyx_n_s_kind
|
|
3067
3143
|
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
|
|
3068
3144
|
#define __pyx_n_u_marker __pyx_mstate_global->__pyx_n_u_marker
|
|
3069
3145
|
#define __pyx_n_u_max_area __pyx_mstate_global->__pyx_n_u_max_area
|
|
@@ -3073,7 +3149,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
3073
3149
|
#define __pyx_n_s_opt __pyx_mstate_global->__pyx_n_s_opt
|
|
3074
3150
|
#define __pyx_n_s_opts __pyx_mstate_global->__pyx_n_s_opts
|
|
3075
3151
|
#define __pyx_n_s_out __pyx_mstate_global->__pyx_n_s_out
|
|
3076
|
-
#define __pyx_n_u_out __pyx_mstate_global->__pyx_n_u_out
|
|
3077
3152
|
#define __pyx_n_s_output_dict __pyx_mstate_global->__pyx_n_s_output_dict
|
|
3078
3153
|
#define __pyx_n_u_p __pyx_mstate_global->__pyx_n_u_p
|
|
3079
3154
|
#define __pyx_n_s_parsed_regions __pyx_mstate_global->__pyx_n_s_parsed_regions
|
|
@@ -3114,9 +3189,13 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
3114
3189
|
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
|
|
3115
3190
|
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
|
|
3116
3191
|
#define __pyx_n_s_validate_input_flags __pyx_mstate_global->__pyx_n_s_validate_input_flags
|
|
3192
|
+
#define __pyx_n_s_verbose __pyx_mstate_global->__pyx_n_s_verbose
|
|
3117
3193
|
#define __pyx_n_u_vertex __pyx_mstate_global->__pyx_n_u_vertex
|
|
3118
3194
|
#define __pyx_n_s_voronoi __pyx_mstate_global->__pyx_n_s_voronoi
|
|
3119
3195
|
#define __pyx_n_s_voronoi_dict __pyx_mstate_global->__pyx_n_s_voronoi_dict
|
|
3196
|
+
#define __pyx_n_u_z __pyx_mstate_global->__pyx_n_u_z
|
|
3197
|
+
#define __pyx_n_u_zc __pyx_mstate_global->__pyx_n_u_zc
|
|
3198
|
+
#define __pyx_n_u_zv __pyx_mstate_global->__pyx_n_u_zv
|
|
3120
3199
|
#define __pyx_int_168863793 __pyx_mstate_global->__pyx_int_168863793
|
|
3121
3200
|
#define __pyx_int_213379754 __pyx_mstate_global->__pyx_int_213379754
|
|
3122
3201
|
#define __pyx_int_262531100 __pyx_mstate_global->__pyx_int_262531100
|
|
@@ -3135,25 +3214,28 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
3135
3214
|
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
|
|
3136
3215
|
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
|
|
3137
3216
|
#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
|
|
3217
|
+
#define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
|
|
3138
3218
|
#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
|
|
3139
3219
|
#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
|
|
3140
|
-
#define
|
|
3141
|
-
#define
|
|
3220
|
+
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
|
|
3221
|
+
#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
|
|
3222
|
+
#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
|
|
3223
|
+
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
|
|
3142
3224
|
#define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14
|
|
3143
3225
|
#define __pyx_codeobj__16 __pyx_mstate_global->__pyx_codeobj__16
|
|
3144
3226
|
#define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17
|
|
3145
3227
|
#define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19
|
|
3146
3228
|
#define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
|
|
3147
3229
|
#define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
|
|
3148
|
-
#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
|
|
3149
3230
|
#define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
|
|
3150
3231
|
#define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28
|
|
3151
|
-
#define
|
|
3152
|
-
#define
|
|
3153
|
-
#define
|
|
3232
|
+
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
|
|
3233
|
+
#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
|
|
3234
|
+
#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
|
|
3235
|
+
#define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
|
|
3154
3236
|
/* #### Code section: module_code ### */
|
|
3155
3237
|
|
|
3156
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3238
|
+
/* "cytriangle/cytriangle.pyx":46
|
|
3157
3239
|
* cdef TriangleIO _vorout
|
|
3158
3240
|
*
|
|
3159
3241
|
* def __init__(self, input_dict=None): # <<<<<<<<<<<<<<
|
|
@@ -3197,12 +3279,12 @@ static int __pyx_pw_10cytriangle_10cytriangle_10CyTriangle_1__init__(PyObject *_
|
|
|
3197
3279
|
if (kw_args > 0) {
|
|
3198
3280
|
PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_input_dict);
|
|
3199
3281
|
if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
|
|
3200
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3282
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 46, __pyx_L3_error)
|
|
3201
3283
|
}
|
|
3202
3284
|
}
|
|
3203
3285
|
if (unlikely(kw_args > 0)) {
|
|
3204
3286
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3205
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0,
|
|
3287
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 46, __pyx_L3_error)
|
|
3206
3288
|
}
|
|
3207
3289
|
} else {
|
|
3208
3290
|
switch (__pyx_nargs) {
|
|
@@ -3216,7 +3298,7 @@ static int __pyx_pw_10cytriangle_10cytriangle_10CyTriangle_1__init__(PyObject *_
|
|
|
3216
3298
|
}
|
|
3217
3299
|
goto __pyx_L6_skip;
|
|
3218
3300
|
__pyx_L5_argtuple_error:;
|
|
3219
|
-
__Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0,
|
|
3301
|
+
__Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 46, __pyx_L3_error)
|
|
3220
3302
|
__pyx_L6_skip:;
|
|
3221
3303
|
goto __pyx_L4_argument_unpacking_done;
|
|
3222
3304
|
__pyx_L3_error:;
|
|
@@ -3248,13 +3330,12 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3248
3330
|
__Pyx_RefNannyDeclarations
|
|
3249
3331
|
int __pyx_t_1;
|
|
3250
3332
|
PyObject *__pyx_t_2 = NULL;
|
|
3251
|
-
PyObject *__pyx_t_3 = NULL;
|
|
3252
3333
|
int __pyx_lineno = 0;
|
|
3253
3334
|
const char *__pyx_filename = NULL;
|
|
3254
3335
|
int __pyx_clineno = 0;
|
|
3255
3336
|
__Pyx_RefNannySetupContext("__init__", 1);
|
|
3256
3337
|
|
|
3257
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3338
|
+
/* "cytriangle/cytriangle.pyx":47
|
|
3258
3339
|
*
|
|
3259
3340
|
* def __init__(self, input_dict=None):
|
|
3260
3341
|
* if input_dict is not None: # <<<<<<<<<<<<<<
|
|
@@ -3264,14 +3345,14 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3264
3345
|
__pyx_t_1 = (__pyx_v_input_dict != Py_None);
|
|
3265
3346
|
if (__pyx_t_1) {
|
|
3266
3347
|
|
|
3267
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3348
|
+
/* "cytriangle/cytriangle.pyx":48
|
|
3268
3349
|
* def __init__(self, input_dict=None):
|
|
3269
3350
|
* if input_dict is not None:
|
|
3270
3351
|
* self._in = TriangleIO(input_dict) # <<<<<<<<<<<<<<
|
|
3271
3352
|
* else:
|
|
3272
3353
|
* self._in = TriangleIO()
|
|
3273
3354
|
*/
|
|
3274
|
-
__pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO), __pyx_v_input_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3355
|
+
__pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO), __pyx_v_input_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
|
|
3275
3356
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3276
3357
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
3277
3358
|
__Pyx_GOTREF((PyObject *)__pyx_v_self->_in);
|
|
@@ -3279,7 +3360,7 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3279
3360
|
__pyx_v_self->_in = ((struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO *)__pyx_t_2);
|
|
3280
3361
|
__pyx_t_2 = 0;
|
|
3281
3362
|
|
|
3282
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3363
|
+
/* "cytriangle/cytriangle.pyx":47
|
|
3283
3364
|
*
|
|
3284
3365
|
* def __init__(self, input_dict=None):
|
|
3285
3366
|
* if input_dict is not None: # <<<<<<<<<<<<<<
|
|
@@ -3289,15 +3370,15 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3289
3370
|
goto __pyx_L3;
|
|
3290
3371
|
}
|
|
3291
3372
|
|
|
3292
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3373
|
+
/* "cytriangle/cytriangle.pyx":50
|
|
3293
3374
|
* self._in = TriangleIO(input_dict)
|
|
3294
3375
|
* else:
|
|
3295
3376
|
* self._in = TriangleIO() # <<<<<<<<<<<<<<
|
|
3296
|
-
* self._out = TriangleIO(
|
|
3377
|
+
* self._out = TriangleIO()
|
|
3297
3378
|
* self._vorout = TriangleIO()
|
|
3298
3379
|
*/
|
|
3299
3380
|
/*else*/ {
|
|
3300
|
-
__pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3381
|
+
__pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
|
|
3301
3382
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3302
3383
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
3303
3384
|
__Pyx_GOTREF((PyObject *)__pyx_v_self->_in);
|
|
@@ -3307,41 +3388,37 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3307
3388
|
}
|
|
3308
3389
|
__pyx_L3:;
|
|
3309
3390
|
|
|
3310
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3391
|
+
/* "cytriangle/cytriangle.pyx":51
|
|
3311
3392
|
* else:
|
|
3312
3393
|
* self._in = TriangleIO()
|
|
3313
|
-
* self._out = TriangleIO(
|
|
3394
|
+
* self._out = TriangleIO() # <<<<<<<<<<<<<<
|
|
3314
3395
|
* self._vorout = TriangleIO()
|
|
3315
3396
|
*
|
|
3316
3397
|
*/
|
|
3317
|
-
__pyx_t_2 =
|
|
3398
|
+
__pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
|
|
3318
3399
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3319
|
-
|
|
3320
|
-
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
|
|
3321
|
-
__Pyx_GOTREF(__pyx_t_3);
|
|
3322
|
-
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3323
|
-
__Pyx_GIVEREF(__pyx_t_3);
|
|
3400
|
+
__Pyx_GIVEREF(__pyx_t_2);
|
|
3324
3401
|
__Pyx_GOTREF((PyObject *)__pyx_v_self->_out);
|
|
3325
3402
|
__Pyx_DECREF((PyObject *)__pyx_v_self->_out);
|
|
3326
|
-
__pyx_v_self->_out = ((struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO *)
|
|
3327
|
-
|
|
3403
|
+
__pyx_v_self->_out = ((struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO *)__pyx_t_2);
|
|
3404
|
+
__pyx_t_2 = 0;
|
|
3328
3405
|
|
|
3329
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3406
|
+
/* "cytriangle/cytriangle.pyx":52
|
|
3330
3407
|
* self._in = TriangleIO()
|
|
3331
|
-
* self._out = TriangleIO(
|
|
3408
|
+
* self._out = TriangleIO()
|
|
3332
3409
|
* self._vorout = TriangleIO() # <<<<<<<<<<<<<<
|
|
3333
3410
|
*
|
|
3334
3411
|
* @property
|
|
3335
3412
|
*/
|
|
3336
|
-
|
|
3337
|
-
__Pyx_GOTREF(
|
|
3338
|
-
__Pyx_GIVEREF(
|
|
3413
|
+
__pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cytriangle_12cytriangleio_TriangleIO)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
|
|
3414
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
3415
|
+
__Pyx_GIVEREF(__pyx_t_2);
|
|
3339
3416
|
__Pyx_GOTREF((PyObject *)__pyx_v_self->_vorout);
|
|
3340
3417
|
__Pyx_DECREF((PyObject *)__pyx_v_self->_vorout);
|
|
3341
|
-
__pyx_v_self->_vorout = ((struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO *)
|
|
3342
|
-
|
|
3418
|
+
__pyx_v_self->_vorout = ((struct __pyx_obj_10cytriangle_12cytriangleio_TriangleIO *)__pyx_t_2);
|
|
3419
|
+
__pyx_t_2 = 0;
|
|
3343
3420
|
|
|
3344
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3421
|
+
/* "cytriangle/cytriangle.pyx":46
|
|
3345
3422
|
* cdef TriangleIO _vorout
|
|
3346
3423
|
*
|
|
3347
3424
|
* def __init__(self, input_dict=None): # <<<<<<<<<<<<<<
|
|
@@ -3354,7 +3431,6 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3354
3431
|
goto __pyx_L0;
|
|
3355
3432
|
__pyx_L1_error:;
|
|
3356
3433
|
__Pyx_XDECREF(__pyx_t_2);
|
|
3357
|
-
__Pyx_XDECREF(__pyx_t_3);
|
|
3358
3434
|
__Pyx_AddTraceback("cytriangle.cytriangle.CyTriangle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3359
3435
|
__pyx_r = -1;
|
|
3360
3436
|
__pyx_L0:;
|
|
@@ -3362,7 +3438,7 @@ static int __pyx_pf_10cytriangle_10cytriangle_10CyTriangle___init__(struct __pyx
|
|
|
3362
3438
|
return __pyx_r;
|
|
3363
3439
|
}
|
|
3364
3440
|
|
|
3365
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3441
|
+
/* "cytriangle/cytriangle.pyx":54
|
|
3366
3442
|
* self._vorout = TriangleIO()
|
|
3367
3443
|
*
|
|
3368
3444
|
* @property # <<<<<<<<<<<<<<
|
|
@@ -3390,7 +3466,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3in____get__(st
|
|
|
3390
3466
|
__Pyx_RefNannyDeclarations
|
|
3391
3467
|
__Pyx_RefNannySetupContext("__get__", 1);
|
|
3392
3468
|
|
|
3393
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3469
|
+
/* "cytriangle/cytriangle.pyx":56
|
|
3394
3470
|
* @property
|
|
3395
3471
|
* def in_(self):
|
|
3396
3472
|
* return self._in # <<<<<<<<<<<<<<
|
|
@@ -3402,7 +3478,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3in____get__(st
|
|
|
3402
3478
|
__pyx_r = ((PyObject *)__pyx_v_self->_in);
|
|
3403
3479
|
goto __pyx_L0;
|
|
3404
3480
|
|
|
3405
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3481
|
+
/* "cytriangle/cytriangle.pyx":54
|
|
3406
3482
|
* self._vorout = TriangleIO()
|
|
3407
3483
|
*
|
|
3408
3484
|
* @property # <<<<<<<<<<<<<<
|
|
@@ -3417,7 +3493,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3in____get__(st
|
|
|
3417
3493
|
return __pyx_r;
|
|
3418
3494
|
}
|
|
3419
3495
|
|
|
3420
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3496
|
+
/* "cytriangle/cytriangle.pyx":58
|
|
3421
3497
|
* return self._in
|
|
3422
3498
|
*
|
|
3423
3499
|
* @property # <<<<<<<<<<<<<<
|
|
@@ -3445,7 +3521,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3out___get__(st
|
|
|
3445
3521
|
__Pyx_RefNannyDeclarations
|
|
3446
3522
|
__Pyx_RefNannySetupContext("__get__", 1);
|
|
3447
3523
|
|
|
3448
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3524
|
+
/* "cytriangle/cytriangle.pyx":60
|
|
3449
3525
|
* @property
|
|
3450
3526
|
* def out(self):
|
|
3451
3527
|
* return self._out # <<<<<<<<<<<<<<
|
|
@@ -3457,7 +3533,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3out___get__(st
|
|
|
3457
3533
|
__pyx_r = ((PyObject *)__pyx_v_self->_out);
|
|
3458
3534
|
goto __pyx_L0;
|
|
3459
3535
|
|
|
3460
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3536
|
+
/* "cytriangle/cytriangle.pyx":58
|
|
3461
3537
|
* return self._in
|
|
3462
3538
|
*
|
|
3463
3539
|
* @property # <<<<<<<<<<<<<<
|
|
@@ -3472,7 +3548,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_3out___get__(st
|
|
|
3472
3548
|
return __pyx_r;
|
|
3473
3549
|
}
|
|
3474
3550
|
|
|
3475
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3551
|
+
/* "cytriangle/cytriangle.pyx":62
|
|
3476
3552
|
* return self._out
|
|
3477
3553
|
*
|
|
3478
3554
|
* @property # <<<<<<<<<<<<<<
|
|
@@ -3500,7 +3576,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6vorout___get__
|
|
|
3500
3576
|
__Pyx_RefNannyDeclarations
|
|
3501
3577
|
__Pyx_RefNannySetupContext("__get__", 1);
|
|
3502
3578
|
|
|
3503
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3579
|
+
/* "cytriangle/cytriangle.pyx":64
|
|
3504
3580
|
* @property
|
|
3505
3581
|
* def vorout(self):
|
|
3506
3582
|
* return self._vorout # <<<<<<<<<<<<<<
|
|
@@ -3512,7 +3588,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6vorout___get__
|
|
|
3512
3588
|
__pyx_r = ((PyObject *)__pyx_v_self->_vorout);
|
|
3513
3589
|
goto __pyx_L0;
|
|
3514
3590
|
|
|
3515
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3591
|
+
/* "cytriangle/cytriangle.pyx":62
|
|
3516
3592
|
* return self._out
|
|
3517
3593
|
*
|
|
3518
3594
|
* @property # <<<<<<<<<<<<<<
|
|
@@ -3527,7 +3603,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6vorout___get__
|
|
|
3527
3603
|
return __pyx_r;
|
|
3528
3604
|
}
|
|
3529
3605
|
|
|
3530
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3606
|
+
/* "cytriangle/cytriangle.pyx":66
|
|
3531
3607
|
* return self._vorout
|
|
3532
3608
|
*
|
|
3533
3609
|
* def input_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
@@ -3588,12 +3664,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3588
3664
|
if (kw_args > 0) {
|
|
3589
3665
|
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_opt);
|
|
3590
3666
|
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
3591
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3667
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L3_error)
|
|
3592
3668
|
}
|
|
3593
3669
|
}
|
|
3594
3670
|
if (unlikely(kw_args > 0)) {
|
|
3595
3671
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3596
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "input_dict") < 0)) __PYX_ERR(0,
|
|
3672
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "input_dict") < 0)) __PYX_ERR(0, 66, __pyx_L3_error)
|
|
3597
3673
|
}
|
|
3598
3674
|
} else {
|
|
3599
3675
|
switch (__pyx_nargs) {
|
|
@@ -3607,7 +3683,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3607
3683
|
}
|
|
3608
3684
|
goto __pyx_L6_skip;
|
|
3609
3685
|
__pyx_L5_argtuple_error:;
|
|
3610
|
-
__Pyx_RaiseArgtupleInvalid("input_dict", 0, 0, 1, __pyx_nargs); __PYX_ERR(0,
|
|
3686
|
+
__Pyx_RaiseArgtupleInvalid("input_dict", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 66, __pyx_L3_error)
|
|
3611
3687
|
__pyx_L6_skip:;
|
|
3612
3688
|
goto __pyx_L4_argument_unpacking_done;
|
|
3613
3689
|
__pyx_L3_error:;
|
|
@@ -3646,7 +3722,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_2input_dict(str
|
|
|
3646
3722
|
int __pyx_clineno = 0;
|
|
3647
3723
|
__Pyx_RefNannySetupContext("input_dict", 1);
|
|
3648
3724
|
|
|
3649
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3725
|
+
/* "cytriangle/cytriangle.pyx":67
|
|
3650
3726
|
*
|
|
3651
3727
|
* def input_dict(self, opt=''):
|
|
3652
3728
|
* return self._in.to_dict(opt) # <<<<<<<<<<<<<<
|
|
@@ -3654,7 +3730,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_2input_dict(str
|
|
|
3654
3730
|
* def output_dict(self, opt=''):
|
|
3655
3731
|
*/
|
|
3656
3732
|
__Pyx_XDECREF(__pyx_r);
|
|
3657
|
-
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3733
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error)
|
|
3658
3734
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3659
3735
|
__pyx_t_3 = NULL;
|
|
3660
3736
|
__pyx_t_4 = 0;
|
|
@@ -3674,7 +3750,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_2input_dict(str
|
|
|
3674
3750
|
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_opt};
|
|
3675
3751
|
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
3676
3752
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3677
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
3753
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error)
|
|
3678
3754
|
__Pyx_GOTREF(__pyx_t_1);
|
|
3679
3755
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3680
3756
|
}
|
|
@@ -3682,7 +3758,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_2input_dict(str
|
|
|
3682
3758
|
__pyx_t_1 = 0;
|
|
3683
3759
|
goto __pyx_L0;
|
|
3684
3760
|
|
|
3685
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3761
|
+
/* "cytriangle/cytriangle.pyx":66
|
|
3686
3762
|
* return self._vorout
|
|
3687
3763
|
*
|
|
3688
3764
|
* def input_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
@@ -3703,7 +3779,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_2input_dict(str
|
|
|
3703
3779
|
return __pyx_r;
|
|
3704
3780
|
}
|
|
3705
3781
|
|
|
3706
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3782
|
+
/* "cytriangle/cytriangle.pyx":69
|
|
3707
3783
|
* return self._in.to_dict(opt)
|
|
3708
3784
|
*
|
|
3709
3785
|
* def output_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
@@ -3764,12 +3840,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3764
3840
|
if (kw_args > 0) {
|
|
3765
3841
|
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_opt);
|
|
3766
3842
|
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
3767
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3843
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error)
|
|
3768
3844
|
}
|
|
3769
3845
|
}
|
|
3770
3846
|
if (unlikely(kw_args > 0)) {
|
|
3771
3847
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3772
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "output_dict") < 0)) __PYX_ERR(0,
|
|
3848
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "output_dict") < 0)) __PYX_ERR(0, 69, __pyx_L3_error)
|
|
3773
3849
|
}
|
|
3774
3850
|
} else {
|
|
3775
3851
|
switch (__pyx_nargs) {
|
|
@@ -3783,7 +3859,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3783
3859
|
}
|
|
3784
3860
|
goto __pyx_L6_skip;
|
|
3785
3861
|
__pyx_L5_argtuple_error:;
|
|
3786
|
-
__Pyx_RaiseArgtupleInvalid("output_dict", 0, 0, 1, __pyx_nargs); __PYX_ERR(0,
|
|
3862
|
+
__Pyx_RaiseArgtupleInvalid("output_dict", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error)
|
|
3787
3863
|
__pyx_L6_skip:;
|
|
3788
3864
|
goto __pyx_L4_argument_unpacking_done;
|
|
3789
3865
|
__pyx_L3_error:;
|
|
@@ -3822,7 +3898,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_4output_dict(st
|
|
|
3822
3898
|
int __pyx_clineno = 0;
|
|
3823
3899
|
__Pyx_RefNannySetupContext("output_dict", 1);
|
|
3824
3900
|
|
|
3825
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3901
|
+
/* "cytriangle/cytriangle.pyx":70
|
|
3826
3902
|
*
|
|
3827
3903
|
* def output_dict(self, opt=''):
|
|
3828
3904
|
* return self._out.to_dict(opt) # <<<<<<<<<<<<<<
|
|
@@ -3830,7 +3906,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_4output_dict(st
|
|
|
3830
3906
|
* def voronoi_dict(self, opt=''):
|
|
3831
3907
|
*/
|
|
3832
3908
|
__Pyx_XDECREF(__pyx_r);
|
|
3833
|
-
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_out), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3909
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_out), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
|
|
3834
3910
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3835
3911
|
__pyx_t_3 = NULL;
|
|
3836
3912
|
__pyx_t_4 = 0;
|
|
@@ -3850,7 +3926,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_4output_dict(st
|
|
|
3850
3926
|
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_opt};
|
|
3851
3927
|
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
3852
3928
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3853
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
3929
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
|
|
3854
3930
|
__Pyx_GOTREF(__pyx_t_1);
|
|
3855
3931
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3856
3932
|
}
|
|
@@ -3858,7 +3934,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_4output_dict(st
|
|
|
3858
3934
|
__pyx_t_1 = 0;
|
|
3859
3935
|
goto __pyx_L0;
|
|
3860
3936
|
|
|
3861
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3937
|
+
/* "cytriangle/cytriangle.pyx":69
|
|
3862
3938
|
* return self._in.to_dict(opt)
|
|
3863
3939
|
*
|
|
3864
3940
|
* def output_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
@@ -3879,7 +3955,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_4output_dict(st
|
|
|
3879
3955
|
return __pyx_r;
|
|
3880
3956
|
}
|
|
3881
3957
|
|
|
3882
|
-
/* "cytriangle/cytriangle.pyx":
|
|
3958
|
+
/* "cytriangle/cytriangle.pyx":72
|
|
3883
3959
|
* return self._out.to_dict(opt)
|
|
3884
3960
|
*
|
|
3885
3961
|
* def voronoi_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
@@ -3940,12 +4016,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3940
4016
|
if (kw_args > 0) {
|
|
3941
4017
|
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_opt);
|
|
3942
4018
|
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
3943
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4019
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L3_error)
|
|
3944
4020
|
}
|
|
3945
4021
|
}
|
|
3946
4022
|
if (unlikely(kw_args > 0)) {
|
|
3947
4023
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3948
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "voronoi_dict") < 0)) __PYX_ERR(0,
|
|
4024
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "voronoi_dict") < 0)) __PYX_ERR(0, 72, __pyx_L3_error)
|
|
3949
4025
|
}
|
|
3950
4026
|
} else {
|
|
3951
4027
|
switch (__pyx_nargs) {
|
|
@@ -3959,7 +4035,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3959
4035
|
}
|
|
3960
4036
|
goto __pyx_L6_skip;
|
|
3961
4037
|
__pyx_L5_argtuple_error:;
|
|
3962
|
-
__Pyx_RaiseArgtupleInvalid("voronoi_dict", 0, 0, 1, __pyx_nargs); __PYX_ERR(0,
|
|
4038
|
+
__Pyx_RaiseArgtupleInvalid("voronoi_dict", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 72, __pyx_L3_error)
|
|
3963
4039
|
__pyx_L6_skip:;
|
|
3964
4040
|
goto __pyx_L4_argument_unpacking_done;
|
|
3965
4041
|
__pyx_L3_error:;
|
|
@@ -3998,7 +4074,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6voronoi_dict(s
|
|
|
3998
4074
|
int __pyx_clineno = 0;
|
|
3999
4075
|
__Pyx_RefNannySetupContext("voronoi_dict", 1);
|
|
4000
4076
|
|
|
4001
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4077
|
+
/* "cytriangle/cytriangle.pyx":73
|
|
4002
4078
|
*
|
|
4003
4079
|
* def voronoi_dict(self, opt=''):
|
|
4004
4080
|
* return self._vorout.to_dict(opt) # <<<<<<<<<<<<<<
|
|
@@ -4006,7 +4082,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6voronoi_dict(s
|
|
|
4006
4082
|
* def validate_input_flags(self, opts):
|
|
4007
4083
|
*/
|
|
4008
4084
|
__Pyx_XDECREF(__pyx_r);
|
|
4009
|
-
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_vorout), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4085
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_vorout), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
|
|
4010
4086
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4011
4087
|
__pyx_t_3 = NULL;
|
|
4012
4088
|
__pyx_t_4 = 0;
|
|
@@ -4026,7 +4102,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6voronoi_dict(s
|
|
|
4026
4102
|
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_opt};
|
|
4027
4103
|
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
|
|
4028
4104
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4029
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4105
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
|
|
4030
4106
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4031
4107
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4032
4108
|
}
|
|
@@ -4034,7 +4110,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6voronoi_dict(s
|
|
|
4034
4110
|
__pyx_t_1 = 0;
|
|
4035
4111
|
goto __pyx_L0;
|
|
4036
4112
|
|
|
4037
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4113
|
+
/* "cytriangle/cytriangle.pyx":72
|
|
4038
4114
|
* return self._out.to_dict(opt)
|
|
4039
4115
|
*
|
|
4040
4116
|
* def voronoi_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
@@ -4055,12 +4131,12 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_6voronoi_dict(s
|
|
|
4055
4131
|
return __pyx_r;
|
|
4056
4132
|
}
|
|
4057
4133
|
|
|
4058
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4134
|
+
/* "cytriangle/cytriangle.pyx":75
|
|
4059
4135
|
* return self._vorout.to_dict(opt)
|
|
4060
4136
|
*
|
|
4061
4137
|
* def validate_input_flags(self, opts): # <<<<<<<<<<<<<<
|
|
4062
4138
|
* if "r" in opts:
|
|
4063
|
-
* if
|
|
4139
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4064
4140
|
*/
|
|
4065
4141
|
|
|
4066
4142
|
/* Python wrapper */
|
|
@@ -4116,12 +4192,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4116
4192
|
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
|
|
4117
4193
|
kw_args--;
|
|
4118
4194
|
}
|
|
4119
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4195
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L3_error)
|
|
4120
4196
|
else goto __pyx_L5_argtuple_error;
|
|
4121
4197
|
}
|
|
4122
4198
|
if (unlikely(kw_args > 0)) {
|
|
4123
4199
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
4124
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "validate_input_flags") < 0)) __PYX_ERR(0,
|
|
4200
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "validate_input_flags") < 0)) __PYX_ERR(0, 75, __pyx_L3_error)
|
|
4125
4201
|
}
|
|
4126
4202
|
} else if (unlikely(__pyx_nargs != 1)) {
|
|
4127
4203
|
goto __pyx_L5_argtuple_error;
|
|
@@ -4132,7 +4208,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4132
4208
|
}
|
|
4133
4209
|
goto __pyx_L6_skip;
|
|
4134
4210
|
__pyx_L5_argtuple_error:;
|
|
4135
|
-
__Pyx_RaiseArgtupleInvalid("validate_input_flags", 1, 1, 1, __pyx_nargs); __PYX_ERR(0,
|
|
4211
|
+
__Pyx_RaiseArgtupleInvalid("validate_input_flags", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 75, __pyx_L3_error)
|
|
4136
4212
|
__pyx_L6_skip:;
|
|
4137
4213
|
goto __pyx_L4_argument_unpacking_done;
|
|
4138
4214
|
__pyx_L3_error:;
|
|
@@ -4173,24 +4249,24 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4173
4249
|
int __pyx_clineno = 0;
|
|
4174
4250
|
__Pyx_RefNannySetupContext("validate_input_flags", 1);
|
|
4175
4251
|
|
|
4176
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4252
|
+
/* "cytriangle/cytriangle.pyx":76
|
|
4177
4253
|
*
|
|
4178
4254
|
* def validate_input_flags(self, opts):
|
|
4179
4255
|
* if "r" in opts: # <<<<<<<<<<<<<<
|
|
4180
|
-
* if
|
|
4256
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4181
4257
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4182
4258
|
*/
|
|
4183
|
-
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_r, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
4259
|
+
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_r, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 76, __pyx_L1_error)
|
|
4184
4260
|
if (__pyx_t_1) {
|
|
4185
4261
|
|
|
4186
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4262
|
+
/* "cytriangle/cytriangle.pyx":77
|
|
4187
4263
|
* def validate_input_flags(self, opts):
|
|
4188
4264
|
* if "r" in opts:
|
|
4189
|
-
* if
|
|
4265
|
+
* if 'triangles' not in self._in.to_dict(): # <<<<<<<<<<<<<<
|
|
4190
4266
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4191
4267
|
* if "p" in opts:
|
|
4192
4268
|
*/
|
|
4193
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4269
|
+
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
|
|
4194
4270
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4195
4271
|
__pyx_t_4 = NULL;
|
|
4196
4272
|
__pyx_t_5 = 0;
|
|
@@ -4210,63 +4286,63 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4210
4286
|
PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
|
|
4211
4287
|
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
|
|
4212
4288
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4213
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4289
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
|
|
4214
4290
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4215
4291
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4216
4292
|
}
|
|
4217
|
-
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_triangles, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
4293
|
+
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_triangles, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 77, __pyx_L1_error)
|
|
4218
4294
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4219
4295
|
if (unlikely(__pyx_t_1)) {
|
|
4220
4296
|
|
|
4221
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4297
|
+
/* "cytriangle/cytriangle.pyx":78
|
|
4222
4298
|
* if "r" in opts:
|
|
4223
|
-
* if
|
|
4299
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4224
4300
|
* raise ValueError("Triangle list must be provided when using 'r' flag") # <<<<<<<<<<<<<<
|
|
4225
4301
|
* if "p" in opts:
|
|
4226
|
-
* if
|
|
4302
|
+
* if 'segments' not in self._in.to_dict():
|
|
4227
4303
|
*/
|
|
4228
|
-
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4304
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
|
|
4229
4305
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4230
4306
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
4231
4307
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4232
|
-
__PYX_ERR(0,
|
|
4308
|
+
__PYX_ERR(0, 78, __pyx_L1_error)
|
|
4233
4309
|
|
|
4234
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4310
|
+
/* "cytriangle/cytriangle.pyx":77
|
|
4235
4311
|
* def validate_input_flags(self, opts):
|
|
4236
4312
|
* if "r" in opts:
|
|
4237
|
-
* if
|
|
4313
|
+
* if 'triangles' not in self._in.to_dict(): # <<<<<<<<<<<<<<
|
|
4238
4314
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4239
4315
|
* if "p" in opts:
|
|
4240
4316
|
*/
|
|
4241
4317
|
}
|
|
4242
4318
|
|
|
4243
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4319
|
+
/* "cytriangle/cytriangle.pyx":76
|
|
4244
4320
|
*
|
|
4245
4321
|
* def validate_input_flags(self, opts):
|
|
4246
4322
|
* if "r" in opts: # <<<<<<<<<<<<<<
|
|
4247
|
-
* if
|
|
4323
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4248
4324
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4249
4325
|
*/
|
|
4250
4326
|
}
|
|
4251
4327
|
|
|
4252
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4253
|
-
* if
|
|
4328
|
+
/* "cytriangle/cytriangle.pyx":79
|
|
4329
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4254
4330
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4255
4331
|
* if "p" in opts: # <<<<<<<<<<<<<<
|
|
4256
|
-
* if
|
|
4332
|
+
* if 'segments' not in self._in.to_dict():
|
|
4257
4333
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4258
4334
|
*/
|
|
4259
|
-
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_p, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
4335
|
+
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_p, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 79, __pyx_L1_error)
|
|
4260
4336
|
if (__pyx_t_1) {
|
|
4261
4337
|
|
|
4262
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4338
|
+
/* "cytriangle/cytriangle.pyx":80
|
|
4263
4339
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4264
4340
|
* if "p" in opts:
|
|
4265
|
-
* if
|
|
4341
|
+
* if 'segments' not in self._in.to_dict(): # <<<<<<<<<<<<<<
|
|
4266
4342
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4267
4343
|
* if "a" in opts:
|
|
4268
4344
|
*/
|
|
4269
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4345
|
+
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
|
|
4270
4346
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4271
4347
|
__pyx_t_4 = NULL;
|
|
4272
4348
|
__pyx_t_5 = 0;
|
|
@@ -4286,63 +4362,63 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4286
4362
|
PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
|
|
4287
4363
|
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
|
|
4288
4364
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4289
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4365
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
|
|
4290
4366
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4291
4367
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4292
4368
|
}
|
|
4293
|
-
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_segments, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
4369
|
+
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_segments, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 80, __pyx_L1_error)
|
|
4294
4370
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4295
4371
|
if (unlikely(__pyx_t_1)) {
|
|
4296
4372
|
|
|
4297
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4373
|
+
/* "cytriangle/cytriangle.pyx":81
|
|
4298
4374
|
* if "p" in opts:
|
|
4299
|
-
* if
|
|
4375
|
+
* if 'segments' not in self._in.to_dict():
|
|
4300
4376
|
* raise ValueError("Segment list must be provided when using 'p' flag") # <<<<<<<<<<<<<<
|
|
4301
4377
|
* if "a" in opts:
|
|
4302
4378
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
4303
4379
|
*/
|
|
4304
|
-
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4380
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
|
|
4305
4381
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4306
4382
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
4307
4383
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4308
|
-
__PYX_ERR(0,
|
|
4384
|
+
__PYX_ERR(0, 81, __pyx_L1_error)
|
|
4309
4385
|
|
|
4310
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4386
|
+
/* "cytriangle/cytriangle.pyx":80
|
|
4311
4387
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4312
4388
|
* if "p" in opts:
|
|
4313
|
-
* if
|
|
4389
|
+
* if 'segments' not in self._in.to_dict(): # <<<<<<<<<<<<<<
|
|
4314
4390
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4315
4391
|
* if "a" in opts:
|
|
4316
4392
|
*/
|
|
4317
4393
|
}
|
|
4318
4394
|
|
|
4319
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4320
|
-
* if
|
|
4395
|
+
/* "cytriangle/cytriangle.pyx":79
|
|
4396
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4321
4397
|
* raise ValueError("Triangle list must be provided when using 'r' flag")
|
|
4322
4398
|
* if "p" in opts: # <<<<<<<<<<<<<<
|
|
4323
|
-
* if
|
|
4399
|
+
* if 'segments' not in self._in.to_dict():
|
|
4324
4400
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4325
4401
|
*/
|
|
4326
4402
|
}
|
|
4327
4403
|
|
|
4328
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4329
|
-
* if
|
|
4404
|
+
/* "cytriangle/cytriangle.pyx":82
|
|
4405
|
+
* if 'segments' not in self._in.to_dict():
|
|
4330
4406
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4331
4407
|
* if "a" in opts: # <<<<<<<<<<<<<<
|
|
4332
4408
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
4333
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
4409
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
4334
4410
|
*/
|
|
4335
|
-
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_a, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
4411
|
+
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_a, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 82, __pyx_L1_error)
|
|
4336
4412
|
if (__pyx_t_1) {
|
|
4337
4413
|
|
|
4338
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4414
|
+
/* "cytriangle/cytriangle.pyx":83
|
|
4339
4415
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4340
4416
|
* if "a" in opts:
|
|
4341
4417
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A' # <<<<<<<<<<<<<<
|
|
4342
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
4343
|
-
* raise ValueError(
|
|
4418
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
4419
|
+
* raise ValueError("""When using 'a' flag for area constraints, a global
|
|
4344
4420
|
*/
|
|
4345
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4421
|
+
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_in), __pyx_n_s_to_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
|
|
4346
4422
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4347
4423
|
__pyx_t_4 = NULL;
|
|
4348
4424
|
__pyx_t_5 = 0;
|
|
@@ -4362,11 +4438,11 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4362
4438
|
PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
|
|
4363
4439
|
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
|
|
4364
4440
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4365
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4441
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
|
|
4366
4442
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4367
4443
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4368
4444
|
}
|
|
4369
|
-
__pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_triangle_max_area, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0,
|
|
4445
|
+
__pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_triangle_max_area, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 83, __pyx_L1_error)
|
|
4370
4446
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4371
4447
|
if (!__pyx_t_6) {
|
|
4372
4448
|
} else {
|
|
@@ -4374,22 +4450,22 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4374
4450
|
goto __pyx_L9_bool_binop_done;
|
|
4375
4451
|
}
|
|
4376
4452
|
|
|
4377
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4453
|
+
/* "cytriangle/cytriangle.pyx":84
|
|
4378
4454
|
* if "a" in opts:
|
|
4379
4455
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
4380
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))): # <<<<<<<<<<<<<<
|
|
4381
|
-
* raise ValueError(
|
|
4456
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))): # <<<<<<<<<<<<<<
|
|
4457
|
+
* raise ValueError("""When using 'a' flag for area constraints, a global
|
|
4382
4458
|
* area flag (e.g. a0.2), 'A' flag, or local triangle area
|
|
4383
4459
|
*/
|
|
4384
|
-
__pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_A, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0,
|
|
4460
|
+
__pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_A, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 84, __pyx_L1_error)
|
|
4385
4461
|
if (!__pyx_t_6) {
|
|
4386
4462
|
} else {
|
|
4387
4463
|
__pyx_t_1 = __pyx_t_6;
|
|
4388
4464
|
goto __pyx_L9_bool_binop_done;
|
|
4389
4465
|
}
|
|
4390
|
-
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4466
|
+
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
|
|
4391
4467
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4392
|
-
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_search); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4468
|
+
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_search); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error)
|
|
4393
4469
|
__Pyx_GOTREF(__pyx_t_4);
|
|
4394
4470
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4395
4471
|
__pyx_t_3 = NULL;
|
|
@@ -4410,76 +4486,76 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4410
4486
|
PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_kp_u_a_d_d, __pyx_v_opts};
|
|
4411
4487
|
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
|
|
4412
4488
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4413
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4489
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
|
|
4414
4490
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4415
4491
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4416
4492
|
}
|
|
4417
|
-
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0,
|
|
4493
|
+
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 84, __pyx_L1_error)
|
|
4418
4494
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4419
4495
|
__pyx_t_1 = (!(!__pyx_t_6));
|
|
4420
4496
|
__pyx_L9_bool_binop_done:;
|
|
4421
4497
|
|
|
4422
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4498
|
+
/* "cytriangle/cytriangle.pyx":83
|
|
4423
4499
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4424
4500
|
* if "a" in opts:
|
|
4425
4501
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A' # <<<<<<<<<<<<<<
|
|
4426
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
4427
|
-
* raise ValueError(
|
|
4502
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
4503
|
+
* raise ValueError("""When using 'a' flag for area constraints, a global
|
|
4428
4504
|
*/
|
|
4429
4505
|
__pyx_t_6 = (!__pyx_t_1);
|
|
4430
4506
|
if (unlikely(__pyx_t_6)) {
|
|
4431
4507
|
|
|
4432
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4508
|
+
/* "cytriangle/cytriangle.pyx":85
|
|
4433
4509
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
4434
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
4435
|
-
* raise ValueError(
|
|
4510
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
4511
|
+
* raise ValueError("""When using 'a' flag for area constraints, a global # <<<<<<<<<<<<<<
|
|
4436
4512
|
* area flag (e.g. a0.2), 'A' flag, or local triangle area
|
|
4437
4513
|
* constraint list (e.g. [3.0, 1.0]) must be provided""")
|
|
4438
4514
|
*/
|
|
4439
|
-
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4515
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
|
|
4440
4516
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4441
4517
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
4442
4518
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4443
|
-
__PYX_ERR(0,
|
|
4519
|
+
__PYX_ERR(0, 85, __pyx_L1_error)
|
|
4444
4520
|
|
|
4445
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4521
|
+
/* "cytriangle/cytriangle.pyx":83
|
|
4446
4522
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4447
4523
|
* if "a" in opts:
|
|
4448
4524
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A' # <<<<<<<<<<<<<<
|
|
4449
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
4450
|
-
* raise ValueError(
|
|
4525
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
4526
|
+
* raise ValueError("""When using 'a' flag for area constraints, a global
|
|
4451
4527
|
*/
|
|
4452
4528
|
}
|
|
4453
4529
|
|
|
4454
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4455
|
-
* if
|
|
4530
|
+
/* "cytriangle/cytriangle.pyx":82
|
|
4531
|
+
* if 'segments' not in self._in.to_dict():
|
|
4456
4532
|
* raise ValueError("Segment list must be provided when using 'p' flag")
|
|
4457
4533
|
* if "a" in opts: # <<<<<<<<<<<<<<
|
|
4458
4534
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
4459
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
4535
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
4460
4536
|
*/
|
|
4461
4537
|
}
|
|
4462
4538
|
|
|
4463
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4539
|
+
/* "cytriangle/cytriangle.pyx":88
|
|
4464
4540
|
* area flag (e.g. a0.2), 'A' flag, or local triangle area
|
|
4465
4541
|
* constraint list (e.g. [3.0, 1.0]) must be provided""")
|
|
4466
4542
|
* if "q" in opts: # <<<<<<<<<<<<<<
|
|
4467
|
-
* if not bool(re.search('q[\d.*.]+\d.*', opts)):
|
|
4468
|
-
* raise ValueError("When using 'q' flag for minimum angles, an angle
|
|
4543
|
+
* if not bool(re.search(r'q[\d.*.]+\d.*', opts)):
|
|
4544
|
+
* raise ValueError("""When using 'q' flag for minimum angles, an angle
|
|
4469
4545
|
*/
|
|
4470
|
-
__pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_q, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0,
|
|
4546
|
+
__pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_q, __pyx_v_opts, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
4471
4547
|
if (__pyx_t_6) {
|
|
4472
4548
|
|
|
4473
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4549
|
+
/* "cytriangle/cytriangle.pyx":89
|
|
4474
4550
|
* constraint list (e.g. [3.0, 1.0]) must be provided""")
|
|
4475
4551
|
* if "q" in opts:
|
|
4476
|
-
* if not bool(re.search('q[\d.*.]+\d.*', opts)): # <<<<<<<<<<<<<<
|
|
4477
|
-
* raise ValueError("When using 'q' flag for minimum angles, an angle
|
|
4478
|
-
*
|
|
4552
|
+
* if not bool(re.search(r'q[\d.*.]+\d.*', opts)): # <<<<<<<<<<<<<<
|
|
4553
|
+
* raise ValueError("""When using 'q' flag for minimum angles, an angle
|
|
4554
|
+
* must be provided""")
|
|
4479
4555
|
*/
|
|
4480
|
-
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4556
|
+
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
4481
4557
|
__Pyx_GOTREF(__pyx_t_4);
|
|
4482
|
-
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4558
|
+
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
4483
4559
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4484
4560
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4485
4561
|
__pyx_t_4 = NULL;
|
|
@@ -4500,52 +4576,52 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4500
4576
|
PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_kp_u_q_d_d, __pyx_v_opts};
|
|
4501
4577
|
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
|
|
4502
4578
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4503
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4579
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
4504
4580
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4505
4581
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4506
4582
|
}
|
|
4507
|
-
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0,
|
|
4583
|
+
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
4508
4584
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4509
4585
|
__pyx_t_1 = (!(!(!__pyx_t_6)));
|
|
4510
4586
|
if (unlikely(__pyx_t_1)) {
|
|
4511
4587
|
|
|
4512
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4588
|
+
/* "cytriangle/cytriangle.pyx":90
|
|
4513
4589
|
* if "q" in opts:
|
|
4514
|
-
* if not bool(re.search('q[\d.*.]+\d.*', opts)):
|
|
4515
|
-
* raise ValueError("When using 'q' flag for minimum angles, an angle
|
|
4590
|
+
* if not bool(re.search(r'q[\d.*.]+\d.*', opts)):
|
|
4591
|
+
* raise ValueError("""When using 'q' flag for minimum angles, an angle # <<<<<<<<<<<<<<
|
|
4592
|
+
* must be provided""")
|
|
4516
4593
|
*
|
|
4517
|
-
* # generic triangulation that accepts any switch
|
|
4518
4594
|
*/
|
|
4519
|
-
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4595
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
|
|
4520
4596
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4521
4597
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
4522
4598
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4523
|
-
__PYX_ERR(0,
|
|
4599
|
+
__PYX_ERR(0, 90, __pyx_L1_error)
|
|
4524
4600
|
|
|
4525
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4601
|
+
/* "cytriangle/cytriangle.pyx":89
|
|
4526
4602
|
* constraint list (e.g. [3.0, 1.0]) must be provided""")
|
|
4527
4603
|
* if "q" in opts:
|
|
4528
|
-
* if not bool(re.search('q[\d.*.]+\d.*', opts)): # <<<<<<<<<<<<<<
|
|
4529
|
-
* raise ValueError("When using 'q' flag for minimum angles, an angle
|
|
4530
|
-
*
|
|
4604
|
+
* if not bool(re.search(r'q[\d.*.]+\d.*', opts)): # <<<<<<<<<<<<<<
|
|
4605
|
+
* raise ValueError("""When using 'q' flag for minimum angles, an angle
|
|
4606
|
+
* must be provided""")
|
|
4531
4607
|
*/
|
|
4532
4608
|
}
|
|
4533
4609
|
|
|
4534
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4610
|
+
/* "cytriangle/cytriangle.pyx":88
|
|
4535
4611
|
* area flag (e.g. a0.2), 'A' flag, or local triangle area
|
|
4536
4612
|
* constraint list (e.g. [3.0, 1.0]) must be provided""")
|
|
4537
4613
|
* if "q" in opts: # <<<<<<<<<<<<<<
|
|
4538
|
-
* if not bool(re.search('q[\d.*.]+\d.*', opts)):
|
|
4539
|
-
* raise ValueError("When using 'q' flag for minimum angles, an angle
|
|
4614
|
+
* if not bool(re.search(r'q[\d.*.]+\d.*', opts)):
|
|
4615
|
+
* raise ValueError("""When using 'q' flag for minimum angles, an angle
|
|
4540
4616
|
*/
|
|
4541
4617
|
}
|
|
4542
4618
|
|
|
4543
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4619
|
+
/* "cytriangle/cytriangle.pyx":75
|
|
4544
4620
|
* return self._vorout.to_dict(opt)
|
|
4545
4621
|
*
|
|
4546
4622
|
* def validate_input_flags(self, opts): # <<<<<<<<<<<<<<
|
|
4547
4623
|
* if "r" in opts:
|
|
4548
|
-
* if
|
|
4624
|
+
* if 'triangles' not in self._in.to_dict():
|
|
4549
4625
|
*/
|
|
4550
4626
|
|
|
4551
4627
|
/* function exit code */
|
|
@@ -4566,7 +4642,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_8validate_input
|
|
|
4566
4642
|
/* "cytriangle/cytriangle.pyx":94
|
|
4567
4643
|
*
|
|
4568
4644
|
* # generic triangulation that accepts any switch
|
|
4569
|
-
* cpdef triangulate(self, triflags=''): # <<<<<<<<<<<<<<
|
|
4645
|
+
* cpdef triangulate(self, triflags='', verbose=False): # <<<<<<<<<<<<<<
|
|
4570
4646
|
* """
|
|
4571
4647
|
* Runs the main triangulation method on the in_ object with any additional
|
|
4572
4648
|
*/
|
|
@@ -4580,6 +4656,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4580
4656
|
); /*proto*/
|
|
4581
4657
|
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_triangulate *__pyx_optional_args) {
|
|
4582
4658
|
PyObject *__pyx_v_triflags = ((PyObject *)__pyx_kp_u_);
|
|
4659
|
+
PyObject *__pyx_v_verbose = ((PyObject *)Py_False);
|
|
4583
4660
|
PyObject *__pyx_v_opts = NULL;
|
|
4584
4661
|
PyObject *__pyx_r = NULL;
|
|
4585
4662
|
__Pyx_RefNannyDeclarations
|
|
@@ -4589,7 +4666,10 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(stru
|
|
|
4589
4666
|
PyObject *__pyx_t_4 = NULL;
|
|
4590
4667
|
int __pyx_t_5;
|
|
4591
4668
|
int __pyx_t_6;
|
|
4592
|
-
|
|
4669
|
+
Py_ssize_t __pyx_t_7;
|
|
4670
|
+
Py_UCS4 __pyx_t_8;
|
|
4671
|
+
int __pyx_t_9;
|
|
4672
|
+
char *__pyx_t_10;
|
|
4593
4673
|
int __pyx_lineno = 0;
|
|
4594
4674
|
const char *__pyx_filename = NULL;
|
|
4595
4675
|
int __pyx_clineno = 0;
|
|
@@ -4597,6 +4677,9 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(stru
|
|
|
4597
4677
|
if (__pyx_optional_args) {
|
|
4598
4678
|
if (__pyx_optional_args->__pyx_n > 0) {
|
|
4599
4679
|
__pyx_v_triflags = __pyx_optional_args->triflags;
|
|
4680
|
+
if (__pyx_optional_args->__pyx_n > 1) {
|
|
4681
|
+
__pyx_v_verbose = __pyx_optional_args->verbose;
|
|
4682
|
+
}
|
|
4600
4683
|
}
|
|
4601
4684
|
}
|
|
4602
4685
|
/* Check if called by wrapper */
|
|
@@ -4628,8 +4711,8 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(stru
|
|
|
4628
4711
|
}
|
|
4629
4712
|
#endif
|
|
4630
4713
|
{
|
|
4631
|
-
PyObject *__pyx_callargs[
|
|
4632
|
-
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5,
|
|
4714
|
+
PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_triflags, __pyx_v_verbose};
|
|
4715
|
+
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
|
|
4633
4716
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4634
4717
|
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
|
|
4635
4718
|
__Pyx_GOTREF(__pyx_t_2);
|
|
@@ -4656,13 +4739,21 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(stru
|
|
|
4656
4739
|
/* "cytriangle/cytriangle.pyx":124
|
|
4657
4740
|
*
|
|
4658
4741
|
* """
|
|
4659
|
-
* if triflags:
|
|
4660
|
-
*
|
|
4661
|
-
* if
|
|
4742
|
+
* if triflags: # <<<<<<<<<<<<<<
|
|
4743
|
+
* self.validate_input_flags(triflags)
|
|
4744
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4662
4745
|
*/
|
|
4663
4746
|
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_triflags); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
4664
4747
|
if (__pyx_t_6) {
|
|
4665
|
-
|
|
4748
|
+
|
|
4749
|
+
/* "cytriangle/cytriangle.pyx":125
|
|
4750
|
+
* """
|
|
4751
|
+
* if triflags:
|
|
4752
|
+
* self.validate_input_flags(triflags) # <<<<<<<<<<<<<<
|
|
4753
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4754
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
4755
|
+
*/
|
|
4756
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_validate_input_flags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
|
|
4666
4757
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4667
4758
|
__pyx_t_3 = NULL;
|
|
4668
4759
|
__pyx_t_5 = 0;
|
|
@@ -4682,76 +4773,130 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(stru
|
|
|
4682
4773
|
PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_triflags};
|
|
4683
4774
|
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
4684
4775
|
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4685
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4776
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
|
|
4686
4777
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4687
4778
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4688
4779
|
}
|
|
4689
4780
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
4690
|
-
}
|
|
4691
4781
|
|
|
4692
|
-
|
|
4782
|
+
/* "cytriangle/cytriangle.pyx":124
|
|
4783
|
+
*
|
|
4693
4784
|
* """
|
|
4694
|
-
* if triflags:
|
|
4695
|
-
*
|
|
4696
|
-
* if
|
|
4697
|
-
* raise RuntimeError('Triangulation failed')
|
|
4785
|
+
* if triflags: # <<<<<<<<<<<<<<
|
|
4786
|
+
* self.validate_input_flags(triflags)
|
|
4787
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4698
4788
|
*/
|
|
4699
|
-
|
|
4789
|
+
}
|
|
4790
|
+
|
|
4791
|
+
/* "cytriangle/cytriangle.pyx":126
|
|
4792
|
+
* if triflags:
|
|
4793
|
+
* self.validate_input_flags(triflags)
|
|
4794
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8') # <<<<<<<<<<<<<<
|
|
4795
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
4796
|
+
* is not None:
|
|
4797
|
+
*/
|
|
4798
|
+
__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
4700
4799
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4701
|
-
|
|
4702
|
-
|
|
4800
|
+
__pyx_t_7 = 0;
|
|
4801
|
+
__pyx_t_8 = 127;
|
|
4802
|
+
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
4803
|
+
__pyx_t_9 = (!__pyx_t_6);
|
|
4804
|
+
if (__pyx_t_9) {
|
|
4805
|
+
__Pyx_INCREF(__pyx_n_u_Q);
|
|
4806
|
+
__pyx_t_2 = __pyx_n_u_Q;
|
|
4807
|
+
} else {
|
|
4808
|
+
__Pyx_INCREF(__pyx_n_u_V);
|
|
4809
|
+
__pyx_t_2 = __pyx_n_u_V;
|
|
4810
|
+
}
|
|
4811
|
+
__pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
4812
|
+
__Pyx_GOTREF(__pyx_t_3);
|
|
4813
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4814
|
+
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
|
|
4815
|
+
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
|
|
4816
|
+
__Pyx_GIVEREF(__pyx_t_3);
|
|
4817
|
+
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
|
|
4818
|
+
__pyx_t_3 = 0;
|
|
4819
|
+
__Pyx_INCREF(__pyx_n_u_z);
|
|
4820
|
+
__pyx_t_7 += 1;
|
|
4821
|
+
__Pyx_GIVEREF(__pyx_n_u_z);
|
|
4822
|
+
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_z);
|
|
4823
|
+
__pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_triflags, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
4824
|
+
__Pyx_GOTREF(__pyx_t_3);
|
|
4825
|
+
__pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
|
|
4826
|
+
__pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
|
|
4827
|
+
__Pyx_GIVEREF(__pyx_t_3);
|
|
4828
|
+
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_3);
|
|
4829
|
+
__pyx_t_3 = 0;
|
|
4830
|
+
__pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
4831
|
+
__Pyx_GOTREF(__pyx_t_3);
|
|
4703
4832
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
4704
|
-
__pyx_t_1 = PyUnicode_AsUTF8String(((PyObject*)
|
|
4833
|
+
__pyx_t_1 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
4705
4834
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4706
|
-
__Pyx_DECREF(
|
|
4835
|
+
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4707
4836
|
__pyx_v_opts = __pyx_t_1;
|
|
4708
4837
|
__pyx_t_1 = 0;
|
|
4709
4838
|
|
|
4710
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4711
|
-
*
|
|
4712
|
-
* opts = f"
|
|
4713
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
4839
|
+
/* "cytriangle/cytriangle.pyx":127
|
|
4840
|
+
* self.validate_input_flags(triflags)
|
|
4841
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4842
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
4843
|
+
* is not None:
|
|
4714
4844
|
* raise RuntimeError('Triangulation failed')
|
|
4715
|
-
* return self.out
|
|
4716
4845
|
*/
|
|
4717
|
-
|
|
4718
|
-
__pyx_t_1 = __Pyx_void_to_None(triangulate(
|
|
4846
|
+
__pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_opts); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
4847
|
+
__pyx_t_1 = __Pyx_void_to_None(triangulate(__pyx_t_10, __pyx_v_self->_in->_io, __pyx_v_self->_out->_io, __pyx_v_self->_vorout->_io)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
4719
4848
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4720
|
-
|
|
4849
|
+
|
|
4850
|
+
/* "cytriangle/cytriangle.pyx":128
|
|
4851
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4852
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
4853
|
+
* is not None: # <<<<<<<<<<<<<<
|
|
4854
|
+
* raise RuntimeError('Triangulation failed')
|
|
4855
|
+
* return self.out
|
|
4856
|
+
*/
|
|
4857
|
+
__pyx_t_9 = (__pyx_t_1 != Py_None);
|
|
4721
4858
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
4722
|
-
if (unlikely(__pyx_t_6)) {
|
|
4723
4859
|
|
|
4724
|
-
|
|
4725
|
-
*
|
|
4726
|
-
* if
|
|
4860
|
+
/* "cytriangle/cytriangle.pyx":127
|
|
4861
|
+
* self.validate_input_flags(triflags)
|
|
4862
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4863
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
4864
|
+
* is not None:
|
|
4865
|
+
* raise RuntimeError('Triangulation failed')
|
|
4866
|
+
*/
|
|
4867
|
+
if (unlikely(__pyx_t_9)) {
|
|
4868
|
+
|
|
4869
|
+
/* "cytriangle/cytriangle.pyx":129
|
|
4870
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
4871
|
+
* is not None:
|
|
4727
4872
|
* raise RuntimeError('Triangulation failed') # <<<<<<<<<<<<<<
|
|
4728
4873
|
* return self.out
|
|
4729
4874
|
*
|
|
4730
4875
|
*/
|
|
4731
|
-
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4876
|
+
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
|
|
4732
4877
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4733
4878
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
4734
4879
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
4735
|
-
__PYX_ERR(0,
|
|
4880
|
+
__PYX_ERR(0, 129, __pyx_L1_error)
|
|
4736
4881
|
|
|
4737
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4738
|
-
*
|
|
4739
|
-
* opts = f"
|
|
4740
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
4882
|
+
/* "cytriangle/cytriangle.pyx":127
|
|
4883
|
+
* self.validate_input_flags(triflags)
|
|
4884
|
+
* opts = f"{'Q' if not verbose else 'V'}z{triflags}".encode('utf-8')
|
|
4885
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
4886
|
+
* is not None:
|
|
4741
4887
|
* raise RuntimeError('Triangulation failed')
|
|
4742
|
-
* return self.out
|
|
4743
4888
|
*/
|
|
4744
4889
|
}
|
|
4745
4890
|
|
|
4746
|
-
/* "cytriangle/cytriangle.pyx":
|
|
4747
|
-
*
|
|
4891
|
+
/* "cytriangle/cytriangle.pyx":130
|
|
4892
|
+
* is not None:
|
|
4748
4893
|
* raise RuntimeError('Triangulation failed')
|
|
4749
4894
|
* return self.out # <<<<<<<<<<<<<<
|
|
4750
4895
|
*
|
|
4751
|
-
* cpdef delaunay(self):
|
|
4896
|
+
* cpdef delaunay(self, verbose=False):
|
|
4752
4897
|
*/
|
|
4753
4898
|
__Pyx_XDECREF(__pyx_r);
|
|
4754
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4899
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
4755
4900
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4756
4901
|
__pyx_r = __pyx_t_1;
|
|
4757
4902
|
__pyx_t_1 = 0;
|
|
@@ -4760,7 +4905,7 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate(stru
|
|
|
4760
4905
|
/* "cytriangle/cytriangle.pyx":94
|
|
4761
4906
|
*
|
|
4762
4907
|
* # generic triangulation that accepts any switch
|
|
4763
|
-
* cpdef triangulate(self, triflags=''): # <<<<<<<<<<<<<<
|
|
4908
|
+
* cpdef triangulate(self, triflags='', verbose=False): # <<<<<<<<<<<<<<
|
|
4764
4909
|
* """
|
|
4765
4910
|
* Runs the main triangulation method on the in_ object with any additional
|
|
4766
4911
|
*/
|
|
@@ -4798,11 +4943,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4798
4943
|
#endif
|
|
4799
4944
|
) {
|
|
4800
4945
|
PyObject *__pyx_v_triflags = 0;
|
|
4946
|
+
PyObject *__pyx_v_verbose = 0;
|
|
4801
4947
|
#if !CYTHON_METH_FASTCALL
|
|
4802
4948
|
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
4803
4949
|
#endif
|
|
4804
4950
|
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
4805
|
-
PyObject* values[
|
|
4951
|
+
PyObject* values[2] = {0,0};
|
|
4806
4952
|
int __pyx_lineno = 0;
|
|
4807
4953
|
const char *__pyx_filename = NULL;
|
|
4808
4954
|
int __pyx_clineno = 0;
|
|
@@ -4818,11 +4964,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4818
4964
|
#endif
|
|
4819
4965
|
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
|
|
4820
4966
|
{
|
|
4821
|
-
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_triflags,0};
|
|
4967
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_triflags,&__pyx_n_s_verbose,0};
|
|
4822
4968
|
values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_kp_u_));
|
|
4969
|
+
values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
|
|
4823
4970
|
if (__pyx_kwds) {
|
|
4824
4971
|
Py_ssize_t kw_args;
|
|
4825
4972
|
switch (__pyx_nargs) {
|
|
4973
|
+
case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
|
|
4974
|
+
CYTHON_FALLTHROUGH;
|
|
4826
4975
|
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
4827
4976
|
CYTHON_FALLTHROUGH;
|
|
4828
4977
|
case 0: break;
|
|
@@ -4836,6 +4985,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4836
4985
|
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
4837
4986
|
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L3_error)
|
|
4838
4987
|
}
|
|
4988
|
+
CYTHON_FALLTHROUGH;
|
|
4989
|
+
case 1:
|
|
4990
|
+
if (kw_args > 0) {
|
|
4991
|
+
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose);
|
|
4992
|
+
if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
4993
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L3_error)
|
|
4994
|
+
}
|
|
4839
4995
|
}
|
|
4840
4996
|
if (unlikely(kw_args > 0)) {
|
|
4841
4997
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
@@ -4843,6 +4999,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4843
4999
|
}
|
|
4844
5000
|
} else {
|
|
4845
5001
|
switch (__pyx_nargs) {
|
|
5002
|
+
case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
|
|
5003
|
+
CYTHON_FALLTHROUGH;
|
|
4846
5004
|
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
4847
5005
|
CYTHON_FALLTHROUGH;
|
|
4848
5006
|
case 0: break;
|
|
@@ -4850,10 +5008,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4850
5008
|
}
|
|
4851
5009
|
}
|
|
4852
5010
|
__pyx_v_triflags = values[0];
|
|
5011
|
+
__pyx_v_verbose = values[1];
|
|
4853
5012
|
}
|
|
4854
5013
|
goto __pyx_L6_skip;
|
|
4855
5014
|
__pyx_L5_argtuple_error:;
|
|
4856
|
-
__Pyx_RaiseArgtupleInvalid("triangulate", 0, 0,
|
|
5015
|
+
__Pyx_RaiseArgtupleInvalid("triangulate", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 94, __pyx_L3_error)
|
|
4857
5016
|
__pyx_L6_skip:;
|
|
4858
5017
|
goto __pyx_L4_argument_unpacking_done;
|
|
4859
5018
|
__pyx_L3_error:;
|
|
@@ -4867,7 +5026,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4867
5026
|
__Pyx_RefNannyFinishContext();
|
|
4868
5027
|
return NULL;
|
|
4869
5028
|
__pyx_L4_argument_unpacking_done:;
|
|
4870
|
-
__pyx_r = __pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(((struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_self), __pyx_v_triflags);
|
|
5029
|
+
__pyx_r = __pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(((struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_self), __pyx_v_triflags, __pyx_v_verbose);
|
|
4871
5030
|
|
|
4872
5031
|
/* function exit code */
|
|
4873
5032
|
{
|
|
@@ -4880,7 +5039,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
4880
5039
|
return __pyx_r;
|
|
4881
5040
|
}
|
|
4882
5041
|
|
|
4883
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_triflags) {
|
|
5042
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_triflags, PyObject *__pyx_v_verbose) {
|
|
4884
5043
|
PyObject *__pyx_r = NULL;
|
|
4885
5044
|
__Pyx_RefNannyDeclarations
|
|
4886
5045
|
PyObject *__pyx_t_1 = NULL;
|
|
@@ -4890,8 +5049,9 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(s
|
|
|
4890
5049
|
int __pyx_clineno = 0;
|
|
4891
5050
|
__Pyx_RefNannySetupContext("triangulate", 1);
|
|
4892
5051
|
__Pyx_XDECREF(__pyx_r);
|
|
4893
|
-
__pyx_t_2.__pyx_n =
|
|
5052
|
+
__pyx_t_2.__pyx_n = 2;
|
|
4894
5053
|
__pyx_t_2.triflags = __pyx_v_triflags;
|
|
5054
|
+
__pyx_t_2.verbose = __pyx_v_verbose;
|
|
4895
5055
|
__pyx_t_1 = __pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle->triangulate(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
|
|
4896
5056
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4897
5057
|
__pyx_r = __pyx_t_1;
|
|
@@ -4909,12 +5069,12 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_10triangulate(s
|
|
|
4909
5069
|
return __pyx_r;
|
|
4910
5070
|
}
|
|
4911
5071
|
|
|
4912
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5072
|
+
/* "cytriangle/cytriangle.pyx":132
|
|
4913
5073
|
* return self.out
|
|
4914
5074
|
*
|
|
4915
|
-
* cpdef delaunay(self): # <<<<<<<<<<<<<<
|
|
5075
|
+
* cpdef delaunay(self, verbose=False): # <<<<<<<<<<<<<<
|
|
4916
5076
|
* """
|
|
4917
|
-
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
5077
|
+
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
4918
5078
|
*/
|
|
4919
5079
|
|
|
4920
5080
|
static PyObject *__pyx_pw_10cytriangle_10cytriangle_10CyTriangle_13delaunay(PyObject *__pyx_v_self,
|
|
@@ -4924,7 +5084,8 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
4924
5084
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
4925
5085
|
#endif
|
|
4926
5086
|
); /*proto*/
|
|
4927
|
-
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch) {
|
|
5087
|
+
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay *__pyx_optional_args) {
|
|
5088
|
+
PyObject *__pyx_v_verbose = ((PyObject *)Py_False);
|
|
4928
5089
|
PyObject *__pyx_v_opts = NULL;
|
|
4929
5090
|
PyObject *__pyx_r = NULL;
|
|
4930
5091
|
__Pyx_RefNannyDeclarations
|
|
@@ -4933,12 +5094,18 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct
|
|
|
4933
5094
|
PyObject *__pyx_t_3 = NULL;
|
|
4934
5095
|
PyObject *__pyx_t_4 = NULL;
|
|
4935
5096
|
int __pyx_t_5;
|
|
4936
|
-
|
|
5097
|
+
int __pyx_t_6;
|
|
4937
5098
|
int __pyx_t_7;
|
|
5099
|
+
char *__pyx_t_8;
|
|
4938
5100
|
int __pyx_lineno = 0;
|
|
4939
5101
|
const char *__pyx_filename = NULL;
|
|
4940
5102
|
int __pyx_clineno = 0;
|
|
4941
5103
|
__Pyx_RefNannySetupContext("delaunay", 1);
|
|
5104
|
+
if (__pyx_optional_args) {
|
|
5105
|
+
if (__pyx_optional_args->__pyx_n > 0) {
|
|
5106
|
+
__pyx_v_verbose = __pyx_optional_args->verbose;
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
4942
5109
|
/* Check if called by wrapper */
|
|
4943
5110
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
4944
5111
|
/* Check if overridden in Python */
|
|
@@ -4948,7 +5115,7 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct
|
|
|
4948
5115
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
4949
5116
|
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
4950
5117
|
#endif
|
|
4951
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delaunay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5118
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delaunay); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
4952
5119
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4953
5120
|
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10cytriangle_10cytriangle_10CyTriangle_13delaunay)) {
|
|
4954
5121
|
__Pyx_XDECREF(__pyx_r);
|
|
@@ -4968,10 +5135,10 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct
|
|
|
4968
5135
|
}
|
|
4969
5136
|
#endif
|
|
4970
5137
|
{
|
|
4971
|
-
PyObject *__pyx_callargs[2] = {__pyx_t_4,
|
|
4972
|
-
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5,
|
|
5138
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_verbose};
|
|
5139
|
+
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
4973
5140
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4974
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5141
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
4975
5142
|
__Pyx_GOTREF(__pyx_t_2);
|
|
4976
5143
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4977
5144
|
}
|
|
@@ -4993,72 +5160,106 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay(struct
|
|
|
4993
5160
|
#endif
|
|
4994
5161
|
}
|
|
4995
5162
|
|
|
4996
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5163
|
+
/* "cytriangle/cytriangle.pyx":142
|
|
4997
5164
|
*
|
|
4998
5165
|
* """
|
|
4999
|
-
* opts = "
|
|
5000
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5166
|
+
* opts = f"{'Q' if not verbose else 'V'}z".encode('utf-8') # <<<<<<<<<<<<<<
|
|
5167
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5168
|
+
* is not None:
|
|
5169
|
+
*/
|
|
5170
|
+
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 142, __pyx_L1_error)
|
|
5171
|
+
__pyx_t_7 = (!__pyx_t_6);
|
|
5172
|
+
if (__pyx_t_7) {
|
|
5173
|
+
__Pyx_INCREF(__pyx_n_u_Q);
|
|
5174
|
+
__pyx_t_1 = __pyx_n_u_Q;
|
|
5175
|
+
} else {
|
|
5176
|
+
__Pyx_INCREF(__pyx_n_u_V);
|
|
5177
|
+
__pyx_t_1 = __pyx_n_u_V;
|
|
5178
|
+
}
|
|
5179
|
+
__pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
|
|
5180
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5181
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5182
|
+
__pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_n_u_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
|
|
5183
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
5184
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5185
|
+
__pyx_t_2 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
|
|
5186
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5187
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5188
|
+
__pyx_v_opts = __pyx_t_2;
|
|
5189
|
+
__pyx_t_2 = 0;
|
|
5190
|
+
|
|
5191
|
+
/* "cytriangle/cytriangle.pyx":143
|
|
5192
|
+
* """
|
|
5193
|
+
* opts = f"{'Q' if not verbose else 'V'}z".encode('utf-8')
|
|
5194
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5195
|
+
* is not None:
|
|
5001
5196
|
* raise RuntimeError('Delaunay triangulation failed')
|
|
5002
5197
|
*/
|
|
5003
|
-
|
|
5004
|
-
|
|
5198
|
+
__pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_opts); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
|
|
5199
|
+
__pyx_t_2 = __Pyx_void_to_None(triangulate(__pyx_t_8, __pyx_v_self->_in->_io, __pyx_v_self->_out->_io, __pyx_v_self->_vorout->_io)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
|
|
5200
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5005
5201
|
|
|
5006
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5007
|
-
* ""
|
|
5008
|
-
* opts
|
|
5009
|
-
*
|
|
5202
|
+
/* "cytriangle/cytriangle.pyx":144
|
|
5203
|
+
* opts = f"{'Q' if not verbose else 'V'}z".encode('utf-8')
|
|
5204
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5205
|
+
* is not None: # <<<<<<<<<<<<<<
|
|
5010
5206
|
* raise RuntimeError('Delaunay triangulation failed')
|
|
5011
5207
|
* return self.out
|
|
5012
5208
|
*/
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5209
|
+
__pyx_t_7 = (__pyx_t_2 != Py_None);
|
|
5210
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5211
|
+
|
|
5212
|
+
/* "cytriangle/cytriangle.pyx":143
|
|
5213
|
+
* """
|
|
5214
|
+
* opts = f"{'Q' if not verbose else 'V'}z".encode('utf-8')
|
|
5215
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5216
|
+
* is not None:
|
|
5217
|
+
* raise RuntimeError('Delaunay triangulation failed')
|
|
5218
|
+
*/
|
|
5018
5219
|
if (unlikely(__pyx_t_7)) {
|
|
5019
5220
|
|
|
5020
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5021
|
-
* opts
|
|
5022
|
-
*
|
|
5221
|
+
/* "cytriangle/cytriangle.pyx":145
|
|
5222
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5223
|
+
* is not None:
|
|
5023
5224
|
* raise RuntimeError('Delaunay triangulation failed') # <<<<<<<<<<<<<<
|
|
5024
5225
|
* return self.out
|
|
5025
5226
|
*
|
|
5026
5227
|
*/
|
|
5027
|
-
|
|
5028
|
-
__Pyx_GOTREF(
|
|
5029
|
-
__Pyx_Raise(
|
|
5030
|
-
__Pyx_DECREF(
|
|
5031
|
-
__PYX_ERR(0,
|
|
5228
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
|
|
5229
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5230
|
+
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
5231
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5232
|
+
__PYX_ERR(0, 145, __pyx_L1_error)
|
|
5032
5233
|
|
|
5033
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5234
|
+
/* "cytriangle/cytriangle.pyx":143
|
|
5034
5235
|
* """
|
|
5035
|
-
* opts = "
|
|
5036
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5236
|
+
* opts = f"{'Q' if not verbose else 'V'}z".encode('utf-8')
|
|
5237
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5238
|
+
* is not None:
|
|
5037
5239
|
* raise RuntimeError('Delaunay triangulation failed')
|
|
5038
|
-
* return self.out
|
|
5039
5240
|
*/
|
|
5040
5241
|
}
|
|
5041
5242
|
|
|
5042
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5043
|
-
*
|
|
5243
|
+
/* "cytriangle/cytriangle.pyx":146
|
|
5244
|
+
* is not None:
|
|
5044
5245
|
* raise RuntimeError('Delaunay triangulation failed')
|
|
5045
5246
|
* return self.out # <<<<<<<<<<<<<<
|
|
5046
5247
|
*
|
|
5047
|
-
* cpdef convex_hull(self):
|
|
5248
|
+
* cpdef convex_hull(self, verbose=False):
|
|
5048
5249
|
*/
|
|
5049
5250
|
__Pyx_XDECREF(__pyx_r);
|
|
5050
|
-
|
|
5051
|
-
__Pyx_GOTREF(
|
|
5052
|
-
__pyx_r =
|
|
5053
|
-
|
|
5251
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
|
|
5252
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5253
|
+
__pyx_r = __pyx_t_2;
|
|
5254
|
+
__pyx_t_2 = 0;
|
|
5054
5255
|
goto __pyx_L0;
|
|
5055
5256
|
|
|
5056
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5257
|
+
/* "cytriangle/cytriangle.pyx":132
|
|
5057
5258
|
* return self.out
|
|
5058
5259
|
*
|
|
5059
|
-
* cpdef delaunay(self): # <<<<<<<<<<<<<<
|
|
5260
|
+
* cpdef delaunay(self, verbose=False): # <<<<<<<<<<<<<<
|
|
5060
5261
|
* """
|
|
5061
|
-
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
5262
|
+
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
5062
5263
|
*/
|
|
5063
5264
|
|
|
5064
5265
|
/* function exit code */
|
|
@@ -5084,7 +5285,7 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5084
5285
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5085
5286
|
#endif
|
|
5086
5287
|
); /*proto*/
|
|
5087
|
-
PyDoc_STRVAR(__pyx_doc_10cytriangle_10cytriangle_10CyTriangle_12delaunay, "\n Run the main triangulation method on the in_ object with *only* -Qz
|
|
5288
|
+
PyDoc_STRVAR(__pyx_doc_10cytriangle_10cytriangle_10CyTriangle_12delaunay, "\n Run the main triangulation method on the in_ object with *only* -Qz\n flags enabled.\n\n - Q Quiet: suppresses all output messages from Triangle library\n\n - z Numbers all items starting from zero (zero-indexed) rather than one.\n\n ");
|
|
5088
5289
|
static PyMethodDef __pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_13delaunay = {"delaunay", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10cytriangle_10cytriangle_10CyTriangle_13delaunay, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10cytriangle_10cytriangle_10CyTriangle_12delaunay};
|
|
5089
5290
|
static PyObject *__pyx_pw_10cytriangle_10cytriangle_10CyTriangle_13delaunay(PyObject *__pyx_v_self,
|
|
5090
5291
|
#if CYTHON_METH_FASTCALL
|
|
@@ -5093,10 +5294,15 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5093
5294
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5094
5295
|
#endif
|
|
5095
5296
|
) {
|
|
5297
|
+
PyObject *__pyx_v_verbose = 0;
|
|
5096
5298
|
#if !CYTHON_METH_FASTCALL
|
|
5097
5299
|
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
5098
5300
|
#endif
|
|
5099
5301
|
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
5302
|
+
PyObject* values[1] = {0};
|
|
5303
|
+
int __pyx_lineno = 0;
|
|
5304
|
+
const char *__pyx_filename = NULL;
|
|
5305
|
+
int __pyx_clineno = 0;
|
|
5100
5306
|
PyObject *__pyx_r = 0;
|
|
5101
5307
|
__Pyx_RefNannyDeclarations
|
|
5102
5308
|
__Pyx_RefNannySetupContext("delaunay (wrapper)", 0);
|
|
@@ -5108,26 +5314,82 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
5108
5314
|
#endif
|
|
5109
5315
|
#endif
|
|
5110
5316
|
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5317
|
+
{
|
|
5318
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,0};
|
|
5319
|
+
values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
|
|
5320
|
+
if (__pyx_kwds) {
|
|
5321
|
+
Py_ssize_t kw_args;
|
|
5322
|
+
switch (__pyx_nargs) {
|
|
5323
|
+
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
5324
|
+
CYTHON_FALLTHROUGH;
|
|
5325
|
+
case 0: break;
|
|
5326
|
+
default: goto __pyx_L5_argtuple_error;
|
|
5327
|
+
}
|
|
5328
|
+
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
|
|
5329
|
+
switch (__pyx_nargs) {
|
|
5330
|
+
case 0:
|
|
5331
|
+
if (kw_args > 0) {
|
|
5332
|
+
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose);
|
|
5333
|
+
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
5334
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error)
|
|
5335
|
+
}
|
|
5336
|
+
}
|
|
5337
|
+
if (unlikely(kw_args > 0)) {
|
|
5338
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
5339
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "delaunay") < 0)) __PYX_ERR(0, 132, __pyx_L3_error)
|
|
5340
|
+
}
|
|
5341
|
+
} else {
|
|
5342
|
+
switch (__pyx_nargs) {
|
|
5343
|
+
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
5344
|
+
CYTHON_FALLTHROUGH;
|
|
5345
|
+
case 0: break;
|
|
5346
|
+
default: goto __pyx_L5_argtuple_error;
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
__pyx_v_verbose = values[0];
|
|
5350
|
+
}
|
|
5351
|
+
goto __pyx_L6_skip;
|
|
5352
|
+
__pyx_L5_argtuple_error:;
|
|
5353
|
+
__Pyx_RaiseArgtupleInvalid("delaunay", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 132, __pyx_L3_error)
|
|
5354
|
+
__pyx_L6_skip:;
|
|
5355
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
5356
|
+
__pyx_L3_error:;
|
|
5357
|
+
{
|
|
5358
|
+
Py_ssize_t __pyx_temp;
|
|
5359
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
5360
|
+
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
|
|
5361
|
+
}
|
|
5362
|
+
}
|
|
5363
|
+
__Pyx_AddTraceback("cytriangle.cytriangle.CyTriangle.delaunay", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
5364
|
+
__Pyx_RefNannyFinishContext();
|
|
5365
|
+
return NULL;
|
|
5366
|
+
__pyx_L4_argument_unpacking_done:;
|
|
5367
|
+
__pyx_r = __pyx_pf_10cytriangle_10cytriangle_10CyTriangle_12delaunay(((struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_self), __pyx_v_verbose);
|
|
5115
5368
|
|
|
5116
5369
|
/* function exit code */
|
|
5370
|
+
{
|
|
5371
|
+
Py_ssize_t __pyx_temp;
|
|
5372
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
5373
|
+
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
|
|
5374
|
+
}
|
|
5375
|
+
}
|
|
5117
5376
|
__Pyx_RefNannyFinishContext();
|
|
5118
5377
|
return __pyx_r;
|
|
5119
5378
|
}
|
|
5120
5379
|
|
|
5121
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_12delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self) {
|
|
5380
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_12delaunay(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_verbose) {
|
|
5122
5381
|
PyObject *__pyx_r = NULL;
|
|
5123
5382
|
__Pyx_RefNannyDeclarations
|
|
5124
5383
|
PyObject *__pyx_t_1 = NULL;
|
|
5384
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay __pyx_t_2;
|
|
5125
5385
|
int __pyx_lineno = 0;
|
|
5126
5386
|
const char *__pyx_filename = NULL;
|
|
5127
5387
|
int __pyx_clineno = 0;
|
|
5128
5388
|
__Pyx_RefNannySetupContext("delaunay", 1);
|
|
5129
5389
|
__Pyx_XDECREF(__pyx_r);
|
|
5130
|
-
|
|
5390
|
+
__pyx_t_2.__pyx_n = 1;
|
|
5391
|
+
__pyx_t_2.verbose = __pyx_v_verbose;
|
|
5392
|
+
__pyx_t_1 = __pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle->delaunay(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
5131
5393
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5132
5394
|
__pyx_r = __pyx_t_1;
|
|
5133
5395
|
__pyx_t_1 = 0;
|
|
@@ -5144,10 +5406,10 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_12delaunay(stru
|
|
|
5144
5406
|
return __pyx_r;
|
|
5145
5407
|
}
|
|
5146
5408
|
|
|
5147
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5409
|
+
/* "cytriangle/cytriangle.pyx":148
|
|
5148
5410
|
* return self.out
|
|
5149
5411
|
*
|
|
5150
|
-
* cpdef convex_hull(self): # <<<<<<<<<<<<<<
|
|
5412
|
+
* cpdef convex_hull(self, verbose=False): # <<<<<<<<<<<<<<
|
|
5151
5413
|
* """
|
|
5152
5414
|
* Run the main triangulation method on the in_ object with -Qzc flags enabled.
|
|
5153
5415
|
*/
|
|
@@ -5159,7 +5421,8 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5159
5421
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5160
5422
|
#endif
|
|
5161
5423
|
); /*proto*/
|
|
5162
|
-
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch) {
|
|
5424
|
+
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull *__pyx_optional_args) {
|
|
5425
|
+
PyObject *__pyx_v_verbose = ((PyObject *)Py_False);
|
|
5163
5426
|
PyObject *__pyx_v_opts = NULL;
|
|
5164
5427
|
PyObject *__pyx_r = NULL;
|
|
5165
5428
|
__Pyx_RefNannyDeclarations
|
|
@@ -5168,12 +5431,18 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(stru
|
|
|
5168
5431
|
PyObject *__pyx_t_3 = NULL;
|
|
5169
5432
|
PyObject *__pyx_t_4 = NULL;
|
|
5170
5433
|
int __pyx_t_5;
|
|
5171
|
-
|
|
5434
|
+
int __pyx_t_6;
|
|
5172
5435
|
int __pyx_t_7;
|
|
5436
|
+
char *__pyx_t_8;
|
|
5173
5437
|
int __pyx_lineno = 0;
|
|
5174
5438
|
const char *__pyx_filename = NULL;
|
|
5175
5439
|
int __pyx_clineno = 0;
|
|
5176
5440
|
__Pyx_RefNannySetupContext("convex_hull", 1);
|
|
5441
|
+
if (__pyx_optional_args) {
|
|
5442
|
+
if (__pyx_optional_args->__pyx_n > 0) {
|
|
5443
|
+
__pyx_v_verbose = __pyx_optional_args->verbose;
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5177
5446
|
/* Check if called by wrapper */
|
|
5178
5447
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
5179
5448
|
/* Check if overridden in Python */
|
|
@@ -5183,7 +5452,7 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(stru
|
|
|
5183
5452
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
5184
5453
|
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
5185
5454
|
#endif
|
|
5186
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_convex_hull); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5455
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_convex_hull); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
5187
5456
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5188
5457
|
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10cytriangle_10cytriangle_10CyTriangle_15convex_hull)) {
|
|
5189
5458
|
__Pyx_XDECREF(__pyx_r);
|
|
@@ -5203,10 +5472,10 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(stru
|
|
|
5203
5472
|
}
|
|
5204
5473
|
#endif
|
|
5205
5474
|
{
|
|
5206
|
-
PyObject *__pyx_callargs[2] = {__pyx_t_4,
|
|
5207
|
-
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5,
|
|
5475
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_verbose};
|
|
5476
|
+
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
5208
5477
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
5209
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5478
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
5210
5479
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5211
5480
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
5212
5481
|
}
|
|
@@ -5228,70 +5497,104 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull(stru
|
|
|
5228
5497
|
#endif
|
|
5229
5498
|
}
|
|
5230
5499
|
|
|
5231
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5500
|
+
/* "cytriangle/cytriangle.pyx":159
|
|
5232
5501
|
*
|
|
5233
5502
|
* """
|
|
5234
|
-
* opts = f"
|
|
5235
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5236
|
-
*
|
|
5503
|
+
* opts = f"{'Q' if not verbose else 'V'}zc".encode('utf-8') # <<<<<<<<<<<<<<
|
|
5504
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5505
|
+
* is not None:
|
|
5506
|
+
*/
|
|
5507
|
+
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 159, __pyx_L1_error)
|
|
5508
|
+
__pyx_t_7 = (!__pyx_t_6);
|
|
5509
|
+
if (__pyx_t_7) {
|
|
5510
|
+
__Pyx_INCREF(__pyx_n_u_Q);
|
|
5511
|
+
__pyx_t_1 = __pyx_n_u_Q;
|
|
5512
|
+
} else {
|
|
5513
|
+
__Pyx_INCREF(__pyx_n_u_V);
|
|
5514
|
+
__pyx_t_1 = __pyx_n_u_V;
|
|
5515
|
+
}
|
|
5516
|
+
__pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
|
|
5517
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5518
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5519
|
+
__pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_n_u_zc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
|
|
5520
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
5521
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5522
|
+
__pyx_t_2 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
|
|
5523
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5524
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5525
|
+
__pyx_v_opts = __pyx_t_2;
|
|
5526
|
+
__pyx_t_2 = 0;
|
|
5527
|
+
|
|
5528
|
+
/* "cytriangle/cytriangle.pyx":160
|
|
5529
|
+
* """
|
|
5530
|
+
* opts = f"{'Q' if not verbose else 'V'}zc".encode('utf-8')
|
|
5531
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5532
|
+
* is not None:
|
|
5533
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull
|
|
5534
|
+
*/
|
|
5535
|
+
__pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_opts); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L1_error)
|
|
5536
|
+
__pyx_t_2 = __Pyx_void_to_None(triangulate(__pyx_t_8, __pyx_v_self->_in->_io, __pyx_v_self->_out->_io, __pyx_v_self->_vorout->_io)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
|
|
5537
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5538
|
+
|
|
5539
|
+
/* "cytriangle/cytriangle.pyx":161
|
|
5540
|
+
* opts = f"{'Q' if not verbose else 'V'}zc".encode('utf-8')
|
|
5541
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5542
|
+
* is not None: # <<<<<<<<<<<<<<
|
|
5543
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull
|
|
5544
|
+
* construction failed""")
|
|
5237
5545
|
*/
|
|
5238
|
-
|
|
5239
|
-
|
|
5546
|
+
__pyx_t_7 = (__pyx_t_2 != Py_None);
|
|
5547
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5240
5548
|
|
|
5241
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5549
|
+
/* "cytriangle/cytriangle.pyx":160
|
|
5242
5550
|
* """
|
|
5243
|
-
* opts = f"
|
|
5244
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5245
|
-
*
|
|
5246
|
-
*
|
|
5551
|
+
* opts = f"{'Q' if not verbose else 'V'}zc".encode('utf-8')
|
|
5552
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5553
|
+
* is not None:
|
|
5554
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull
|
|
5247
5555
|
*/
|
|
5248
|
-
__pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_opts); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 156, __pyx_L1_error)
|
|
5249
|
-
__pyx_t_1 = __Pyx_void_to_None(triangulate(__pyx_t_6, __pyx_v_self->_in->_io, __pyx_v_self->_out->_io, __pyx_v_self->_vorout->_io)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
|
|
5250
|
-
__Pyx_GOTREF(__pyx_t_1);
|
|
5251
|
-
__pyx_t_7 = (__pyx_t_1 != Py_None);
|
|
5252
|
-
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5253
5556
|
if (unlikely(__pyx_t_7)) {
|
|
5254
5557
|
|
|
5255
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5256
|
-
* opts
|
|
5257
|
-
*
|
|
5258
|
-
* raise RuntimeError(
|
|
5558
|
+
/* "cytriangle/cytriangle.pyx":162
|
|
5559
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5560
|
+
* is not None:
|
|
5561
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull # <<<<<<<<<<<<<<
|
|
5562
|
+
* construction failed""")
|
|
5259
5563
|
* return self.out
|
|
5260
|
-
*
|
|
5261
5564
|
*/
|
|
5262
|
-
|
|
5263
|
-
__Pyx_GOTREF(
|
|
5264
|
-
__Pyx_Raise(
|
|
5265
|
-
__Pyx_DECREF(
|
|
5266
|
-
__PYX_ERR(0,
|
|
5565
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
|
|
5566
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5567
|
+
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
5568
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5569
|
+
__PYX_ERR(0, 162, __pyx_L1_error)
|
|
5267
5570
|
|
|
5268
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5571
|
+
/* "cytriangle/cytriangle.pyx":160
|
|
5269
5572
|
* """
|
|
5270
|
-
* opts = f"
|
|
5271
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5272
|
-
*
|
|
5273
|
-
*
|
|
5573
|
+
* opts = f"{'Q' if not verbose else 'V'}zc".encode('utf-8')
|
|
5574
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5575
|
+
* is not None:
|
|
5576
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull
|
|
5274
5577
|
*/
|
|
5275
5578
|
}
|
|
5276
5579
|
|
|
5277
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5278
|
-
*
|
|
5279
|
-
*
|
|
5580
|
+
/* "cytriangle/cytriangle.pyx":164
|
|
5581
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull
|
|
5582
|
+
* construction failed""")
|
|
5280
5583
|
* return self.out # <<<<<<<<<<<<<<
|
|
5281
5584
|
*
|
|
5282
|
-
* cpdef voronoi(self):
|
|
5585
|
+
* cpdef voronoi(self, verbose=False):
|
|
5283
5586
|
*/
|
|
5284
5587
|
__Pyx_XDECREF(__pyx_r);
|
|
5285
|
-
|
|
5286
|
-
__Pyx_GOTREF(
|
|
5287
|
-
__pyx_r =
|
|
5288
|
-
|
|
5588
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
|
|
5589
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5590
|
+
__pyx_r = __pyx_t_2;
|
|
5591
|
+
__pyx_t_2 = 0;
|
|
5289
5592
|
goto __pyx_L0;
|
|
5290
5593
|
|
|
5291
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5594
|
+
/* "cytriangle/cytriangle.pyx":148
|
|
5292
5595
|
* return self.out
|
|
5293
5596
|
*
|
|
5294
|
-
* cpdef convex_hull(self): # <<<<<<<<<<<<<<
|
|
5597
|
+
* cpdef convex_hull(self, verbose=False): # <<<<<<<<<<<<<<
|
|
5295
5598
|
* """
|
|
5296
5599
|
* Run the main triangulation method on the in_ object with -Qzc flags enabled.
|
|
5297
5600
|
*/
|
|
@@ -5328,10 +5631,15 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5328
5631
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5329
5632
|
#endif
|
|
5330
5633
|
) {
|
|
5634
|
+
PyObject *__pyx_v_verbose = 0;
|
|
5331
5635
|
#if !CYTHON_METH_FASTCALL
|
|
5332
5636
|
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
5333
5637
|
#endif
|
|
5334
5638
|
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
5639
|
+
PyObject* values[1] = {0};
|
|
5640
|
+
int __pyx_lineno = 0;
|
|
5641
|
+
const char *__pyx_filename = NULL;
|
|
5642
|
+
int __pyx_clineno = 0;
|
|
5335
5643
|
PyObject *__pyx_r = 0;
|
|
5336
5644
|
__Pyx_RefNannyDeclarations
|
|
5337
5645
|
__Pyx_RefNannySetupContext("convex_hull (wrapper)", 0);
|
|
@@ -5343,26 +5651,82 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
5343
5651
|
#endif
|
|
5344
5652
|
#endif
|
|
5345
5653
|
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5654
|
+
{
|
|
5655
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,0};
|
|
5656
|
+
values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
|
|
5657
|
+
if (__pyx_kwds) {
|
|
5658
|
+
Py_ssize_t kw_args;
|
|
5659
|
+
switch (__pyx_nargs) {
|
|
5660
|
+
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
5661
|
+
CYTHON_FALLTHROUGH;
|
|
5662
|
+
case 0: break;
|
|
5663
|
+
default: goto __pyx_L5_argtuple_error;
|
|
5664
|
+
}
|
|
5665
|
+
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
|
|
5666
|
+
switch (__pyx_nargs) {
|
|
5667
|
+
case 0:
|
|
5668
|
+
if (kw_args > 0) {
|
|
5669
|
+
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose);
|
|
5670
|
+
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
5671
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error)
|
|
5672
|
+
}
|
|
5673
|
+
}
|
|
5674
|
+
if (unlikely(kw_args > 0)) {
|
|
5675
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
5676
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "convex_hull") < 0)) __PYX_ERR(0, 148, __pyx_L3_error)
|
|
5677
|
+
}
|
|
5678
|
+
} else {
|
|
5679
|
+
switch (__pyx_nargs) {
|
|
5680
|
+
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
5681
|
+
CYTHON_FALLTHROUGH;
|
|
5682
|
+
case 0: break;
|
|
5683
|
+
default: goto __pyx_L5_argtuple_error;
|
|
5684
|
+
}
|
|
5685
|
+
}
|
|
5686
|
+
__pyx_v_verbose = values[0];
|
|
5687
|
+
}
|
|
5688
|
+
goto __pyx_L6_skip;
|
|
5689
|
+
__pyx_L5_argtuple_error:;
|
|
5690
|
+
__Pyx_RaiseArgtupleInvalid("convex_hull", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 148, __pyx_L3_error)
|
|
5691
|
+
__pyx_L6_skip:;
|
|
5692
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
5693
|
+
__pyx_L3_error:;
|
|
5694
|
+
{
|
|
5695
|
+
Py_ssize_t __pyx_temp;
|
|
5696
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
5697
|
+
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
|
|
5698
|
+
}
|
|
5699
|
+
}
|
|
5700
|
+
__Pyx_AddTraceback("cytriangle.cytriangle.CyTriangle.convex_hull", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
5701
|
+
__Pyx_RefNannyFinishContext();
|
|
5702
|
+
return NULL;
|
|
5703
|
+
__pyx_L4_argument_unpacking_done:;
|
|
5704
|
+
__pyx_r = __pyx_pf_10cytriangle_10cytriangle_10CyTriangle_14convex_hull(((struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_self), __pyx_v_verbose);
|
|
5350
5705
|
|
|
5351
5706
|
/* function exit code */
|
|
5707
|
+
{
|
|
5708
|
+
Py_ssize_t __pyx_temp;
|
|
5709
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
5710
|
+
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
|
|
5711
|
+
}
|
|
5712
|
+
}
|
|
5352
5713
|
__Pyx_RefNannyFinishContext();
|
|
5353
5714
|
return __pyx_r;
|
|
5354
5715
|
}
|
|
5355
5716
|
|
|
5356
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_14convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self) {
|
|
5717
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_14convex_hull(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_verbose) {
|
|
5357
5718
|
PyObject *__pyx_r = NULL;
|
|
5358
5719
|
__Pyx_RefNannyDeclarations
|
|
5359
5720
|
PyObject *__pyx_t_1 = NULL;
|
|
5721
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull __pyx_t_2;
|
|
5360
5722
|
int __pyx_lineno = 0;
|
|
5361
5723
|
const char *__pyx_filename = NULL;
|
|
5362
5724
|
int __pyx_clineno = 0;
|
|
5363
5725
|
__Pyx_RefNannySetupContext("convex_hull", 1);
|
|
5364
5726
|
__Pyx_XDECREF(__pyx_r);
|
|
5365
|
-
|
|
5727
|
+
__pyx_t_2.__pyx_n = 1;
|
|
5728
|
+
__pyx_t_2.verbose = __pyx_v_verbose;
|
|
5729
|
+
__pyx_t_1 = __pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle->convex_hull(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
5366
5730
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5367
5731
|
__pyx_r = __pyx_t_1;
|
|
5368
5732
|
__pyx_t_1 = 0;
|
|
@@ -5379,10 +5743,10 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_14convex_hull(s
|
|
|
5379
5743
|
return __pyx_r;
|
|
5380
5744
|
}
|
|
5381
5745
|
|
|
5382
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5746
|
+
/* "cytriangle/cytriangle.pyx":166
|
|
5383
5747
|
* return self.out
|
|
5384
5748
|
*
|
|
5385
|
-
* cpdef voronoi(self): # <<<<<<<<<<<<<<
|
|
5749
|
+
* cpdef voronoi(self, verbose=False): # <<<<<<<<<<<<<<
|
|
5386
5750
|
* """
|
|
5387
5751
|
* Run the main triangulation method on the in_ object with -Qzv flags enabled.
|
|
5388
5752
|
*/
|
|
@@ -5394,7 +5758,8 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5394
5758
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5395
5759
|
#endif
|
|
5396
5760
|
); /*proto*/
|
|
5397
|
-
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch) {
|
|
5761
|
+
static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi *__pyx_optional_args) {
|
|
5762
|
+
PyObject *__pyx_v_verbose = ((PyObject *)Py_False);
|
|
5398
5763
|
PyObject *__pyx_v_opts = NULL;
|
|
5399
5764
|
PyObject *__pyx_r = NULL;
|
|
5400
5765
|
__Pyx_RefNannyDeclarations
|
|
@@ -5403,12 +5768,18 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct _
|
|
|
5403
5768
|
PyObject *__pyx_t_3 = NULL;
|
|
5404
5769
|
PyObject *__pyx_t_4 = NULL;
|
|
5405
5770
|
int __pyx_t_5;
|
|
5406
|
-
|
|
5771
|
+
int __pyx_t_6;
|
|
5407
5772
|
int __pyx_t_7;
|
|
5773
|
+
char *__pyx_t_8;
|
|
5408
5774
|
int __pyx_lineno = 0;
|
|
5409
5775
|
const char *__pyx_filename = NULL;
|
|
5410
5776
|
int __pyx_clineno = 0;
|
|
5411
5777
|
__Pyx_RefNannySetupContext("voronoi", 1);
|
|
5778
|
+
if (__pyx_optional_args) {
|
|
5779
|
+
if (__pyx_optional_args->__pyx_n > 0) {
|
|
5780
|
+
__pyx_v_verbose = __pyx_optional_args->verbose;
|
|
5781
|
+
}
|
|
5782
|
+
}
|
|
5412
5783
|
/* Check if called by wrapper */
|
|
5413
5784
|
if (unlikely(__pyx_skip_dispatch)) ;
|
|
5414
5785
|
/* Check if overridden in Python */
|
|
@@ -5418,7 +5789,7 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct _
|
|
|
5418
5789
|
if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
|
|
5419
5790
|
PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
|
|
5420
5791
|
#endif
|
|
5421
|
-
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_voronoi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5792
|
+
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_voronoi); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
5422
5793
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5423
5794
|
if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_10cytriangle_10cytriangle_10CyTriangle_17voronoi)) {
|
|
5424
5795
|
__Pyx_XDECREF(__pyx_r);
|
|
@@ -5438,10 +5809,10 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct _
|
|
|
5438
5809
|
}
|
|
5439
5810
|
#endif
|
|
5440
5811
|
{
|
|
5441
|
-
PyObject *__pyx_callargs[2] = {__pyx_t_4,
|
|
5442
|
-
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5,
|
|
5812
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_verbose};
|
|
5813
|
+
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
|
|
5443
5814
|
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
5444
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5815
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
5445
5816
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5446
5817
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
5447
5818
|
}
|
|
@@ -5463,70 +5834,104 @@ static PyObject *__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi(struct _
|
|
|
5463
5834
|
#endif
|
|
5464
5835
|
}
|
|
5465
5836
|
|
|
5466
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5837
|
+
/* "cytriangle/cytriangle.pyx":177
|
|
5467
5838
|
*
|
|
5468
5839
|
* """
|
|
5469
|
-
* opts = f"
|
|
5470
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5471
|
-
*
|
|
5840
|
+
* opts = f"{'Q' if not verbose else 'V'}zv".encode('utf-8') # <<<<<<<<<<<<<<
|
|
5841
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5842
|
+
* is not None:
|
|
5843
|
+
*/
|
|
5844
|
+
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 177, __pyx_L1_error)
|
|
5845
|
+
__pyx_t_7 = (!__pyx_t_6);
|
|
5846
|
+
if (__pyx_t_7) {
|
|
5847
|
+
__Pyx_INCREF(__pyx_n_u_Q);
|
|
5848
|
+
__pyx_t_1 = __pyx_n_u_Q;
|
|
5849
|
+
} else {
|
|
5850
|
+
__Pyx_INCREF(__pyx_n_u_V);
|
|
5851
|
+
__pyx_t_1 = __pyx_n_u_V;
|
|
5852
|
+
}
|
|
5853
|
+
__pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
|
|
5854
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5855
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5856
|
+
__pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_n_u_zv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __pyx_L1_error)
|
|
5857
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
5858
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5859
|
+
__pyx_t_2 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
|
|
5860
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5861
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5862
|
+
__pyx_v_opts = __pyx_t_2;
|
|
5863
|
+
__pyx_t_2 = 0;
|
|
5864
|
+
|
|
5865
|
+
/* "cytriangle/cytriangle.pyx":178
|
|
5866
|
+
* """
|
|
5867
|
+
* opts = f"{'Q' if not verbose else 'V'}zv".encode('utf-8')
|
|
5868
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5869
|
+
* is not None:
|
|
5870
|
+
* raise RuntimeError("""Delaunay triangulation and generation of
|
|
5871
|
+
*/
|
|
5872
|
+
__pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_opts); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L1_error)
|
|
5873
|
+
__pyx_t_2 = __Pyx_void_to_None(triangulate(__pyx_t_8, __pyx_v_self->_in->_io, __pyx_v_self->_out->_io, __pyx_v_self->_vorout->_io)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
|
|
5874
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5875
|
+
|
|
5876
|
+
/* "cytriangle/cytriangle.pyx":179
|
|
5877
|
+
* opts = f"{'Q' if not verbose else 'V'}zv".encode('utf-8')
|
|
5878
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5879
|
+
* is not None: # <<<<<<<<<<<<<<
|
|
5880
|
+
* raise RuntimeError("""Delaunay triangulation and generation of
|
|
5881
|
+
* voronoi diagram failed""")
|
|
5472
5882
|
*/
|
|
5473
|
-
|
|
5474
|
-
|
|
5883
|
+
__pyx_t_7 = (__pyx_t_2 != Py_None);
|
|
5884
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5475
5885
|
|
|
5476
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5886
|
+
/* "cytriangle/cytriangle.pyx":178
|
|
5477
5887
|
* """
|
|
5478
|
-
* opts = f"
|
|
5479
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5480
|
-
*
|
|
5481
|
-
*
|
|
5888
|
+
* opts = f"{'Q' if not verbose else 'V'}zv".encode('utf-8')
|
|
5889
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5890
|
+
* is not None:
|
|
5891
|
+
* raise RuntimeError("""Delaunay triangulation and generation of
|
|
5482
5892
|
*/
|
|
5483
|
-
__pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_opts); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L1_error)
|
|
5484
|
-
__pyx_t_1 = __Pyx_void_to_None(triangulate(__pyx_t_6, __pyx_v_self->_in->_io, __pyx_v_self->_out->_io, __pyx_v_self->_vorout->_io)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
|
|
5485
|
-
__Pyx_GOTREF(__pyx_t_1);
|
|
5486
|
-
__pyx_t_7 = (__pyx_t_1 != Py_None);
|
|
5487
|
-
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5488
5893
|
if (unlikely(__pyx_t_7)) {
|
|
5489
5894
|
|
|
5490
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5491
|
-
* opts
|
|
5492
|
-
*
|
|
5493
|
-
* raise RuntimeError(
|
|
5895
|
+
/* "cytriangle/cytriangle.pyx":180
|
|
5896
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
5897
|
+
* is not None:
|
|
5898
|
+
* raise RuntimeError("""Delaunay triangulation and generation of # <<<<<<<<<<<<<<
|
|
5899
|
+
* voronoi diagram failed""")
|
|
5494
5900
|
* return self.out
|
|
5495
|
-
*
|
|
5496
5901
|
*/
|
|
5497
|
-
|
|
5498
|
-
__Pyx_GOTREF(
|
|
5499
|
-
__Pyx_Raise(
|
|
5500
|
-
__Pyx_DECREF(
|
|
5501
|
-
__PYX_ERR(0,
|
|
5902
|
+
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
|
|
5903
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5904
|
+
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
5905
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5906
|
+
__PYX_ERR(0, 180, __pyx_L1_error)
|
|
5502
5907
|
|
|
5503
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5908
|
+
/* "cytriangle/cytriangle.pyx":178
|
|
5504
5909
|
* """
|
|
5505
|
-
* opts = f"
|
|
5506
|
-
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io)
|
|
5507
|
-
*
|
|
5508
|
-
*
|
|
5910
|
+
* opts = f"{'Q' if not verbose else 'V'}zv".encode('utf-8')
|
|
5911
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \ # <<<<<<<<<<<<<<
|
|
5912
|
+
* is not None:
|
|
5913
|
+
* raise RuntimeError("""Delaunay triangulation and generation of
|
|
5509
5914
|
*/
|
|
5510
5915
|
}
|
|
5511
5916
|
|
|
5512
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5513
|
-
*
|
|
5514
|
-
*
|
|
5917
|
+
/* "cytriangle/cytriangle.pyx":182
|
|
5918
|
+
* raise RuntimeError("""Delaunay triangulation and generation of
|
|
5919
|
+
* voronoi diagram failed""")
|
|
5515
5920
|
* return self.out # <<<<<<<<<<<<<<
|
|
5516
5921
|
*
|
|
5517
|
-
*
|
|
5922
|
+
*
|
|
5518
5923
|
*/
|
|
5519
5924
|
__Pyx_XDECREF(__pyx_r);
|
|
5520
|
-
|
|
5521
|
-
__Pyx_GOTREF(
|
|
5522
|
-
__pyx_r =
|
|
5523
|
-
|
|
5925
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
|
|
5926
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
5927
|
+
__pyx_r = __pyx_t_2;
|
|
5928
|
+
__pyx_t_2 = 0;
|
|
5524
5929
|
goto __pyx_L0;
|
|
5525
5930
|
|
|
5526
|
-
/* "cytriangle/cytriangle.pyx":
|
|
5931
|
+
/* "cytriangle/cytriangle.pyx":166
|
|
5527
5932
|
* return self.out
|
|
5528
5933
|
*
|
|
5529
|
-
* cpdef voronoi(self): # <<<<<<<<<<<<<<
|
|
5934
|
+
* cpdef voronoi(self, verbose=False): # <<<<<<<<<<<<<<
|
|
5530
5935
|
* """
|
|
5531
5936
|
* Run the main triangulation method on the in_ object with -Qzv flags enabled.
|
|
5532
5937
|
*/
|
|
@@ -5563,10 +5968,15 @@ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
|
|
|
5563
5968
|
PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
5564
5969
|
#endif
|
|
5565
5970
|
) {
|
|
5971
|
+
PyObject *__pyx_v_verbose = 0;
|
|
5566
5972
|
#if !CYTHON_METH_FASTCALL
|
|
5567
5973
|
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
|
|
5568
5974
|
#endif
|
|
5569
5975
|
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
|
|
5976
|
+
PyObject* values[1] = {0};
|
|
5977
|
+
int __pyx_lineno = 0;
|
|
5978
|
+
const char *__pyx_filename = NULL;
|
|
5979
|
+
int __pyx_clineno = 0;
|
|
5570
5980
|
PyObject *__pyx_r = 0;
|
|
5571
5981
|
__Pyx_RefNannyDeclarations
|
|
5572
5982
|
__Pyx_RefNannySetupContext("voronoi (wrapper)", 0);
|
|
@@ -5578,26 +5988,82 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
5578
5988
|
#endif
|
|
5579
5989
|
#endif
|
|
5580
5990
|
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5991
|
+
{
|
|
5992
|
+
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_verbose,0};
|
|
5993
|
+
values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
|
|
5994
|
+
if (__pyx_kwds) {
|
|
5995
|
+
Py_ssize_t kw_args;
|
|
5996
|
+
switch (__pyx_nargs) {
|
|
5997
|
+
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
5998
|
+
CYTHON_FALLTHROUGH;
|
|
5999
|
+
case 0: break;
|
|
6000
|
+
default: goto __pyx_L5_argtuple_error;
|
|
6001
|
+
}
|
|
6002
|
+
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
|
|
6003
|
+
switch (__pyx_nargs) {
|
|
6004
|
+
case 0:
|
|
6005
|
+
if (kw_args > 0) {
|
|
6006
|
+
PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose);
|
|
6007
|
+
if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
|
|
6008
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L3_error)
|
|
6009
|
+
}
|
|
6010
|
+
}
|
|
6011
|
+
if (unlikely(kw_args > 0)) {
|
|
6012
|
+
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
6013
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "voronoi") < 0)) __PYX_ERR(0, 166, __pyx_L3_error)
|
|
6014
|
+
}
|
|
6015
|
+
} else {
|
|
6016
|
+
switch (__pyx_nargs) {
|
|
6017
|
+
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
|
|
6018
|
+
CYTHON_FALLTHROUGH;
|
|
6019
|
+
case 0: break;
|
|
6020
|
+
default: goto __pyx_L5_argtuple_error;
|
|
6021
|
+
}
|
|
6022
|
+
}
|
|
6023
|
+
__pyx_v_verbose = values[0];
|
|
6024
|
+
}
|
|
6025
|
+
goto __pyx_L6_skip;
|
|
6026
|
+
__pyx_L5_argtuple_error:;
|
|
6027
|
+
__Pyx_RaiseArgtupleInvalid("voronoi", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 166, __pyx_L3_error)
|
|
6028
|
+
__pyx_L6_skip:;
|
|
6029
|
+
goto __pyx_L4_argument_unpacking_done;
|
|
6030
|
+
__pyx_L3_error:;
|
|
6031
|
+
{
|
|
6032
|
+
Py_ssize_t __pyx_temp;
|
|
6033
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
6034
|
+
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
6037
|
+
__Pyx_AddTraceback("cytriangle.cytriangle.CyTriangle.voronoi", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
6038
|
+
__Pyx_RefNannyFinishContext();
|
|
6039
|
+
return NULL;
|
|
6040
|
+
__pyx_L4_argument_unpacking_done:;
|
|
6041
|
+
__pyx_r = __pyx_pf_10cytriangle_10cytriangle_10CyTriangle_16voronoi(((struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_self), __pyx_v_verbose);
|
|
5585
6042
|
|
|
5586
6043
|
/* function exit code */
|
|
6044
|
+
{
|
|
6045
|
+
Py_ssize_t __pyx_temp;
|
|
6046
|
+
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
|
|
6047
|
+
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
|
|
6048
|
+
}
|
|
6049
|
+
}
|
|
5587
6050
|
__Pyx_RefNannyFinishContext();
|
|
5588
6051
|
return __pyx_r;
|
|
5589
6052
|
}
|
|
5590
6053
|
|
|
5591
|
-
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_16voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self) {
|
|
6054
|
+
static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_16voronoi(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *__pyx_v_self, PyObject *__pyx_v_verbose) {
|
|
5592
6055
|
PyObject *__pyx_r = NULL;
|
|
5593
6056
|
__Pyx_RefNannyDeclarations
|
|
5594
6057
|
PyObject *__pyx_t_1 = NULL;
|
|
6058
|
+
struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi __pyx_t_2;
|
|
5595
6059
|
int __pyx_lineno = 0;
|
|
5596
6060
|
const char *__pyx_filename = NULL;
|
|
5597
6061
|
int __pyx_clineno = 0;
|
|
5598
6062
|
__Pyx_RefNannySetupContext("voronoi", 1);
|
|
5599
6063
|
__Pyx_XDECREF(__pyx_r);
|
|
5600
|
-
|
|
6064
|
+
__pyx_t_2.__pyx_n = 1;
|
|
6065
|
+
__pyx_t_2.verbose = __pyx_v_verbose;
|
|
6066
|
+
__pyx_t_1 = __pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle->voronoi(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
5601
6067
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5602
6068
|
__pyx_r = __pyx_t_1;
|
|
5603
6069
|
__pyx_t_1 = 0;
|
|
@@ -6036,8 +6502,8 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_10CyTriangle_20__setstate_cy
|
|
|
6036
6502
|
return __pyx_r;
|
|
6037
6503
|
}
|
|
6038
6504
|
|
|
6039
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6040
|
-
*
|
|
6505
|
+
/* "cytriangle/cytriangle.pyx":185
|
|
6506
|
+
*
|
|
6041
6507
|
*
|
|
6042
6508
|
* def triangulate(input_dict, flags): # <<<<<<<<<<<<<<
|
|
6043
6509
|
* """
|
|
@@ -6101,7 +6567,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6101
6567
|
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
|
|
6102
6568
|
kw_args--;
|
|
6103
6569
|
}
|
|
6104
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
6570
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error)
|
|
6105
6571
|
else goto __pyx_L5_argtuple_error;
|
|
6106
6572
|
CYTHON_FALLTHROUGH;
|
|
6107
6573
|
case 1:
|
|
@@ -6109,14 +6575,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6109
6575
|
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
|
|
6110
6576
|
kw_args--;
|
|
6111
6577
|
}
|
|
6112
|
-
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
6578
|
+
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error)
|
|
6113
6579
|
else {
|
|
6114
|
-
__Pyx_RaiseArgtupleInvalid("triangulate", 1, 2, 2, 1); __PYX_ERR(0,
|
|
6580
|
+
__Pyx_RaiseArgtupleInvalid("triangulate", 1, 2, 2, 1); __PYX_ERR(0, 185, __pyx_L3_error)
|
|
6115
6581
|
}
|
|
6116
6582
|
}
|
|
6117
6583
|
if (unlikely(kw_args > 0)) {
|
|
6118
6584
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
6119
|
-
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "triangulate") < 0)) __PYX_ERR(0,
|
|
6585
|
+
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "triangulate") < 0)) __PYX_ERR(0, 185, __pyx_L3_error)
|
|
6120
6586
|
}
|
|
6121
6587
|
} else if (unlikely(__pyx_nargs != 2)) {
|
|
6122
6588
|
goto __pyx_L5_argtuple_error;
|
|
@@ -6129,7 +6595,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6129
6595
|
}
|
|
6130
6596
|
goto __pyx_L6_skip;
|
|
6131
6597
|
__pyx_L5_argtuple_error:;
|
|
6132
|
-
__Pyx_RaiseArgtupleInvalid("triangulate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0,
|
|
6598
|
+
__Pyx_RaiseArgtupleInvalid("triangulate", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 185, __pyx_L3_error)
|
|
6133
6599
|
__pyx_L6_skip:;
|
|
6134
6600
|
goto __pyx_L4_argument_unpacking_done;
|
|
6135
6601
|
__pyx_L3_error:;
|
|
@@ -6178,41 +6644,41 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6178
6644
|
int __pyx_clineno = 0;
|
|
6179
6645
|
__Pyx_RefNannySetupContext("triangulate", 1);
|
|
6180
6646
|
|
|
6181
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6647
|
+
/* "cytriangle/cytriangle.pyx":225
|
|
6182
6648
|
* """
|
|
6183
6649
|
* # parse regions
|
|
6184
6650
|
* if "regions" in input_dict: # <<<<<<<<<<<<<<
|
|
6185
6651
|
* raw_regions = input_dict["regions"]
|
|
6186
6652
|
* parsed_regions = []
|
|
6187
6653
|
*/
|
|
6188
|
-
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_regions, __pyx_v_input_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
6654
|
+
__pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_regions, __pyx_v_input_dict, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 225, __pyx_L1_error)
|
|
6189
6655
|
if (__pyx_t_1) {
|
|
6190
6656
|
|
|
6191
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6657
|
+
/* "cytriangle/cytriangle.pyx":226
|
|
6192
6658
|
* # parse regions
|
|
6193
6659
|
* if "regions" in input_dict:
|
|
6194
6660
|
* raw_regions = input_dict["regions"] # <<<<<<<<<<<<<<
|
|
6195
6661
|
* parsed_regions = []
|
|
6196
6662
|
* for region in raw_regions:
|
|
6197
6663
|
*/
|
|
6198
|
-
__pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_input_dict, __pyx_n_u_regions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6664
|
+
__pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_input_dict, __pyx_n_u_regions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
6199
6665
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6200
6666
|
__pyx_v_raw_regions = __pyx_t_2;
|
|
6201
6667
|
__pyx_t_2 = 0;
|
|
6202
6668
|
|
|
6203
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6669
|
+
/* "cytriangle/cytriangle.pyx":227
|
|
6204
6670
|
* if "regions" in input_dict:
|
|
6205
6671
|
* raw_regions = input_dict["regions"]
|
|
6206
6672
|
* parsed_regions = [] # <<<<<<<<<<<<<<
|
|
6207
6673
|
* for region in raw_regions:
|
|
6208
6674
|
* parsed_regions.append(
|
|
6209
6675
|
*/
|
|
6210
|
-
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6676
|
+
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
6211
6677
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6212
6678
|
__pyx_v_parsed_regions = ((PyObject*)__pyx_t_2);
|
|
6213
6679
|
__pyx_t_2 = 0;
|
|
6214
6680
|
|
|
6215
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6681
|
+
/* "cytriangle/cytriangle.pyx":228
|
|
6216
6682
|
* raw_regions = input_dict["regions"]
|
|
6217
6683
|
* parsed_regions = []
|
|
6218
6684
|
* for region in raw_regions: # <<<<<<<<<<<<<<
|
|
@@ -6224,9 +6690,9 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6224
6690
|
__pyx_t_3 = 0;
|
|
6225
6691
|
__pyx_t_4 = NULL;
|
|
6226
6692
|
} else {
|
|
6227
|
-
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_raw_regions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6693
|
+
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_raw_regions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6228
6694
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6229
|
-
__pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
6695
|
+
__pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6230
6696
|
}
|
|
6231
6697
|
for (;;) {
|
|
6232
6698
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6234,28 +6700,28 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6234
6700
|
{
|
|
6235
6701
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
6236
6702
|
#if !CYTHON_ASSUME_SAFE_MACROS
|
|
6237
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6703
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6238
6704
|
#endif
|
|
6239
6705
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6240
6706
|
}
|
|
6241
6707
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
6242
|
-
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0,
|
|
6708
|
+
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6243
6709
|
#else
|
|
6244
|
-
__pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6710
|
+
__pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6245
6711
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6246
6712
|
#endif
|
|
6247
6713
|
} else {
|
|
6248
6714
|
{
|
|
6249
6715
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
|
|
6250
6716
|
#if !CYTHON_ASSUME_SAFE_MACROS
|
|
6251
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6717
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6252
6718
|
#endif
|
|
6253
6719
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6254
6720
|
}
|
|
6255
6721
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
6256
|
-
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0,
|
|
6722
|
+
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6257
6723
|
#else
|
|
6258
|
-
__pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6724
|
+
__pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6259
6725
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6260
6726
|
#endif
|
|
6261
6727
|
}
|
|
@@ -6265,7 +6731,7 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6265
6731
|
PyObject* exc_type = PyErr_Occurred();
|
|
6266
6732
|
if (exc_type) {
|
|
6267
6733
|
if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
|
|
6268
|
-
else __PYX_ERR(0,
|
|
6734
|
+
else __PYX_ERR(0, 228, __pyx_L1_error)
|
|
6269
6735
|
}
|
|
6270
6736
|
break;
|
|
6271
6737
|
}
|
|
@@ -6274,68 +6740,68 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6274
6740
|
__Pyx_XDECREF_SET(__pyx_v_region, __pyx_t_5);
|
|
6275
6741
|
__pyx_t_5 = 0;
|
|
6276
6742
|
|
|
6277
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6743
|
+
/* "cytriangle/cytriangle.pyx":231
|
|
6278
6744
|
* parsed_regions.append(
|
|
6279
6745
|
* {
|
|
6280
6746
|
* "vertex": [region[0], region[1]], # <<<<<<<<<<<<<<
|
|
6281
6747
|
* "marker": int(region[2]),
|
|
6282
6748
|
* "max_area": region[3],
|
|
6283
6749
|
*/
|
|
6284
|
-
__pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6750
|
+
__pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6285
6751
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6286
|
-
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_region, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6752
|
+
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_region, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6287
6753
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6288
|
-
__pyx_t_7 = __Pyx_GetItemInt(__pyx_v_region, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
6754
|
+
__pyx_t_7 = __Pyx_GetItemInt(__pyx_v_region, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6289
6755
|
__Pyx_GOTREF(__pyx_t_7);
|
|
6290
|
-
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
6756
|
+
__pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6291
6757
|
__Pyx_GOTREF(__pyx_t_8);
|
|
6292
6758
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
6293
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_6)) __PYX_ERR(0,
|
|
6759
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error);
|
|
6294
6760
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
6295
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0,
|
|
6761
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error);
|
|
6296
6762
|
__pyx_t_6 = 0;
|
|
6297
6763
|
__pyx_t_7 = 0;
|
|
6298
|
-
if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_vertex, __pyx_t_8) < 0) __PYX_ERR(0,
|
|
6764
|
+
if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_vertex, __pyx_t_8) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6299
6765
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
6300
6766
|
|
|
6301
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6767
|
+
/* "cytriangle/cytriangle.pyx":232
|
|
6302
6768
|
* {
|
|
6303
6769
|
* "vertex": [region[0], region[1]],
|
|
6304
6770
|
* "marker": int(region[2]), # <<<<<<<<<<<<<<
|
|
6305
6771
|
* "max_area": region[3],
|
|
6306
6772
|
* }
|
|
6307
6773
|
*/
|
|
6308
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_region, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
6774
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_region, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L1_error)
|
|
6309
6775
|
__Pyx_GOTREF(__pyx_t_8);
|
|
6310
|
-
__pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
6776
|
+
__pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
|
|
6311
6777
|
__Pyx_GOTREF(__pyx_t_7);
|
|
6312
6778
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
6313
|
-
if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_marker, __pyx_t_7) < 0) __PYX_ERR(0,
|
|
6779
|
+
if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_marker, __pyx_t_7) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6314
6780
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
6315
6781
|
|
|
6316
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6782
|
+
/* "cytriangle/cytriangle.pyx":233
|
|
6317
6783
|
* "vertex": [region[0], region[1]],
|
|
6318
6784
|
* "marker": int(region[2]),
|
|
6319
6785
|
* "max_area": region[3], # <<<<<<<<<<<<<<
|
|
6320
6786
|
* }
|
|
6321
6787
|
* )
|
|
6322
6788
|
*/
|
|
6323
|
-
__pyx_t_7 = __Pyx_GetItemInt(__pyx_v_region, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
6789
|
+
__pyx_t_7 = __Pyx_GetItemInt(__pyx_v_region, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error)
|
|
6324
6790
|
__Pyx_GOTREF(__pyx_t_7);
|
|
6325
|
-
if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_max_area, __pyx_t_7) < 0) __PYX_ERR(0,
|
|
6791
|
+
if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_max_area, __pyx_t_7) < 0) __PYX_ERR(0, 231, __pyx_L1_error)
|
|
6326
6792
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
6327
6793
|
|
|
6328
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6794
|
+
/* "cytriangle/cytriangle.pyx":229
|
|
6329
6795
|
* parsed_regions = []
|
|
6330
6796
|
* for region in raw_regions:
|
|
6331
6797
|
* parsed_regions.append( # <<<<<<<<<<<<<<
|
|
6332
6798
|
* {
|
|
6333
6799
|
* "vertex": [region[0], region[1]],
|
|
6334
6800
|
*/
|
|
6335
|
-
__pyx_t_9 = __Pyx_PyList_Append(__pyx_v_parsed_regions, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0,
|
|
6801
|
+
__pyx_t_9 = __Pyx_PyList_Append(__pyx_v_parsed_regions, __pyx_t_5); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 229, __pyx_L1_error)
|
|
6336
6802
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6337
6803
|
|
|
6338
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6804
|
+
/* "cytriangle/cytriangle.pyx":228
|
|
6339
6805
|
* raw_regions = input_dict["regions"]
|
|
6340
6806
|
* parsed_regions = []
|
|
6341
6807
|
* for region in raw_regions: # <<<<<<<<<<<<<<
|
|
@@ -6345,16 +6811,16 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6345
6811
|
}
|
|
6346
6812
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6347
6813
|
|
|
6348
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6814
|
+
/* "cytriangle/cytriangle.pyx":236
|
|
6349
6815
|
* }
|
|
6350
6816
|
* )
|
|
6351
6817
|
* input_dict["regions"] = parsed_regions # <<<<<<<<<<<<<<
|
|
6352
6818
|
* triangle_obj = CyTriangle(input_dict)
|
|
6353
6819
|
* triangle_obj.triangulate(flags)
|
|
6354
6820
|
*/
|
|
6355
|
-
if (unlikely((PyObject_SetItem(__pyx_v_input_dict, __pyx_n_u_regions, __pyx_v_parsed_regions) < 0))) __PYX_ERR(0,
|
|
6821
|
+
if (unlikely((PyObject_SetItem(__pyx_v_input_dict, __pyx_n_u_regions, __pyx_v_parsed_regions) < 0))) __PYX_ERR(0, 236, __pyx_L1_error)
|
|
6356
6822
|
|
|
6357
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6823
|
+
/* "cytriangle/cytriangle.pyx":225
|
|
6358
6824
|
* """
|
|
6359
6825
|
* # parse regions
|
|
6360
6826
|
* if "regions" in input_dict: # <<<<<<<<<<<<<<
|
|
@@ -6363,19 +6829,19 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6363
6829
|
*/
|
|
6364
6830
|
}
|
|
6365
6831
|
|
|
6366
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6832
|
+
/* "cytriangle/cytriangle.pyx":237
|
|
6367
6833
|
* )
|
|
6368
6834
|
* input_dict["regions"] = parsed_regions
|
|
6369
6835
|
* triangle_obj = CyTriangle(input_dict) # <<<<<<<<<<<<<<
|
|
6370
6836
|
* triangle_obj.triangulate(flags)
|
|
6371
6837
|
* return triangle_obj.out.to_dict(opt="np")
|
|
6372
6838
|
*/
|
|
6373
|
-
__pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle), __pyx_v_input_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6839
|
+
__pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle), __pyx_v_input_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
|
|
6374
6840
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6375
6841
|
__pyx_v_triangle_obj = ((struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *)__pyx_t_2);
|
|
6376
6842
|
__pyx_t_2 = 0;
|
|
6377
6843
|
|
|
6378
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6844
|
+
/* "cytriangle/cytriangle.pyx":238
|
|
6379
6845
|
* input_dict["regions"] = parsed_regions
|
|
6380
6846
|
* triangle_obj = CyTriangle(input_dict)
|
|
6381
6847
|
* triangle_obj.triangulate(flags) # <<<<<<<<<<<<<<
|
|
@@ -6383,25 +6849,25 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6383
6849
|
*/
|
|
6384
6850
|
__pyx_t_10.__pyx_n = 1;
|
|
6385
6851
|
__pyx_t_10.triflags = __pyx_v_flags;
|
|
6386
|
-
__pyx_t_2 = ((struct __pyx_vtabstruct_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_triangle_obj->__pyx_vtab)->triangulate(__pyx_v_triangle_obj, 0, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6852
|
+
__pyx_t_2 = ((struct __pyx_vtabstruct_10cytriangle_10cytriangle_CyTriangle *)__pyx_v_triangle_obj->__pyx_vtab)->triangulate(__pyx_v_triangle_obj, 0, &__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
|
|
6387
6853
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6388
6854
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6389
6855
|
|
|
6390
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6856
|
+
/* "cytriangle/cytriangle.pyx":239
|
|
6391
6857
|
* triangle_obj = CyTriangle(input_dict)
|
|
6392
6858
|
* triangle_obj.triangulate(flags)
|
|
6393
6859
|
* return triangle_obj.out.to_dict(opt="np") # <<<<<<<<<<<<<<
|
|
6394
6860
|
*/
|
|
6395
6861
|
__Pyx_XDECREF(__pyx_r);
|
|
6396
|
-
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangle_obj), __pyx_n_s_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6862
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangle_obj), __pyx_n_s_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
|
|
6397
6863
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6398
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6864
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error)
|
|
6399
6865
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6400
6866
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6401
|
-
__pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6867
|
+
__pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
|
|
6402
6868
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6403
|
-
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_opt, __pyx_n_u_np) < 0) __PYX_ERR(0,
|
|
6404
|
-
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
6869
|
+
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_opt, __pyx_n_u_np) < 0) __PYX_ERR(0, 239, __pyx_L1_error)
|
|
6870
|
+
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error)
|
|
6405
6871
|
__Pyx_GOTREF(__pyx_t_7);
|
|
6406
6872
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6407
6873
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -6409,8 +6875,8 @@ static PyObject *__pyx_pf_10cytriangle_10cytriangle_triangulate(CYTHON_UNUSED Py
|
|
|
6409
6875
|
__pyx_t_7 = 0;
|
|
6410
6876
|
goto __pyx_L0;
|
|
6411
6877
|
|
|
6412
|
-
/* "cytriangle/cytriangle.pyx":
|
|
6413
|
-
*
|
|
6878
|
+
/* "cytriangle/cytriangle.pyx":185
|
|
6879
|
+
*
|
|
6414
6880
|
*
|
|
6415
6881
|
* def triangulate(input_dict, flags): # <<<<<<<<<<<<<<
|
|
6416
6882
|
* """
|
|
@@ -7144,21 +7610,20 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
|
|
|
7144
7610
|
{&__pyx_kp_u_Delaunay_triangulation_and_gener, __pyx_k_Delaunay_triangulation_and_gener, sizeof(__pyx_k_Delaunay_triangulation_and_gener), 0, 1, 0, 0},
|
|
7145
7611
|
{&__pyx_kp_u_Delaunay_triangulation_failed, __pyx_k_Delaunay_triangulation_failed, sizeof(__pyx_k_Delaunay_triangulation_failed), 0, 1, 0, 0},
|
|
7146
7612
|
{&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
|
|
7613
|
+
{&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
|
|
7147
7614
|
{&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
|
|
7148
|
-
{&
|
|
7149
|
-
{&__pyx_n_u_Qz, __pyx_k_Qz, sizeof(__pyx_k_Qz), 0, 1, 0, 1},
|
|
7150
|
-
{&__pyx_n_b_Qzc, __pyx_k_Qzc, sizeof(__pyx_k_Qzc), 0, 0, 0, 1},
|
|
7151
|
-
{&__pyx_n_b_Qzv, __pyx_k_Qzv, sizeof(__pyx_k_Qzv), 0, 0, 0, 1},
|
|
7615
|
+
{&__pyx_n_u_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 1, 0, 1},
|
|
7152
7616
|
{&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
|
|
7153
7617
|
{&__pyx_kp_u_Segment_list_must_be_provided_wh, __pyx_k_Segment_list_must_be_provided_wh, sizeof(__pyx_k_Segment_list_must_be_provided_wh), 0, 1, 0, 0},
|
|
7154
7618
|
{&__pyx_kp_u_Triangle_list_must_be_provided_w, __pyx_k_Triangle_list_must_be_provided_w, sizeof(__pyx_k_Triangle_list_must_be_provided_w), 0, 1, 0, 0},
|
|
7155
7619
|
{&__pyx_kp_u_Triangulation_failed, __pyx_k_Triangulation_failed, sizeof(__pyx_k_Triangulation_failed), 0, 1, 0, 0},
|
|
7620
|
+
{&__pyx_n_u_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 1, 0, 1},
|
|
7156
7621
|
{&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
|
|
7157
7622
|
{&__pyx_kp_u_When_using_a_flag_for_area_const, __pyx_k_When_using_a_flag_for_area_const, sizeof(__pyx_k_When_using_a_flag_for_area_const), 0, 1, 0, 0},
|
|
7158
7623
|
{&__pyx_kp_u_When_using_q_flag_for_minimum_an, __pyx_k_When_using_q_flag_for_minimum_an, sizeof(__pyx_k_When_using_q_flag_for_minimum_an), 0, 1, 0, 0},
|
|
7159
7624
|
{&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
|
|
7160
7625
|
{&__pyx_n_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 1},
|
|
7161
|
-
{&
|
|
7626
|
+
{&__pyx_n_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 1},
|
|
7162
7627
|
{&__pyx_n_u_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 1, 0, 1},
|
|
7163
7628
|
{&__pyx_kp_u_a_d_d, __pyx_k_a_d_d, sizeof(__pyx_k_a_d_d), 0, 1, 0, 0},
|
|
7164
7629
|
{&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
|
|
@@ -7178,7 +7643,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
|
|
|
7178
7643
|
{&__pyx_n_s_input_dict, __pyx_k_input_dict, sizeof(__pyx_k_input_dict), 0, 0, 1, 1},
|
|
7179
7644
|
{&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
|
|
7180
7645
|
{&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
|
|
7181
|
-
{&__pyx_n_s_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 0, 0, 1, 1},
|
|
7182
7646
|
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
|
|
7183
7647
|
{&__pyx_n_u_marker, __pyx_k_marker, sizeof(__pyx_k_marker), 0, 1, 0, 1},
|
|
7184
7648
|
{&__pyx_n_u_max_area, __pyx_k_max_area, sizeof(__pyx_k_max_area), 0, 1, 0, 1},
|
|
@@ -7188,7 +7652,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
|
|
|
7188
7652
|
{&__pyx_n_s_opt, __pyx_k_opt, sizeof(__pyx_k_opt), 0, 0, 1, 1},
|
|
7189
7653
|
{&__pyx_n_s_opts, __pyx_k_opts, sizeof(__pyx_k_opts), 0, 0, 1, 1},
|
|
7190
7654
|
{&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
|
|
7191
|
-
{&__pyx_n_u_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 1, 0, 1},
|
|
7192
7655
|
{&__pyx_n_s_output_dict, __pyx_k_output_dict, sizeof(__pyx_k_output_dict), 0, 0, 1, 1},
|
|
7193
7656
|
{&__pyx_n_u_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 1, 0, 1},
|
|
7194
7657
|
{&__pyx_n_s_parsed_regions, __pyx_k_parsed_regions, sizeof(__pyx_k_parsed_regions), 0, 0, 1, 1},
|
|
@@ -7229,17 +7692,21 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
|
|
|
7229
7692
|
{&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
|
|
7230
7693
|
{&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
|
|
7231
7694
|
{&__pyx_n_s_validate_input_flags, __pyx_k_validate_input_flags, sizeof(__pyx_k_validate_input_flags), 0, 0, 1, 1},
|
|
7695
|
+
{&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
|
|
7232
7696
|
{&__pyx_n_u_vertex, __pyx_k_vertex, sizeof(__pyx_k_vertex), 0, 1, 0, 1},
|
|
7233
7697
|
{&__pyx_n_s_voronoi, __pyx_k_voronoi, sizeof(__pyx_k_voronoi), 0, 0, 1, 1},
|
|
7234
7698
|
{&__pyx_n_s_voronoi_dict, __pyx_k_voronoi_dict, sizeof(__pyx_k_voronoi_dict), 0, 0, 1, 1},
|
|
7699
|
+
{&__pyx_n_u_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 1, 0, 1},
|
|
7700
|
+
{&__pyx_n_u_zc, __pyx_k_zc, sizeof(__pyx_k_zc), 0, 1, 0, 1},
|
|
7701
|
+
{&__pyx_n_u_zv, __pyx_k_zv, sizeof(__pyx_k_zv), 0, 1, 0, 1},
|
|
7235
7702
|
{0, 0, 0, 0, 0, 0, 0}
|
|
7236
7703
|
};
|
|
7237
7704
|
return __Pyx_InitStrings(__pyx_string_tab);
|
|
7238
7705
|
}
|
|
7239
7706
|
/* #### Code section: cached_builtins ### */
|
|
7240
7707
|
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
|
|
7241
|
-
__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0,
|
|
7242
|
-
__pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0,
|
|
7708
|
+
__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 78, __pyx_L1_error)
|
|
7709
|
+
__pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 129, __pyx_L1_error)
|
|
7243
7710
|
return 0;
|
|
7244
7711
|
__pyx_L1_error:;
|
|
7245
7712
|
return -1;
|
|
@@ -7250,91 +7717,91 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|
|
7250
7717
|
__Pyx_RefNannyDeclarations
|
|
7251
7718
|
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
|
|
7252
7719
|
|
|
7253
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7720
|
+
/* "cytriangle/cytriangle.pyx":78
|
|
7254
7721
|
* if "r" in opts:
|
|
7255
|
-
* if
|
|
7722
|
+
* if 'triangles' not in self._in.to_dict():
|
|
7256
7723
|
* raise ValueError("Triangle list must be provided when using 'r' flag") # <<<<<<<<<<<<<<
|
|
7257
7724
|
* if "p" in opts:
|
|
7258
|
-
* if
|
|
7725
|
+
* if 'segments' not in self._in.to_dict():
|
|
7259
7726
|
*/
|
|
7260
|
-
__pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Triangle_list_must_be_provided_w); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0,
|
|
7727
|
+
__pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Triangle_list_must_be_provided_w); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 78, __pyx_L1_error)
|
|
7261
7728
|
__Pyx_GOTREF(__pyx_tuple__2);
|
|
7262
7729
|
__Pyx_GIVEREF(__pyx_tuple__2);
|
|
7263
7730
|
|
|
7264
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7731
|
+
/* "cytriangle/cytriangle.pyx":81
|
|
7265
7732
|
* if "p" in opts:
|
|
7266
|
-
* if
|
|
7733
|
+
* if 'segments' not in self._in.to_dict():
|
|
7267
7734
|
* raise ValueError("Segment list must be provided when using 'p' flag") # <<<<<<<<<<<<<<
|
|
7268
7735
|
* if "a" in opts:
|
|
7269
7736
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
7270
7737
|
*/
|
|
7271
|
-
__pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Segment_list_must_be_provided_wh); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0,
|
|
7738
|
+
__pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Segment_list_must_be_provided_wh); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 81, __pyx_L1_error)
|
|
7272
7739
|
__Pyx_GOTREF(__pyx_tuple__3);
|
|
7273
7740
|
__Pyx_GIVEREF(__pyx_tuple__3);
|
|
7274
7741
|
|
|
7275
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7742
|
+
/* "cytriangle/cytriangle.pyx":85
|
|
7276
7743
|
* if not ('triangle_max_area' in self._in.to_dict() or 'A'
|
|
7277
|
-
* in opts or bool(re.search('a[\d.*.]+\d.*', opts))):
|
|
7278
|
-
* raise ValueError(
|
|
7744
|
+
* in opts or bool(re.search(r'a[\d.*.]+\d.*', opts))):
|
|
7745
|
+
* raise ValueError("""When using 'a' flag for area constraints, a global # <<<<<<<<<<<<<<
|
|
7279
7746
|
* area flag (e.g. a0.2), 'A' flag, or local triangle area
|
|
7280
7747
|
* constraint list (e.g. [3.0, 1.0]) must be provided""")
|
|
7281
7748
|
*/
|
|
7282
|
-
__pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_When_using_a_flag_for_area_const); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0,
|
|
7749
|
+
__pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_When_using_a_flag_for_area_const); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 85, __pyx_L1_error)
|
|
7283
7750
|
__Pyx_GOTREF(__pyx_tuple__4);
|
|
7284
7751
|
__Pyx_GIVEREF(__pyx_tuple__4);
|
|
7285
7752
|
|
|
7286
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7753
|
+
/* "cytriangle/cytriangle.pyx":90
|
|
7287
7754
|
* if "q" in opts:
|
|
7288
|
-
* if not bool(re.search('q[\d.*.]+\d.*', opts)):
|
|
7289
|
-
* raise ValueError("When using 'q' flag for minimum angles, an angle
|
|
7755
|
+
* if not bool(re.search(r'q[\d.*.]+\d.*', opts)):
|
|
7756
|
+
* raise ValueError("""When using 'q' flag for minimum angles, an angle # <<<<<<<<<<<<<<
|
|
7757
|
+
* must be provided""")
|
|
7290
7758
|
*
|
|
7291
|
-
* # generic triangulation that accepts any switch
|
|
7292
7759
|
*/
|
|
7293
|
-
__pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_When_using_q_flag_for_minimum_an); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0,
|
|
7760
|
+
__pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_When_using_q_flag_for_minimum_an); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 90, __pyx_L1_error)
|
|
7294
7761
|
__Pyx_GOTREF(__pyx_tuple__5);
|
|
7295
7762
|
__Pyx_GIVEREF(__pyx_tuple__5);
|
|
7296
7763
|
|
|
7297
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7298
|
-
* opts
|
|
7299
|
-
*
|
|
7764
|
+
/* "cytriangle/cytriangle.pyx":129
|
|
7765
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
7766
|
+
* is not None:
|
|
7300
7767
|
* raise RuntimeError('Triangulation failed') # <<<<<<<<<<<<<<
|
|
7301
7768
|
* return self.out
|
|
7302
7769
|
*
|
|
7303
7770
|
*/
|
|
7304
|
-
__pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Triangulation_failed); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0,
|
|
7771
|
+
__pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Triangulation_failed); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 129, __pyx_L1_error)
|
|
7305
7772
|
__Pyx_GOTREF(__pyx_tuple__6);
|
|
7306
7773
|
__Pyx_GIVEREF(__pyx_tuple__6);
|
|
7307
7774
|
|
|
7308
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7309
|
-
* opts
|
|
7310
|
-
*
|
|
7775
|
+
/* "cytriangle/cytriangle.pyx":145
|
|
7776
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
7777
|
+
* is not None:
|
|
7311
7778
|
* raise RuntimeError('Delaunay triangulation failed') # <<<<<<<<<<<<<<
|
|
7312
7779
|
* return self.out
|
|
7313
7780
|
*
|
|
7314
7781
|
*/
|
|
7315
|
-
__pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Delaunay_triangulation_failed); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0,
|
|
7782
|
+
__pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Delaunay_triangulation_failed); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 145, __pyx_L1_error)
|
|
7316
7783
|
__Pyx_GOTREF(__pyx_tuple__7);
|
|
7317
7784
|
__Pyx_GIVEREF(__pyx_tuple__7);
|
|
7318
7785
|
|
|
7319
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7320
|
-
* opts
|
|
7321
|
-
*
|
|
7322
|
-
* raise RuntimeError(
|
|
7786
|
+
/* "cytriangle/cytriangle.pyx":162
|
|
7787
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
7788
|
+
* is not None:
|
|
7789
|
+
* raise RuntimeError("""Delaunay triangulation and convex hull # <<<<<<<<<<<<<<
|
|
7790
|
+
* construction failed""")
|
|
7323
7791
|
* return self.out
|
|
7324
|
-
*
|
|
7325
7792
|
*/
|
|
7326
|
-
__pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Delaunay_triangulation_and_conve); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0,
|
|
7793
|
+
__pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Delaunay_triangulation_and_conve); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 162, __pyx_L1_error)
|
|
7327
7794
|
__Pyx_GOTREF(__pyx_tuple__8);
|
|
7328
7795
|
__Pyx_GIVEREF(__pyx_tuple__8);
|
|
7329
7796
|
|
|
7330
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7331
|
-
* opts
|
|
7332
|
-
*
|
|
7333
|
-
* raise RuntimeError(
|
|
7797
|
+
/* "cytriangle/cytriangle.pyx":180
|
|
7798
|
+
* if ctriangulate(opts, self._in._io, self._out._io, self._vorout._io) \
|
|
7799
|
+
* is not None:
|
|
7800
|
+
* raise RuntimeError("""Delaunay triangulation and generation of # <<<<<<<<<<<<<<
|
|
7801
|
+
* voronoi diagram failed""")
|
|
7334
7802
|
* return self.out
|
|
7335
|
-
*
|
|
7336
7803
|
*/
|
|
7337
|
-
__pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Delaunay_triangulation_and_gener); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0,
|
|
7804
|
+
__pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Delaunay_triangulation_and_gener); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 180, __pyx_L1_error)
|
|
7338
7805
|
__Pyx_GOTREF(__pyx_tuple__9);
|
|
7339
7806
|
__Pyx_GIVEREF(__pyx_tuple__9);
|
|
7340
7807
|
|
|
@@ -7349,105 +7816,114 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|
|
7349
7816
|
__Pyx_GOTREF(__pyx_tuple__10);
|
|
7350
7817
|
__Pyx_GIVEREF(__pyx_tuple__10);
|
|
7351
7818
|
|
|
7352
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7819
|
+
/* "cytriangle/cytriangle.pyx":66
|
|
7353
7820
|
* return self._vorout
|
|
7354
7821
|
*
|
|
7355
7822
|
* def input_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
7356
7823
|
* return self._in.to_dict(opt)
|
|
7357
7824
|
*
|
|
7358
7825
|
*/
|
|
7359
|
-
__pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0,
|
|
7826
|
+
__pyx_tuple__13 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_opt); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 66, __pyx_L1_error)
|
|
7360
7827
|
__Pyx_GOTREF(__pyx_tuple__13);
|
|
7361
7828
|
__Pyx_GIVEREF(__pyx_tuple__13);
|
|
7362
|
-
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_input_dict,
|
|
7363
|
-
__pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0,
|
|
7829
|
+
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_input_dict, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 66, __pyx_L1_error)
|
|
7830
|
+
__pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 66, __pyx_L1_error)
|
|
7364
7831
|
__Pyx_GOTREF(__pyx_tuple__15);
|
|
7365
7832
|
__Pyx_GIVEREF(__pyx_tuple__15);
|
|
7366
7833
|
|
|
7367
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7834
|
+
/* "cytriangle/cytriangle.pyx":69
|
|
7368
7835
|
* return self._in.to_dict(opt)
|
|
7369
7836
|
*
|
|
7370
7837
|
* def output_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
7371
7838
|
* return self._out.to_dict(opt)
|
|
7372
7839
|
*
|
|
7373
7840
|
*/
|
|
7374
|
-
__pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_output_dict,
|
|
7841
|
+
__pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_output_dict, 69, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 69, __pyx_L1_error)
|
|
7375
7842
|
|
|
7376
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7843
|
+
/* "cytriangle/cytriangle.pyx":72
|
|
7377
7844
|
* return self._out.to_dict(opt)
|
|
7378
7845
|
*
|
|
7379
7846
|
* def voronoi_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
7380
7847
|
* return self._vorout.to_dict(opt)
|
|
7381
7848
|
*
|
|
7382
7849
|
*/
|
|
7383
|
-
__pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_voronoi_dict,
|
|
7850
|
+
__pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_voronoi_dict, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 72, __pyx_L1_error)
|
|
7384
7851
|
|
|
7385
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7852
|
+
/* "cytriangle/cytriangle.pyx":75
|
|
7386
7853
|
* return self._vorout.to_dict(opt)
|
|
7387
7854
|
*
|
|
7388
7855
|
* def validate_input_flags(self, opts): # <<<<<<<<<<<<<<
|
|
7389
7856
|
* if "r" in opts:
|
|
7390
|
-
* if
|
|
7857
|
+
* if 'triangles' not in self._in.to_dict():
|
|
7391
7858
|
*/
|
|
7392
|
-
__pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0,
|
|
7859
|
+
__pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_opts); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 75, __pyx_L1_error)
|
|
7393
7860
|
__Pyx_GOTREF(__pyx_tuple__18);
|
|
7394
7861
|
__Pyx_GIVEREF(__pyx_tuple__18);
|
|
7395
|
-
__pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_validate_input_flags,
|
|
7862
|
+
__pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_validate_input_flags, 75, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 75, __pyx_L1_error)
|
|
7396
7863
|
|
|
7397
7864
|
/* "cytriangle/cytriangle.pyx":94
|
|
7398
7865
|
*
|
|
7399
7866
|
* # generic triangulation that accepts any switch
|
|
7400
|
-
* cpdef triangulate(self, triflags=''): # <<<<<<<<<<<<<<
|
|
7867
|
+
* cpdef triangulate(self, triflags='', verbose=False): # <<<<<<<<<<<<<<
|
|
7401
7868
|
* """
|
|
7402
7869
|
* Runs the main triangulation method on the in_ object with any additional
|
|
7403
7870
|
*/
|
|
7404
|
-
__pyx_tuple__20 = PyTuple_Pack(
|
|
7871
|
+
__pyx_tuple__20 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_triflags, __pyx_n_s_verbose); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 94, __pyx_L1_error)
|
|
7405
7872
|
__Pyx_GOTREF(__pyx_tuple__20);
|
|
7406
7873
|
__Pyx_GIVEREF(__pyx_tuple__20);
|
|
7407
|
-
__pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(
|
|
7408
|
-
__pyx_tuple__22 = PyTuple_Pack(
|
|
7874
|
+
__pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_triangulate, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 94, __pyx_L1_error)
|
|
7875
|
+
__pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_u_, Py_False); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 94, __pyx_L1_error)
|
|
7409
7876
|
__Pyx_GOTREF(__pyx_tuple__22);
|
|
7410
7877
|
__Pyx_GIVEREF(__pyx_tuple__22);
|
|
7411
7878
|
|
|
7412
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7879
|
+
/* "cytriangle/cytriangle.pyx":132
|
|
7413
7880
|
* return self.out
|
|
7414
7881
|
*
|
|
7415
|
-
* cpdef delaunay(self): # <<<<<<<<<<<<<<
|
|
7882
|
+
* cpdef delaunay(self, verbose=False): # <<<<<<<<<<<<<<
|
|
7416
7883
|
* """
|
|
7417
|
-
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
7884
|
+
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
7418
7885
|
*/
|
|
7419
|
-
__pyx_tuple__23 = PyTuple_Pack(
|
|
7886
|
+
__pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_verbose); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
7420
7887
|
__Pyx_GOTREF(__pyx_tuple__23);
|
|
7421
7888
|
__Pyx_GIVEREF(__pyx_tuple__23);
|
|
7422
|
-
__pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(
|
|
7889
|
+
__pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_delaunay, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
7890
|
+
__pyx_tuple__25 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
7891
|
+
__Pyx_GOTREF(__pyx_tuple__25);
|
|
7892
|
+
__Pyx_GIVEREF(__pyx_tuple__25);
|
|
7423
7893
|
|
|
7424
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7894
|
+
/* "cytriangle/cytriangle.pyx":148
|
|
7425
7895
|
* return self.out
|
|
7426
7896
|
*
|
|
7427
|
-
* cpdef convex_hull(self): # <<<<<<<<<<<<<<
|
|
7897
|
+
* cpdef convex_hull(self, verbose=False): # <<<<<<<<<<<<<<
|
|
7428
7898
|
* """
|
|
7429
7899
|
* Run the main triangulation method on the in_ object with -Qzc flags enabled.
|
|
7430
7900
|
*/
|
|
7431
|
-
|
|
7901
|
+
__pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_convex_hull, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
7902
|
+
__pyx_tuple__27 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
7903
|
+
__Pyx_GOTREF(__pyx_tuple__27);
|
|
7904
|
+
__Pyx_GIVEREF(__pyx_tuple__27);
|
|
7432
7905
|
|
|
7433
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7906
|
+
/* "cytriangle/cytriangle.pyx":166
|
|
7434
7907
|
* return self.out
|
|
7435
7908
|
*
|
|
7436
|
-
* cpdef voronoi(self): # <<<<<<<<<<<<<<
|
|
7909
|
+
* cpdef voronoi(self, verbose=False): # <<<<<<<<<<<<<<
|
|
7437
7910
|
* """
|
|
7438
7911
|
* Run the main triangulation method on the in_ object with -Qzv flags enabled.
|
|
7439
7912
|
*/
|
|
7440
|
-
|
|
7913
|
+
__pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_voronoi, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
7914
|
+
__pyx_tuple__29 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
7915
|
+
__Pyx_GOTREF(__pyx_tuple__29);
|
|
7916
|
+
__Pyx_GIVEREF(__pyx_tuple__29);
|
|
7441
7917
|
|
|
7442
7918
|
/* "(tree fragment)":1
|
|
7443
7919
|
* def __reduce_cython__(self): # <<<<<<<<<<<<<<
|
|
7444
7920
|
* cdef tuple state
|
|
7445
7921
|
* cdef object _dict
|
|
7446
7922
|
*/
|
|
7447
|
-
|
|
7448
|
-
__Pyx_GOTREF(
|
|
7449
|
-
__Pyx_GIVEREF(
|
|
7450
|
-
|
|
7923
|
+
__pyx_tuple__30 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_dict_2, __pyx_n_s_use_setstate); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
7924
|
+
__Pyx_GOTREF(__pyx_tuple__30);
|
|
7925
|
+
__Pyx_GIVEREF(__pyx_tuple__30);
|
|
7926
|
+
__pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
7451
7927
|
|
|
7452
7928
|
/* "(tree fragment)":16
|
|
7453
7929
|
* else:
|
|
@@ -7455,32 +7931,32 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|
|
7455
7931
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
7456
7932
|
* __pyx_unpickle_CyTriangle__set_state(self, __pyx_state)
|
|
7457
7933
|
*/
|
|
7458
|
-
|
|
7459
|
-
__Pyx_GOTREF(
|
|
7460
|
-
__Pyx_GIVEREF(
|
|
7461
|
-
|
|
7934
|
+
__pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 16, __pyx_L1_error)
|
|
7935
|
+
__Pyx_GOTREF(__pyx_tuple__32);
|
|
7936
|
+
__Pyx_GIVEREF(__pyx_tuple__32);
|
|
7937
|
+
__pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 16, __pyx_L1_error)
|
|
7462
7938
|
|
|
7463
|
-
/* "cytriangle/cytriangle.pyx":
|
|
7464
|
-
*
|
|
7939
|
+
/* "cytriangle/cytriangle.pyx":185
|
|
7940
|
+
*
|
|
7465
7941
|
*
|
|
7466
7942
|
* def triangulate(input_dict, flags): # <<<<<<<<<<<<<<
|
|
7467
7943
|
* """
|
|
7468
7944
|
* Triangulates an input dict with the following properties:
|
|
7469
7945
|
*/
|
|
7470
|
-
|
|
7471
|
-
__Pyx_GOTREF(
|
|
7472
|
-
__Pyx_GIVEREF(
|
|
7473
|
-
|
|
7946
|
+
__pyx_tuple__34 = PyTuple_Pack(6, __pyx_n_s_input_dict, __pyx_n_s_flags, __pyx_n_s_raw_regions, __pyx_n_s_parsed_regions, __pyx_n_s_region, __pyx_n_s_triangle_obj); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 185, __pyx_L1_error)
|
|
7947
|
+
__Pyx_GOTREF(__pyx_tuple__34);
|
|
7948
|
+
__Pyx_GIVEREF(__pyx_tuple__34);
|
|
7949
|
+
__pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_cytriangle_cytriangle_pyx, __pyx_n_s_triangulate, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 185, __pyx_L1_error)
|
|
7474
7950
|
|
|
7475
7951
|
/* "(tree fragment)":1
|
|
7476
7952
|
* def __pyx_unpickle_CyTriangle(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
|
|
7477
7953
|
* cdef object __pyx_PickleError
|
|
7478
7954
|
* cdef object __pyx_result
|
|
7479
7955
|
*/
|
|
7480
|
-
|
|
7481
|
-
__Pyx_GOTREF(
|
|
7482
|
-
__Pyx_GIVEREF(
|
|
7483
|
-
|
|
7956
|
+
__pyx_tuple__36 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
7957
|
+
__Pyx_GOTREF(__pyx_tuple__36);
|
|
7958
|
+
__Pyx_GIVEREF(__pyx_tuple__36);
|
|
7959
|
+
__pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CyTriangle, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
7484
7960
|
__Pyx_RefNannyFinishContext();
|
|
7485
7961
|
return 0;
|
|
7486
7962
|
__pyx_L1_error:;
|
|
@@ -7546,19 +8022,19 @@ static int __Pyx_modinit_type_init_code(void) {
|
|
|
7546
8022
|
/*--- Type init code ---*/
|
|
7547
8023
|
__pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle = &__pyx_vtable_10cytriangle_10cytriangle_CyTriangle;
|
|
7548
8024
|
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.triangulate = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_triangulate *__pyx_optional_args))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_triangulate;
|
|
7549
|
-
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.delaunay = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay;
|
|
7550
|
-
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.convex_hull = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull;
|
|
7551
|
-
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.voronoi = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi;
|
|
8025
|
+
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.delaunay = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_delaunay *__pyx_optional_args))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_delaunay;
|
|
8026
|
+
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.convex_hull = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_convex_hull *__pyx_optional_args))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_convex_hull;
|
|
8027
|
+
__pyx_vtable_10cytriangle_10cytriangle_CyTriangle.voronoi = (PyObject *(*)(struct __pyx_obj_10cytriangle_10cytriangle_CyTriangle *, int __pyx_skip_dispatch, struct __pyx_opt_args_10cytriangle_10cytriangle_10CyTriangle_voronoi *__pyx_optional_args))__pyx_f_10cytriangle_10cytriangle_10CyTriangle_voronoi;
|
|
7552
8028
|
#if CYTHON_USE_TYPE_SPECS
|
|
7553
|
-
__pyx_ptype_10cytriangle_10cytriangle_CyTriangle = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10cytriangle_10cytriangle_CyTriangle_spec, NULL); if (unlikely(!__pyx_ptype_10cytriangle_10cytriangle_CyTriangle)) __PYX_ERR(0,
|
|
7554
|
-
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10cytriangle_10cytriangle_CyTriangle_spec, __pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0,
|
|
8029
|
+
__pyx_ptype_10cytriangle_10cytriangle_CyTriangle = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10cytriangle_10cytriangle_CyTriangle_spec, NULL); if (unlikely(!__pyx_ptype_10cytriangle_10cytriangle_CyTriangle)) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
8030
|
+
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10cytriangle_10cytriangle_CyTriangle_spec, __pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
7555
8031
|
#else
|
|
7556
8032
|
__pyx_ptype_10cytriangle_10cytriangle_CyTriangle = &__pyx_type_10cytriangle_10cytriangle_CyTriangle;
|
|
7557
8033
|
#endif
|
|
7558
8034
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7559
8035
|
#endif
|
|
7560
8036
|
#if !CYTHON_USE_TYPE_SPECS
|
|
7561
|
-
if (__Pyx_PyType_Ready(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0,
|
|
8037
|
+
if (__Pyx_PyType_Ready(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
7562
8038
|
#endif
|
|
7563
8039
|
#if PY_MAJOR_VERSION < 3
|
|
7564
8040
|
__pyx_ptype_10cytriangle_10cytriangle_CyTriangle->tp_print = 0;
|
|
@@ -7568,13 +8044,13 @@ static int __Pyx_modinit_type_init_code(void) {
|
|
|
7568
8044
|
__pyx_ptype_10cytriangle_10cytriangle_CyTriangle->tp_getattro = __Pyx_PyObject_GenericGetAttr;
|
|
7569
8045
|
}
|
|
7570
8046
|
#endif
|
|
7571
|
-
if (__Pyx_SetVtable(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0,
|
|
8047
|
+
if (__Pyx_SetVtable(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_vtabptr_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
7572
8048
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7573
|
-
if (__Pyx_MergeVtables(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0,
|
|
8049
|
+
if (__Pyx_MergeVtables(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
7574
8050
|
#endif
|
|
7575
|
-
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyTriangle, (PyObject *) __pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0,
|
|
8051
|
+
if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyTriangle, (PyObject *) __pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
7576
8052
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7577
|
-
if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0,
|
|
8053
|
+
if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_10cytriangle_10cytriangle_CyTriangle) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
|
|
7578
8054
|
#endif
|
|
7579
8055
|
__Pyx_RefNannyFinishContext();
|
|
7580
8056
|
return 0;
|
|
@@ -7897,77 +8373,77 @@ if (!__Pyx_RefNanny) {
|
|
|
7897
8373
|
if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7898
8374
|
#endif
|
|
7899
8375
|
|
|
7900
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8376
|
+
/* "cytriangle/cytriangle.pyx":3
|
|
7901
8377
|
* from cytriangle.ctriangle cimport triangulate as ctriangulate
|
|
7902
8378
|
* from cytriangle.cytriangleio cimport TriangleIO
|
|
7903
8379
|
* import re # <<<<<<<<<<<<<<
|
|
7904
8380
|
*
|
|
7905
8381
|
* cdef class CyTriangle:
|
|
7906
8382
|
*/
|
|
7907
|
-
__pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
8383
|
+
__pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
|
|
7908
8384
|
__Pyx_GOTREF(__pyx_t_2);
|
|
7909
|
-
if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(0,
|
|
8385
|
+
if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
|
|
7910
8386
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7911
8387
|
|
|
7912
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8388
|
+
/* "cytriangle/cytriangle.pyx":66
|
|
7913
8389
|
* return self._vorout
|
|
7914
8390
|
*
|
|
7915
8391
|
* def input_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
7916
8392
|
* return self._in.to_dict(opt)
|
|
7917
8393
|
*
|
|
7918
8394
|
*/
|
|
7919
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_3input_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_input_dict, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
8395
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_3input_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_input_dict, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
|
|
7920
8396
|
__Pyx_GOTREF(__pyx_t_2);
|
|
7921
8397
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__15);
|
|
7922
|
-
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_input_dict, __pyx_t_2) < 0) __PYX_ERR(0,
|
|
8398
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_input_dict, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
|
|
7923
8399
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7924
8400
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
7925
8401
|
|
|
7926
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8402
|
+
/* "cytriangle/cytriangle.pyx":69
|
|
7927
8403
|
* return self._in.to_dict(opt)
|
|
7928
8404
|
*
|
|
7929
8405
|
* def output_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
7930
8406
|
* return self._out.to_dict(opt)
|
|
7931
8407
|
*
|
|
7932
8408
|
*/
|
|
7933
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_5output_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_output_dict, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
8409
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_5output_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_output_dict, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
|
|
7934
8410
|
__Pyx_GOTREF(__pyx_t_2);
|
|
7935
8411
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__15);
|
|
7936
|
-
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_output_dict, __pyx_t_2) < 0) __PYX_ERR(0,
|
|
8412
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_output_dict, __pyx_t_2) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
|
|
7937
8413
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7938
8414
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
7939
8415
|
|
|
7940
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8416
|
+
/* "cytriangle/cytriangle.pyx":72
|
|
7941
8417
|
* return self._out.to_dict(opt)
|
|
7942
8418
|
*
|
|
7943
8419
|
* def voronoi_dict(self, opt=''): # <<<<<<<<<<<<<<
|
|
7944
8420
|
* return self._vorout.to_dict(opt)
|
|
7945
8421
|
*
|
|
7946
8422
|
*/
|
|
7947
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_7voronoi_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_voronoi_dict, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
8423
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_7voronoi_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_voronoi_dict, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
|
|
7948
8424
|
__Pyx_GOTREF(__pyx_t_2);
|
|
7949
8425
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__15);
|
|
7950
|
-
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_voronoi_dict, __pyx_t_2) < 0) __PYX_ERR(0,
|
|
8426
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_voronoi_dict, __pyx_t_2) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
|
|
7951
8427
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7952
8428
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
7953
8429
|
|
|
7954
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8430
|
+
/* "cytriangle/cytriangle.pyx":75
|
|
7955
8431
|
* return self._vorout.to_dict(opt)
|
|
7956
8432
|
*
|
|
7957
8433
|
* def validate_input_flags(self, opts): # <<<<<<<<<<<<<<
|
|
7958
8434
|
* if "r" in opts:
|
|
7959
|
-
* if
|
|
8435
|
+
* if 'triangles' not in self._in.to_dict():
|
|
7960
8436
|
*/
|
|
7961
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_9validate_input_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_validate_input_flags, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
8437
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_9validate_input_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_validate_input_flags, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
|
|
7962
8438
|
__Pyx_GOTREF(__pyx_t_2);
|
|
7963
|
-
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_validate_input_flags, __pyx_t_2) < 0) __PYX_ERR(0,
|
|
8439
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_validate_input_flags, __pyx_t_2) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
|
|
7964
8440
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7965
8441
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
7966
8442
|
|
|
7967
8443
|
/* "cytriangle/cytriangle.pyx":94
|
|
7968
8444
|
*
|
|
7969
8445
|
* # generic triangulation that accepts any switch
|
|
7970
|
-
* cpdef triangulate(self, triflags=''): # <<<<<<<<<<<<<<
|
|
8446
|
+
* cpdef triangulate(self, triflags='', verbose=False): # <<<<<<<<<<<<<<
|
|
7971
8447
|
* """
|
|
7972
8448
|
* Runs the main triangulation method on the in_ object with any additional
|
|
7973
8449
|
*/
|
|
@@ -7978,42 +8454,45 @@ if (!__Pyx_RefNanny) {
|
|
|
7978
8454
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7979
8455
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
7980
8456
|
|
|
7981
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8457
|
+
/* "cytriangle/cytriangle.pyx":132
|
|
7982
8458
|
* return self.out
|
|
7983
8459
|
*
|
|
7984
|
-
* cpdef delaunay(self): # <<<<<<<<<<<<<<
|
|
8460
|
+
* cpdef delaunay(self, verbose=False): # <<<<<<<<<<<<<<
|
|
7985
8461
|
* """
|
|
7986
|
-
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
8462
|
+
* Run the main triangulation method on the in_ object with *only* -Qz
|
|
7987
8463
|
*/
|
|
7988
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_13delaunay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_delaunay, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
8464
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_13delaunay, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_delaunay, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
7989
8465
|
__Pyx_GOTREF(__pyx_t_2);
|
|
7990
|
-
|
|
8466
|
+
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__25);
|
|
8467
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_delaunay, __pyx_t_2) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
|
|
7991
8468
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7992
8469
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
7993
8470
|
|
|
7994
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8471
|
+
/* "cytriangle/cytriangle.pyx":148
|
|
7995
8472
|
* return self.out
|
|
7996
8473
|
*
|
|
7997
|
-
* cpdef convex_hull(self): # <<<<<<<<<<<<<<
|
|
8474
|
+
* cpdef convex_hull(self, verbose=False): # <<<<<<<<<<<<<<
|
|
7998
8475
|
* """
|
|
7999
8476
|
* Run the main triangulation method on the in_ object with -Qzc flags enabled.
|
|
8000
8477
|
*/
|
|
8001
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_15convex_hull, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_convex_hull, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)
|
|
8478
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_15convex_hull, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_convex_hull, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
8002
8479
|
__Pyx_GOTREF(__pyx_t_2);
|
|
8003
|
-
|
|
8480
|
+
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__27);
|
|
8481
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_convex_hull, __pyx_t_2) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
8004
8482
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
8005
8483
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
8006
8484
|
|
|
8007
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8485
|
+
/* "cytriangle/cytriangle.pyx":166
|
|
8008
8486
|
* return self.out
|
|
8009
8487
|
*
|
|
8010
|
-
* cpdef voronoi(self): # <<<<<<<<<<<<<<
|
|
8488
|
+
* cpdef voronoi(self, verbose=False): # <<<<<<<<<<<<<<
|
|
8011
8489
|
* """
|
|
8012
8490
|
* Run the main triangulation method on the in_ object with -Qzv flags enabled.
|
|
8013
8491
|
*/
|
|
8014
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_17voronoi, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_voronoi, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)
|
|
8492
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_17voronoi, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle_voronoi, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
8015
8493
|
__Pyx_GOTREF(__pyx_t_2);
|
|
8016
|
-
|
|
8494
|
+
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__29);
|
|
8495
|
+
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_voronoi, __pyx_t_2) < 0) __PYX_ERR(0, 166, __pyx_L1_error)
|
|
8017
8496
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
8018
8497
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
8019
8498
|
|
|
@@ -8022,7 +8501,7 @@ if (!__Pyx_RefNanny) {
|
|
|
8022
8501
|
* cdef tuple state
|
|
8023
8502
|
* cdef object _dict
|
|
8024
8503
|
*/
|
|
8025
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle___reduce_cython, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)
|
|
8504
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle___reduce_cython, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
8026
8505
|
__Pyx_GOTREF(__pyx_t_2);
|
|
8027
8506
|
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
8028
8507
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -8034,22 +8513,22 @@ if (!__Pyx_RefNanny) {
|
|
|
8034
8513
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
8035
8514
|
* __pyx_unpickle_CyTriangle__set_state(self, __pyx_state)
|
|
8036
8515
|
*/
|
|
8037
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle___setstate_cython, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)
|
|
8516
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_10CyTriangle_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CyTriangle___setstate_cython, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
|
|
8038
8517
|
__Pyx_GOTREF(__pyx_t_2);
|
|
8039
8518
|
if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_10cytriangle_10cytriangle_CyTriangle, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
|
|
8040
8519
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
8041
8520
|
PyType_Modified(__pyx_ptype_10cytriangle_10cytriangle_CyTriangle);
|
|
8042
8521
|
|
|
8043
|
-
/* "cytriangle/cytriangle.pyx":
|
|
8044
|
-
*
|
|
8522
|
+
/* "cytriangle/cytriangle.pyx":185
|
|
8523
|
+
*
|
|
8045
8524
|
*
|
|
8046
8525
|
* def triangulate(input_dict, flags): # <<<<<<<<<<<<<<
|
|
8047
8526
|
* """
|
|
8048
8527
|
* Triangulates an input dict with the following properties:
|
|
8049
8528
|
*/
|
|
8050
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_1triangulate, 0, __pyx_n_s_triangulate, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)
|
|
8529
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_1triangulate, 0, __pyx_n_s_triangulate, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
|
|
8051
8530
|
__Pyx_GOTREF(__pyx_t_2);
|
|
8052
|
-
if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangulate, __pyx_t_2) < 0) __PYX_ERR(0,
|
|
8531
|
+
if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangulate, __pyx_t_2) < 0) __PYX_ERR(0, 185, __pyx_L1_error)
|
|
8053
8532
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
8054
8533
|
|
|
8055
8534
|
/* "(tree fragment)":1
|
|
@@ -8057,15 +8536,15 @@ if (!__Pyx_RefNanny) {
|
|
|
8057
8536
|
* cdef object __pyx_PickleError
|
|
8058
8537
|
* cdef object __pyx_result
|
|
8059
8538
|
*/
|
|
8060
|
-
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_3__pyx_unpickle_CyTriangle, 0, __pyx_n_s_pyx_unpickle_CyTriangle, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)
|
|
8539
|
+
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10cytriangle_10cytriangle_3__pyx_unpickle_CyTriangle, 0, __pyx_n_s_pyx_unpickle_CyTriangle, NULL, __pyx_n_s_cytriangle_cytriangle, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
8061
8540
|
__Pyx_GOTREF(__pyx_t_2);
|
|
8062
8541
|
if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_CyTriangle, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
8063
8542
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
8064
8543
|
|
|
8065
8544
|
/* "cytriangle/cytriangle.pyx":1
|
|
8066
|
-
* from cytriangle.ctriangle cimport
|
|
8067
|
-
* from cytriangle.ctriangle cimport triangulate as ctriangulate
|
|
8545
|
+
* from cytriangle.ctriangle cimport triangulate as ctriangulate # <<<<<<<<<<<<<<
|
|
8068
8546
|
* from cytriangle.cytriangleio cimport TriangleIO
|
|
8547
|
+
* import re
|
|
8069
8548
|
*/
|
|
8070
8549
|
__pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
8071
8550
|
__Pyx_GOTREF(__pyx_t_2);
|
|
@@ -9213,6 +9692,146 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
|
|
|
9213
9692
|
return __Pyx_GetBuiltinName(name);
|
|
9214
9693
|
}
|
|
9215
9694
|
|
|
9695
|
+
/* PyUnicode_Unicode */
|
|
9696
|
+
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
|
|
9697
|
+
if (unlikely(obj == Py_None))
|
|
9698
|
+
obj = __pyx_kp_u_None;
|
|
9699
|
+
return __Pyx_NewRef(obj);
|
|
9700
|
+
}
|
|
9701
|
+
|
|
9702
|
+
/* JoinPyUnicode */
|
|
9703
|
+
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
|
|
9704
|
+
Py_UCS4 max_char) {
|
|
9705
|
+
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
9706
|
+
PyObject *result_uval;
|
|
9707
|
+
int result_ukind, kind_shift;
|
|
9708
|
+
Py_ssize_t i, char_pos;
|
|
9709
|
+
void *result_udata;
|
|
9710
|
+
CYTHON_MAYBE_UNUSED_VAR(max_char);
|
|
9711
|
+
#if CYTHON_PEP393_ENABLED
|
|
9712
|
+
result_uval = PyUnicode_New(result_ulength, max_char);
|
|
9713
|
+
if (unlikely(!result_uval)) return NULL;
|
|
9714
|
+
result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
|
|
9715
|
+
kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
|
|
9716
|
+
result_udata = PyUnicode_DATA(result_uval);
|
|
9717
|
+
#else
|
|
9718
|
+
result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
|
|
9719
|
+
if (unlikely(!result_uval)) return NULL;
|
|
9720
|
+
result_ukind = sizeof(Py_UNICODE);
|
|
9721
|
+
kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
|
|
9722
|
+
result_udata = PyUnicode_AS_UNICODE(result_uval);
|
|
9723
|
+
#endif
|
|
9724
|
+
assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
|
|
9725
|
+
char_pos = 0;
|
|
9726
|
+
for (i=0; i < value_count; i++) {
|
|
9727
|
+
int ukind;
|
|
9728
|
+
Py_ssize_t ulength;
|
|
9729
|
+
void *udata;
|
|
9730
|
+
PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
|
|
9731
|
+
if (unlikely(__Pyx_PyUnicode_READY(uval)))
|
|
9732
|
+
goto bad;
|
|
9733
|
+
ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
|
|
9734
|
+
if (unlikely(!ulength))
|
|
9735
|
+
continue;
|
|
9736
|
+
if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
|
|
9737
|
+
goto overflow;
|
|
9738
|
+
ukind = __Pyx_PyUnicode_KIND(uval);
|
|
9739
|
+
udata = __Pyx_PyUnicode_DATA(uval);
|
|
9740
|
+
if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
|
|
9741
|
+
memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
|
|
9742
|
+
} else {
|
|
9743
|
+
#if PY_VERSION_HEX >= 0x030d0000
|
|
9744
|
+
if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
|
|
9745
|
+
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
|
|
9746
|
+
_PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
|
|
9747
|
+
#else
|
|
9748
|
+
Py_ssize_t j;
|
|
9749
|
+
for (j=0; j < ulength; j++) {
|
|
9750
|
+
Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
|
|
9751
|
+
__Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
|
|
9752
|
+
}
|
|
9753
|
+
#endif
|
|
9754
|
+
}
|
|
9755
|
+
char_pos += ulength;
|
|
9756
|
+
}
|
|
9757
|
+
return result_uval;
|
|
9758
|
+
overflow:
|
|
9759
|
+
PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
|
|
9760
|
+
bad:
|
|
9761
|
+
Py_DECREF(result_uval);
|
|
9762
|
+
return NULL;
|
|
9763
|
+
#else
|
|
9764
|
+
CYTHON_UNUSED_VAR(max_char);
|
|
9765
|
+
CYTHON_UNUSED_VAR(result_ulength);
|
|
9766
|
+
CYTHON_UNUSED_VAR(value_count);
|
|
9767
|
+
return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
|
|
9768
|
+
#endif
|
|
9769
|
+
}
|
|
9770
|
+
|
|
9771
|
+
/* UnicodeConcatInPlace */
|
|
9772
|
+
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
|
|
9773
|
+
static int
|
|
9774
|
+
__Pyx_unicode_modifiable(PyObject *unicode)
|
|
9775
|
+
{
|
|
9776
|
+
if (Py_REFCNT(unicode) != 1)
|
|
9777
|
+
return 0;
|
|
9778
|
+
if (!PyUnicode_CheckExact(unicode))
|
|
9779
|
+
return 0;
|
|
9780
|
+
if (PyUnicode_CHECK_INTERNED(unicode))
|
|
9781
|
+
return 0;
|
|
9782
|
+
return 1;
|
|
9783
|
+
}
|
|
9784
|
+
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
|
|
9785
|
+
#if CYTHON_REFNANNY
|
|
9786
|
+
, void* __pyx_refnanny
|
|
9787
|
+
#endif
|
|
9788
|
+
) {
|
|
9789
|
+
PyObject *left = *p_left;
|
|
9790
|
+
Py_ssize_t left_len, right_len, new_len;
|
|
9791
|
+
if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
|
|
9792
|
+
return NULL;
|
|
9793
|
+
if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
|
|
9794
|
+
return NULL;
|
|
9795
|
+
left_len = PyUnicode_GET_LENGTH(left);
|
|
9796
|
+
if (left_len == 0) {
|
|
9797
|
+
Py_INCREF(right);
|
|
9798
|
+
return right;
|
|
9799
|
+
}
|
|
9800
|
+
right_len = PyUnicode_GET_LENGTH(right);
|
|
9801
|
+
if (right_len == 0) {
|
|
9802
|
+
Py_INCREF(left);
|
|
9803
|
+
return left;
|
|
9804
|
+
}
|
|
9805
|
+
if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
|
|
9806
|
+
PyErr_SetString(PyExc_OverflowError,
|
|
9807
|
+
"strings are too large to concat");
|
|
9808
|
+
return NULL;
|
|
9809
|
+
}
|
|
9810
|
+
new_len = left_len + right_len;
|
|
9811
|
+
if (__Pyx_unicode_modifiable(left)
|
|
9812
|
+
&& PyUnicode_CheckExact(right)
|
|
9813
|
+
&& PyUnicode_KIND(right) <= PyUnicode_KIND(left)
|
|
9814
|
+
&& !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
|
|
9815
|
+
int ret;
|
|
9816
|
+
__Pyx_GIVEREF(*p_left);
|
|
9817
|
+
ret = PyUnicode_Resize(p_left, new_len);
|
|
9818
|
+
__Pyx_GOTREF(*p_left);
|
|
9819
|
+
if (unlikely(ret != 0))
|
|
9820
|
+
return NULL;
|
|
9821
|
+
#if PY_VERSION_HEX >= 0x030d0000
|
|
9822
|
+
if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
|
|
9823
|
+
#else
|
|
9824
|
+
_PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
|
|
9825
|
+
#endif
|
|
9826
|
+
__Pyx_INCREF(*p_left);
|
|
9827
|
+
__Pyx_GIVEREF(*p_left);
|
|
9828
|
+
return *p_left;
|
|
9829
|
+
} else {
|
|
9830
|
+
return __Pyx_PyUnicode_Concat(left, right);
|
|
9831
|
+
}
|
|
9832
|
+
}
|
|
9833
|
+
#endif
|
|
9834
|
+
|
|
9216
9835
|
/* KeywordStringCheck */
|
|
9217
9836
|
static int __Pyx_CheckKeywordStrings(
|
|
9218
9837
|
PyObject *kw,
|
|
@@ -12285,7 +12904,7 @@ __Pyx_PyType_GetName(PyTypeObject* tp)
|
|
|
12285
12904
|
if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
|
|
12286
12905
|
PyErr_Clear();
|
|
12287
12906
|
Py_XDECREF(name);
|
|
12288
|
-
name = __Pyx_NewRef(
|
|
12907
|
+
name = __Pyx_NewRef(__pyx_n_s__38);
|
|
12289
12908
|
}
|
|
12290
12909
|
return name;
|
|
12291
12910
|
}
|