Python Triangle Function Crashes Blender I am running Blender 2.76b on a 64bit Windows 10 machine, with Python 3.4.2 installed (Blender also is running the same version of Python). I recently downloaded a python package called triangle (which is used to generate a triangular mesh for given a set of points). This function required me to download Visual C++ 2010 for windows which I did and was working fine outside Blender. But when I included that in a Python code which I am running as a Blender script, Blender is crashing. I tried troubleshooting this, it basically is crashing when it is calling a function called core.triang() in the triangle package, and this I'm guessing is inside core.pyd which I can't access. Can someone help with solving this problem? Thanks!

Edit 1: Here is a representative code:

import triangle
import triangle.plot
from numpy import *

A = {}

A['vertices'] = array(((0,0), (1,0), (1, 1), (0, 1)))

B = triangle.triangulate(A, 'qa0.5')
I think you're calling triangulate() incorrectly.

From the Manual:


  triangle.triangulate(tri, opts='')
  Perform triangulation on the input data 'tri'. 'tri' must be a dictionary that contains the following keys:
  
  
  vertices - 2-D array that stores the xy position of each vertex
  segments - optional 2-D array that stores segments. Segments are edges whose presence in the triangulation is enforced (although each segment may be subdivided into smaller edges). Each segment is specified by listing the indices of its two endpoints.
  holes - optional 2-D array that stores holes. Holes are specified by identifying a point inside each hole. After the triangulation is formed, Triangle creates holes by eating triangles, spreading out from each hole point until its progress is blocked by PSLG segments; you must be careful to enclose each hole in segments, or your whole triangulation might be eaten away. If the two triangles abutting a segment are eaten, the segment itself is also eaten. Do not place a hole directly on a segment; if you do, Triangle will choose one side of the segment arbitrarily.
  regions - optional 2-D array that stores region attributes and areas.
  


It looks like triangulate cannot take a simple array, it has to be a dictionary.

Take this example from the Manual:

A = dict(vertices=array(((0,0), (1,0), (1, 1), (0, 1))))
B = triangle.triangulate(A)
triangle.plot.compare(plt, A, B)
plt.show()