+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
/* SketchAPI.i */
%module SketchAPI
%{
#include "SketchAPI_swig.h"
+ #include "ModelHighAPI_swig.h"
+
+ // fix for SWIG v2.0.4
+ #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj))
%}
%include "doxyhelp.i"
// import other modules
+%import "ModelAPI.i"
%import "ModelHighAPI.i"
// to avoid error on this
// shared pointers
%shared_ptr(SketchAPI_Arc)
+%shared_ptr(SketchAPI_MacroArc)
%shared_ptr(SketchAPI_Circle)
+%shared_ptr(SketchAPI_MacroCircle)
%shared_ptr(SketchAPI_Constraint)
%shared_ptr(SketchAPI_IntersectionPoint)
%shared_ptr(SketchAPI_Line)
%shared_ptr(SketchAPI_Rotation)
%shared_ptr(SketchAPI_Translation)
+// std::list -> []
+%template(InterfaceList) std::list<std::shared_ptr<ModelHighAPI_Interface> >;
+%template(EntityList) std::list<std::shared_ptr<SketchAPI_SketchEntity> >;
+
+%typecheck(SWIG_TYPECHECK_POINTER) std::shared_ptr<ModelAPI_Feature>, const std::shared_ptr<ModelAPI_Feature> & {
+ std::shared_ptr<ModelAPI_Feature> * temp_feature;
+ std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
+ int newmem = 0;
+ if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
+ if (temp_feature) {
+ $1 = 1;
+ } else {
+ $1 = 0;
+ }
+ } else
+ if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
+ if (temp_interface) {
+ $1 = 1;
+ } else {
+ $1 = 0;
+ }
+ } else
+ $1 = 0;
+}
+
+%typemap(in) const std::shared_ptr<ModelAPI_Feature> & (std::shared_ptr<ModelAPI_Feature> temp) {
+ std::shared_ptr<ModelAPI_Feature> * temp_feature;
+ std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
+ int newmem = 0;
+ if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_feature, $descriptor(std::shared_ptr<ModelAPI_Feature> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
+ if (!temp_feature) {
+ PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
+ return NULL;
+ }
+ temp = (*temp_feature);
+ if (newmem & SWIG_CAST_NEW_MEMORY) {
+ delete temp_feature;
+ }
+ $1 = &temp;
+ } else
+ if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
+ if (!temp_interface) {
+ PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface.");
+ return NULL;
+ }
+ temp = (*temp_interface)->feature();
+ if (newmem & SWIG_CAST_NEW_MEMORY) {
+ delete temp_interface;
+ }
+ $1 = &temp;
+ } else
+ if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
+ } else {
+ PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Interface.");
+ return NULL;
+ }
+}
+
%typemap(in) const ModelHighAPI_RefAttr & (ModelHighAPI_RefAttr temp) {
std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
std::shared_ptr<ModelAPI_Object> * temp_object;
%include "SketchAPI_IntersectionPoint.h"
%include "SketchAPI_Line.h"
%include "SketchAPI_Circle.h"
+%include "SketchAPI_MacroCircle.h"
%include "SketchAPI_Arc.h"
+%include "SketchAPI_MacroArc.h"
%include "SketchAPI_Projection.h"
%include "SketchAPI_Mirror.h"
%include "SketchAPI_Translation.h"