Open videlec opened 4 years ago
>>> from pyflatsurf import flatsurf >>> import cppyy.gbl >>> from gmpxxyy import mpq >>> vert = cppyy.gbl.std.vector[int]([1,-3,2,-1,3,-2]) >>> F = cppyy.gbl.flatsurf.FlatTriangulationCombinatorial([vert]) >>> hols = [(1,0), (0,1), (-1,-1)] >>> hols = cppyy.gbl.vector[flatsurf.Vector[mpq]]([flatsurf.Vector[mpq](x,y) for x,y in hols]) >>> cppyy.gbl.flatsurf.makeFlatTriangulation([vert], hols) # works FlatTriangulationCombinatorial(vertices = (1, -3, 2, -1, 3, -2), faces = (1, 2, 3)(-1, -2, -3)) with vectors 1: (1, 0), 2: (0, 1), 3: (-1, -1) >>> cppyy.gbl.flatsurf.makeFlatTriangulation(F, hols) # fails Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: Template method resolution failed: shared_ptr<flatsurf::FlatTriangulation<__gmp_expr<__mpq_struct[1],__mpq_struct[1]> > > flatsurf::makeFlatTriangulation(const vector<vector<int> >& vertices, const vector<flatsurf::Vector<__gmp_expr<__mpq_struct[1],__mpq_struct[1]> > >& vectors) => TypeError: could not convert argument 1 Failed to instantiate "makeFlatTriangulation(flatsurf::FlatTriangulationCombinatorial&,std::vector<flatsurf::Vector<__gmp_expr<__mpq_struct[1],__mpq_struct[1]> > >&)" Failed to instantiate "makeFlatTriangulation(flatsurf::FlatTriangulationCombinatorial*,std::vector<flatsurf::Vector<__gmp_expr<__mpq_struct[1],__mpq_struct[1]> > >*)" Failed to instantiate "makeFlatTriangulation(flatsurf::FlatTriangulationCombinatorial,std::vector<flatsurf::Vector<__gmp_expr<__mpq_struct[1],__mpq_struct[1]> > >)"
This was not really supposed to work so I wouldn't call it a bug. But it would certainly be a very good addition, I agree.