def dd_DDMatrix2Poly(matrixptr):
error = ctypes.c_int()
polyhedraptr = libcdd.dd_DDMatrix2Poly(matrixptr, ctypes.byref(error))
# Return None on error.
# The error values are enums, so they aren't exposed.
if error.value != DD_NO_ERRORS:
# Dump out the errors to stderr
libcdd.dd_WriteErrorMessages(
ctypes.pythonapi.PyFile_AsFile(ctypes.py_object(sys.stdout)),
error)
dd_FreePolyhedra(polyhedraptr)
return None
return polyhedraptr
评论列表
文章目录