0 to py::int_ conversion

This commit is contained in:
Joachim Schöberl 2016-11-04 14:55:15 +01:00
parent 7d41e4562a
commit fe356ab3ca
3 changed files with 5 additions and 5 deletions

View File

@ -206,7 +206,7 @@ DLL_HEADER void ExportCSG(py::module &m)
else else
global_trafo = Transformation<3> (Vec<3>(0,0,0)); global_trafo = Transformation<3> (Vec<3>(0,0,0));
}), }),
py::arg("dir")=int(0), py::arg("angle")=0); py::arg("dir")=int(0), py::arg("angle")=int(0));
py::class_<Vec<2>> (m, "Vec2d") py::class_<Vec<2>> (m, "Vec2d")
.def(py::init<double,double>()) .def(py::init<double,double>())

View File

@ -96,7 +96,7 @@ DLL_HEADER void ExportGeom2d(py::module &m)
seg->bc = self.GetNSplines()+1; seg->bc = self.GetNSplines()+1;
self.AppendSegment(seg); self.AppendSegment(seg);
return self.GetNSplines()-1; return self.GetNSplines()-1;
}), py::arg("point_indices"), py::arg("leftdomain") = 1, py::arg("rightdomain") = 0, }), py::arg("point_indices"), py::arg("leftdomain") = 1, py::arg("rightdomain") = py::int_(0),
py::arg("bc")=NGDummyArgument(), py::arg("copy")=NGDummyArgument(), py::arg("maxh")=1e99, py::arg("hpref")=false py::arg("bc")=NGDummyArgument(), py::arg("copy")=NGDummyArgument(), py::arg("maxh")=1e99, py::arg("hpref")=false
) )
@ -124,7 +124,7 @@ DLL_HEADER void ExportGeom2d(py::module &m)
seg->reffak = 1; seg->reffak = 1;
seg->copyfrom = -1; seg->copyfrom = -1;
self.AppendSegment(seg); self.AppendSegment(seg);
}), py::arg("point_indices"), py::arg("leftdomain") = 1, py::arg("rightdomain") = 0) }), py::arg("point_indices"), py::arg("leftdomain") = 1, py::arg("rightdomain") = py::int_(0))
//.def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, int point_index1, int point_index2)//, int leftdomain, int rightdomain) //.def("AppendSegment", FunctionPointer([](SplineGeometry2d &self, int point_index1, int point_index2)//, int leftdomain, int rightdomain)
// { // {
// LineSeg<2> * l = new LineSeg<2>(self.GetPoint(point_index1), self.GetPoint(point_index2)); // LineSeg<2> * l = new LineSeg<2>(self.GetPoint(point_index1), self.GetPoint(point_index2));

View File

@ -267,8 +267,8 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
}, },
py::arg("surfnr")=1, py::arg("surfnr")=1,
py::arg("domin")=1, py::arg("domin")=1,
py::arg("domout")=0, py::arg("domout")=py::int_(0),
py::arg("bc")=0, py::arg("bc")=py::int_(0),
"create facedescriptor") "create facedescriptor")
.def("__str__", &ToString<FaceDescriptor>) .def("__str__", &ToString<FaceDescriptor>)
.def("__repr__", &ToString<FaceDescriptor>) .def("__repr__", &ToString<FaceDescriptor>)