+
+
+%typemap(in) std::list<std::shared_ptr<GeomAPI_Pnt> > &thePoints (std::list<std::shared_ptr<GeomAPI_Pnt> > temp) {
+ std::shared_ptr<GeomAPI_Pnt> * temp_pnt;
+ int newmem = 0;
+ if (PySequence_Check($input)) {
+ for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
+ PyObject * item = PySequence_GetItem($input, i);
+ if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_pnt, $descriptor(std::shared_ptr<GeomAPI_Pnt> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
+ if (!temp_pnt) {
+ PyErr_SetString(PyExc_TypeError, "argument must be list of GeomAPI_Pnt.");
+ return NULL;
+ }
+ temp.push_back(*temp_pnt);
+ if (newmem & SWIG_CAST_NEW_MEMORY) {
+ delete temp_pnt;
+ }
+ }
+ Py_DECREF(item);
+ }
+ $1 = &temp;
+ } else {
+ PyErr_SetString(PyExc_ValueError, "argument must be list of GeomAPI_Pnt.");
+ return NULL;
+ }
+}
+
+%typemap(in, numinputs=0) double & (double temp) {
+ $1 = &temp;
+}
+
+%typemap(argout) double & {
+ $result = SWIG_Python_AppendOutput($result, PyFloat_FromDouble(*$1));
+}
+
+// std::dynamic_pointer_cast
+template<class T1, class T2> std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr<T2> theObject);
+%template(shapeToEdge) shared_ptr_cast<GeomAPI_Edge, GeomAPI_Shape>;