-/*\r
- * Project Info: http://jcae.sourceforge.net\r
- * \r
- * This program is free software; you can redistribute it and/or modify it under\r
- * the terms of the GNU Lesser General Public License as published by the Free\r
- * Software Foundation; either version 2.1 of the License, or (at your option)\r
- * any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful, but WITHOUT\r
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\r
- * details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public License\r
- * along with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.\r
- *\r
- * (C) Copyright 2005, by EADS CRC\r
- * (C) Copyright 2008, 2009, by EADS France\r
- */\r
-\r
-%module OccJava\r
-\r
-%{\r
-#ifdef HAVE_CONFIG_H\r
-//config.h generated by autotools from config.h.in (see an example in Opencascade).\r
-#include "config.h"\r
-#endif\r
-#include <Adaptor3d_Curve.hxx>\r
-#include <TopExp.hxx>\r
-#include <Poly_Triangulation.hxx>\r
-%}\r
-\r
-// Handle enums with Java enums\r
-%javaconst(1);\r
-%include "enums.swg"\r
-\r
-// Handle C arrays as Java arrays\r
-%include "arrays_java.i";\r
-%apply double[] {double *};\r
-%apply double[] {double &};\r
-\r
-// load the native library\r
-%pragma(java) jniclasscode=%{\r
- static\r
- {\r
- System.loadLibrary("TKERNEL");\r
- System.loadLibrary("TKMATH");\r
- System.loadLibrary("TKG2D");\r
- System.loadLibrary("TKG3D"); \r
- System.loadLibrary("TKGEOMBASE");\r
- System.loadLibrary("TKBREP");\r
- System.loadLibrary("TKGEOMALGO"); \r
- System.loadLibrary("TKTOPALGO");\r
- System.loadLibrary("TKMESH");\r
- \r
- System.loadLibrary("TKBO"); \r
- System.loadLibrary("TKSHHEALING");\r
- \r
- System.loadLibrary("TKPRIM");\r
- System.loadLibrary("TKBOOL");\r
- System.loadLibrary("TKFILLET");\r
- System.loadLibrary("TKOFFSET"); \r
- \r
- System.loadLibrary("TKXSBASE");\r
- System.loadLibrary("TKIGES");\r
- System.loadLibrary("TKSTEPBASE");\r
- System.loadLibrary("TKSTEPATTR");\r
- System.loadLibrary("TKSTEP209");\r
- System.loadLibrary("TKSTEP");\r
-\r
- System.loadLibrary("OccJava");\r
- if(!"0".equals(System.getenv("MMGT_OPT")))\r
- throw new RuntimeException("The MMGT_OPT environement variable must be set to 0 before using occjava.");\r
- }\r
-%}\r
-\r
-%include "Standard.i"\r
-%include "gp.i"\r
-%include "TCol.i"\r
-%include "TopAbs.i"\r
-%include "TopoDS.i"\r
-%include "GeomAbs.i"\r
-%include "TopTools.i"\r
-%include "BRep.i"\r
-%include "GeomLProp_SLProps.i"\r
-%include "BRepTools.i"\r
-%include "BRepBuilderAPI.i"\r
-%include "BRepOffsetAPI.i"\r
-%include "BRepPrimAPI.i"\r
-%include "BRepAlgoAPI.i"\r
-%include "Poly.i"\r
-%include "Geom.i"\r
-%include "BRepLib.i"\r
-%include "BRepFilletAPI.i"\r
-%include "BRepCheck.i"\r
-%include "ShapeBuild.i"\r
-%include "XSControl.i"\r
-%include "ShapeFix.i"\r
-%include "APIHeaderSection_MakeHeader.i"\r
-// This one require Opencascade 6.2\r
-%include "ShapeUpgrade.i"\r
-//Jens Schmidt, req. f. Thesis\r
-%include "GeomAPI.i"\r
-%include "GC.i"\r
-\r
-\r
-%typemap(javacode) TopExp\r
-%{\r
- public static TopoDS_Vertex[] vertices(TopoDS_Edge edge)\r
- {\r
- TopoDS_Vertex first=new TopoDS_Vertex();\r
- TopoDS_Vertex second=new TopoDS_Vertex();\r
- vertices(edge, first, second);\r
- return new TopoDS_Vertex[]{first, second};\r
- }\r
-%}\r
-\r
-class TopLoc_Location\r
-{\r
- %rename(isIdentity) IsIdentity;\r
- %rename(transformation) Transformation;\r
- public:\r
- Standard_Boolean IsIdentity();\r
- const gp_Trsf& Transformation();\r
-};\r
-\r
-class TopExp\r
-{\r
- public:\r
- %rename(vertices) Vertices;\r
- static void Vertices(const TopoDS_Edge& E,TopoDS_Vertex& Vfirst,TopoDS_Vertex& Vlast,const Standard_Boolean CumOri = Standard_False) ;\r
-};\r
-\r
-/**\r
- * TopExp_Explorer\r
- */\r
-%{#include "TopExp_Explorer.hxx"%}\r
-class TopExp_Explorer\r
-{\r
- public:\r
- TopExp_Explorer();\r
- TopExp_Explorer(const TopoDS_Shape& S,const TopAbs_ShapeEnum ToFind,\r
- const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE);\r
- %rename(init) Init;\r
- %rename(more) More;\r
- %rename(next) Next;\r
- %rename(current) Current;\r
- void Init(const TopoDS_Shape& S, const TopAbs_ShapeEnum ToFind, \r
- const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE) ;\r
- Standard_Boolean More() const;\r
- void Next() ;\r
- const TopoDS_Shape & Current();\r
-};\r
-\r
-/**\r
- * Bnd_Box\r
- */\r
-%{#include "Bnd_Box.hxx"%}\r
-%typemap(javacode) Bnd_Box\r
-%{\r
- /**\r
- * Return the array { Xmin, Ymin, Zmin, Xmax, Ymax, Zmax }\r
- */ \r
- public double[] get()\r
- {\r
- double[] toReturn=new double[6];\r
- get(toReturn);\r
- return toReturn;\r
- }\r
-%}\r
-\r
-class Bnd_Box\r
-{\r
- %rename(isVoid) IsVoid;\r
- public:\r
- Bnd_Box();\r
- Standard_Boolean IsVoid() const;\r
-};\r
-\r
-%extend Bnd_Box\r
-{\r
- void get(double box[6])\r
- {\r
- if(!self->IsVoid())\r
- self->Get(box[0], box[1], box[2], box[3], box[4], box[5]);\r
- }\r
-};\r
-\r
-/**\r
- * BRepBndLib\r
- */\r
-%{#include "BRepBndLib.hxx"%}\r
-class BRepBndLib\r
-{\r
- public:\r
- %rename(add) Add;\r
- static void Add(const TopoDS_Shape& shape,Bnd_Box& bndBox);\r
-};\r
-\r
-/**\r
- * Adaptor2d_Curve2d\r
- */\r
-%{#include "Adaptor2d_Curve2d.hxx"%}\r
-\r
-class Adaptor2d_Curve2d\r
-{ \r
- Adaptor2d_Curve2d()=0;\r
- public:\r
- %rename(value) Value;\r
- virtual gp_Pnt2d Value(const Standard_Real U) const;\r
-};\r
-\r
-/**\r
- * Geom2dAdaptor_Curve\r
- */\r
-%{#include "Geom2dAdaptor_Curve.hxx"%}\r
-class Geom2dAdaptor_Curve: public Adaptor2d_Curve2d\r
-{\r
- %rename(load) Load;\r
- public:\r
- Geom2dAdaptor_Curve();\r
- Geom2dAdaptor_Curve(const Handle_Geom2d_Curve & C);\r
- Geom2dAdaptor_Curve(const Handle_Geom2d_Curve & C,const Standard_Real UFirst,const Standard_Real ULast);\r
- void Load(const Handle_Geom2d_Curve & C) ;\r
- void Load(const Handle_Geom2d_Curve & C,const Standard_Real UFirst,const Standard_Real ULast) ;\r
-};\r
-\r
-/**\r
- * Adaptor3d_Curve\r
- */\r
-%{#include "Adaptor3d_Curve.hxx"%}\r
-\r
-class Adaptor3d_Curve\r
-{ \r
- Adaptor3d_Curve()=0;\r
- public:\r
- %rename(value) Value;\r
- const gp_Pnt Value(const Standard_Real U) const;\r
-};\r
-\r
-//extends the Adaptor3d_Curve class to reduce the JNI overhead when\r
-//calling a lot of Adaptor3d_Curve.Value\r
-%extend Adaptor3d_Curve\r
-{\r
- public:\r
- void arrayValues(int size, double u[])\r
- {\r
- for (int i = 0; i < size; i++)\r
- {\r
- gp_Pnt gp=self->Value(u[3*i]);\r
- u[3*i] = gp.X();\r
- u[3*i+1] = gp.Y();\r
- u[3*i+2] = gp.Z();\r
- } \r
- }\r
-};\r
-\r
-/**\r
- * GeomAdaptor_Curve\r
- */\r
-%{#include "GeomAdaptor_Curve.hxx"%}\r
-\r
-class GeomAdaptor_Curve: public Adaptor3d_Curve\r
-{\r
- %rename(load) Load;\r
- public:\r
- GeomAdaptor_Curve();\r
- GeomAdaptor_Curve(const Handle_Geom_Curve & C);\r
- GeomAdaptor_Curve(const Handle_Geom_Curve & C,\r
- const Standard_Real UFirst,const Standard_Real ULast);\r
- void Load(const Handle_Geom_Curve & C) ;\r
- void Load(const Handle_Geom_Curve & C,\r
- const Standard_Real UFirst,const Standard_Real ULast) ;\r
-\r
-};\r
-\r
-\r
-/**\r
- * GProp_GProps\r
- */\r
- %{#include "GProp_GProps.hxx"%}\r
-// class GProp_GProps\r
-// {\r
-// public:\r
-// %rename(mass) Mass;\r
-// GProp_GProps();\r
-// Standard_Real Mass() const;\r
-//};\r
-class GProp_GProps\r
-{\r
- public:\r
- %rename(mass) Mass;\r
- %rename(centreOfMass) CentreOfMass;\r
- %rename(matrixOfInertia) MatrixOfInertia;\r
- GProp_GProps();\r
- Standard_Real Mass() const;\r
- gp_Pnt CentreOfMass() const;\r
- gp_Mat MatrixOfInertia() const;\r
-};\r
-\r
-%{#include "GProp_PGProps.hxx"%}\r
-class GProp_PGProps : public GProp_GProps\r
-{ \r
-};\r
-%{#include "GProp_CelGProps.hxx"%}\r
-class GProp_CelGProps: public GProp_GProps\r
-{ \r
-};\r
-\r
-%{#include "GProp_SelGProps.hxx"%}\r
-class GProp_SelGProps: public GProp_GProps\r
-{ \r
-};\r
-\r
-%{#include "GProp_VelGProps.hxx"%}\r
-class GProp_VelGProps: public GProp_GProps\r
-{\r
-};\r
-\r
-\r
-//%{#include "GProp_CGProps.gxx"%}\r
-//class GProp_CGProps: public GProp_GProps\r
-//{ \r
-//};\r
-\r
-//%{#include "GProp_SGProps.gxx"%}\r
-//class GProp_SGProps: public GProp_GProps\r
-//{ \r
-//};\r
-\r
-//%{#include "GProp_VGProps.gxx"%}\r
-//class GProp_VGProps\r
-//{\r
-//};\r
-\r
- \r
-/**\r
- * BRepGProp\r
- */\r
-%{#include "BRepGProp.hxx"%}\r
-class BRepGProp\r
-{\r
- public:\r
- %rename(linearProperties) LinearProperties;\r
- %rename(surfaceProperties) SurfaceProperties;\r
- %rename(volumeProperties) VolumeProperties;\r
- %rename(volumePropertiesGK) VolumePropertiesGK;\r
- static void LinearProperties(const TopoDS_Shape& shape, GProp_GProps& properties);\r
- static void VolumeProperties(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Boolean onlyClosed = Standard_False) ;\r
- static Standard_Real VolumeProperties(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Real Eps, const Standard_Boolean onlyClosed = Standard_False) ;\r
- static void SurfaceProperties(const TopoDS_Shape& shape, GProp_GProps& properties) ;\r
- static Standard_Real SurfaceProperties(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Real Eps) ;\r
- static Standard_Real VolumePropertiesGK(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Real Eps, const Standard_Boolean onlyClosed = Standard_False, const Standard_Boolean isUseSpan = Standard_False, const Standard_Boolean cgFlag = Standard_False, const Standard_Boolean iFlag = Standard_False) ;\r
-};\r
-\r
-/**\r
- *\r
- */\r
-%rename(VOID) IFSelect_RetVoid;\r
-%rename(DONE) IFSelect_RetDone;\r
-%rename(ERROR) IFSelect_RetError;\r
-%rename(FAIL) IFSelect_RetFail;\r
-%rename(STOP) IFSelect_RetStop;\r
-enum IFSelect_ReturnStatus {\r
- IFSelect_RetVoid,\r
- IFSelect_RetDone,\r
- IFSelect_RetError,\r
- IFSelect_RetFail,\r
- IFSelect_RetStop\r
-};\r
- \r
-%{#include <ShapeAnalysis_FreeBounds.hxx>%}\r
-class ShapeAnalysis_FreeBounds\r
-{\r
- %rename(getClosedWires) GetClosedWires;\r
- %rename(getOpenWires) GetOpenWires;\r
- public:\r
- ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,\r
- const Standard_Boolean splitclosed = Standard_False,\r
- const Standard_Boolean splitopen = Standard_True);\r
- const TopoDS_Compound& GetClosedWires() const;\r
- const TopoDS_Compound& GetOpenWires() const;\r
-};\r
-\r
-%{#include <GCPnts_UniformDeflection.hxx>%}\r
-class GCPnts_UniformDeflection\r
-{\r
- %rename(initialize) Initialize;\r
- %rename(nbPoints) NbPoints;\r
- %rename(parameter) Parameter;\r
- public:\r
- GCPnts_UniformDeflection();\r
- void Initialize(Adaptor3d_Curve& C,const Standard_Real Deflection,\r
- const Standard_Real U1,const Standard_Real U2,\r
- const Standard_Boolean WithControl = Standard_True) ;\r
- Standard_Integer NbPoints() const;\r
- Standard_Real Parameter(const Standard_Integer Index) const;\r
-};\r
-\r
-%{#include <BRepMesh_DiscretRoot.hxx>%}\r
-class BRepMesh_DiscretRoot\r
-{\r
- %rename(setDeflection) SetDeflection;\r
- %rename(setAngle) SetAngle;\r
- %rename(deflection) Deflection;\r
- %rename(angle) Angle;\r
- %rename(perform) Perform;\r
- \r
- protected:\r
- BRepMesh_DiscretRoot();\r
- public:\r
- void SetDeflection(const Standard_Real D) ;\r
- void SetAngle(const Standard_Real Ang) ;\r
- Standard_Real Deflection() const;\r
- Standard_Real Angle() const;\r
- virtual void Perform();\r
-};\r
-\r
-%{#include <BRepMesh_IncrementalMesh.hxx>%}\r
-class BRepMesh_IncrementalMesh : public BRepMesh_DiscretRoot\r
-{\r
- %rename(perform) Perform;\r
- %rename(update) Update;\r
- %rename(isModified) IsModified;\r
- \r
- public:\r
- BRepMesh_IncrementalMesh();\r
- BRepMesh_IncrementalMesh(const TopoDS_Shape& S,const Standard_Real D,\r
- const Standard_Boolean Relatif = Standard_False,\r
- const Standard_Real Ang = 0.5);\r
- \r
- void Perform();\r
- void Update(const TopoDS_Shape& S) ;\r
- Standard_Boolean IsModified() const;\r
-};\r
-\r
-%{#include <GeomAPI_ProjectPointOnSurf.hxx>%}\r
-\r
-%typemap(javacode) GeomAPI_ProjectPointOnSurf\r
-%{\r
- public void lowerDistanceParameters(double[] uv)\r
- {\r
- double[] d2=new double[1];\r
- lowerDistanceParameters(uv, d2);\r
- uv[1]=d2[0];\r
- }\r
-%}\r
-\r
-class GeomAPI_ProjectPointOnSurf\r
-{\r
- %rename(init) Init;\r
- %rename(nbPoints) NbPoints;\r
- %rename(lowerDistanceParameters) LowerDistanceParameters;\r
- %rename(lowerDistance) LowerDistance;\r
- %rename(point) Point;\r
- %rename(parameters) Parameters;\r
- %rename(nearestPoint) NearestPoint;\r
- public:\r
- GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,\r
- const Handle_Geom_Surface & Surface);\r
- void Init(const gp_Pnt& P,const Handle_Geom_Surface & surface);\r
- Standard_Integer NbPoints() const; \r
- Quantity_Length LowerDistance() const;\r
- const gp_Pnt Point(const Standard_Integer Index) const; \r
- void LowerDistanceParameters(Quantity_Parameter& U,Quantity_Parameter& V) const;\r
- void Parameters(const Standard_Integer Index,Quantity_Parameter& U,Quantity_Parameter& V) const;\r
- gp_Pnt NearestPoint() const;\r
-};\r
-\r
-/**\r
- * BRepAlgo\r
- */\r
-%{#include <BRepAlgo.hxx>%}\r
-class BRepAlgo\r
-{\r
- %rename(isValid) IsValid;\r
- %rename(isTopologicallyValid) IsTopologicallyValid;\r
- public: \r
- static Standard_Boolean IsValid(const TopoDS_Shape& S);\r
- static Standard_Boolean IsTopologicallyValid(const TopoDS_Shape& S);\r
-};\r
+/*
+ * Project Info: http://jcae.sourceforge.net
+ *
+ * This program 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 program 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 program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * (C) Copyright 2005, by EADS CRC
+ * (C) Copyright 2008, 2009, by EADS France
+ */
+
+%module OccJava
+
+%{
+#ifdef HAVE_CONFIG_H
+//config.h generated by autotools from config.h.in (see an example in Opencascade).
+#include "config.h"
+#endif
+#include <Adaptor3d_Curve.hxx>
+#include <TopExp.hxx>
+#include <Poly_Triangulation.hxx>
+%}
+
+// Handle enums with Java enums
+%javaconst(1);
+%include "enums.swg"
+
+// Handle C arrays as Java arrays
+%include "arrays_java.i";
+%apply double[] {double *};
+%apply double[] {double &};
+
+// load the native library
+%pragma(java) jniclasscode=%{
+ static
+ {
+ System.loadLibrary("TKERNEL");
+ System.loadLibrary("TKMATH");
+ System.loadLibrary("TKG2D");
+ System.loadLibrary("TKG3D");
+ System.loadLibrary("TKGEOMBASE");
+ System.loadLibrary("TKBREP");
+ System.loadLibrary("TKGEOMALGO");
+ System.loadLibrary("TKTOPALGO");
+ System.loadLibrary("TKMESH");
+
+ System.loadLibrary("TKPRIM");
+ System.loadLibrary("TKSHHEALING");
+ System.loadLibrary("TKBO");
+
+ System.loadLibrary("TKBOOL");
+ System.loadLibrary("TKFILLET");
+ System.loadLibrary("TKOFFSET");
+
+ System.loadLibrary("TKXSBASE");
+ System.loadLibrary("TKIGES");
+ System.loadLibrary("TKSTEPBASE");
+ System.loadLibrary("TKSTEPATTR");
+ System.loadLibrary("TKSTEP209");
+ System.loadLibrary("TKSTEP");
+
+ System.loadLibrary("OccJava");
+ String mmg_opt= System.getenv("MMGT_OPT");
+ if(mmg_opt != null && !"0".equals(mmg_opt))
+ throw new RuntimeException("The MMGT_OPT environment variable must be set to 0 before using occjava.");
+ }
+%}
+
+%include "Standard.i"
+%include "gp.i"
+%include "TCol.i"
+%include "TopAbs.i"
+%include "TopoDS.i"
+%include "GeomAbs.i"
+%include "TopTools.i"
+%include "BRep.i"
+%include "GeomLProp_SLProps.i"
+%include "BRepTools.i"
+%include "BRepBuilderAPI.i"
+%include "BRepOffsetAPI.i"
+%include "BRepPrimAPI.i"
+%include "BRepAlgoAPI.i"
+%include "Poly.i"
+%include "Geom.i"
+%include "BRepLib.i"
+%include "BRepFilletAPI.i"
+%include "BRepCheck.i"
+%include "ShapeBuild.i"
+%include "XSControl.i"
+%include "ShapeFix.i"
+%include "APIHeaderSection_MakeHeader.i"
+// This one require Opencascade 6.2
+%include "ShapeUpgrade.i"
+//Jens Schmidt, req. f. Thesis
+%include "GeomAPI.i"
+%include "GC.i"
+
+
+%typemap(javacode) TopExp
+%{
+ public static TopoDS_Vertex[] vertices(TopoDS_Edge edge)
+ {
+ TopoDS_Vertex first=new TopoDS_Vertex();
+ TopoDS_Vertex second=new TopoDS_Vertex();
+ vertices(edge, first, second);
+ return new TopoDS_Vertex[]{first, second};
+ }
+%}
+
+class TopLoc_Location
+{
+ %rename(isIdentity) IsIdentity;
+ %rename(transformation) Transformation;
+ public:
+ Standard_Boolean IsIdentity();
+ const gp_Trsf& Transformation();
+};
+
+class TopExp
+{
+ public:
+ %rename(vertices) Vertices;
+ static void Vertices(const TopoDS_Edge& E,TopoDS_Vertex& Vfirst,TopoDS_Vertex& Vlast,const Standard_Boolean CumOri = Standard_False) ;
+};
+
+/**
+ * TopExp_Explorer
+ */
+%{#include "TopExp_Explorer.hxx"%}
+class TopExp_Explorer
+{
+ public:
+ TopExp_Explorer();
+ TopExp_Explorer(const TopoDS_Shape& S,const TopAbs_ShapeEnum ToFind,
+ const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE);
+ %rename(init) Init;
+ %rename(more) More;
+ %rename(next) Next;
+ %rename(current) Current;
+ void Init(const TopoDS_Shape& S, const TopAbs_ShapeEnum ToFind,
+ const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE) ;
+ Standard_Boolean More() const;
+ void Next() ;
+ const TopoDS_Shape & Current();
+};
+
+/**
+ * Bnd_Box
+ */
+%{#include "Bnd_Box.hxx"%}
+%typemap(javacode) Bnd_Box
+%{
+ /**
+ * Return the array { Xmin, Ymin, Zmin, Xmax, Ymax, Zmax }
+ */
+ public double[] get()
+ {
+ double[] toReturn=new double[6];
+ get(toReturn);
+ return toReturn;
+ }
+%}
+
+class Bnd_Box
+{
+ %rename(isVoid) IsVoid;
+ public:
+ Bnd_Box();
+ Standard_Boolean IsVoid() const;
+};
+
+%extend Bnd_Box
+{
+ void get(double box[6])
+ {
+ if(!self->IsVoid())
+ self->Get(box[0], box[1], box[2], box[3], box[4], box[5]);
+ }
+};
+
+/**
+ * BRepBndLib
+ */
+%{#include "BRepBndLib.hxx"%}
+class BRepBndLib
+{
+ public:
+ %rename(add) Add;
+ static void Add(const TopoDS_Shape& shape,Bnd_Box& bndBox);
+};
+
+/**
+ * Adaptor2d_Curve2d
+ */
+%{#include "Adaptor2d_Curve2d.hxx"%}
+
+class Adaptor2d_Curve2d
+{
+ Adaptor2d_Curve2d()=0;
+ public:
+ %rename(value) Value;
+ virtual gp_Pnt2d Value(const Standard_Real U) const;
+};
+
+/**
+ * Geom2dAdaptor_Curve
+ */
+%{#include "Geom2dAdaptor_Curve.hxx"%}
+class Geom2dAdaptor_Curve: public Adaptor2d_Curve2d
+{
+ %rename(load) Load;
+ public:
+ Geom2dAdaptor_Curve();
+ Geom2dAdaptor_Curve(const Handle_Geom2d_Curve & C);
+ Geom2dAdaptor_Curve(const Handle_Geom2d_Curve & C,const Standard_Real UFirst,const Standard_Real ULast);
+ void Load(const Handle_Geom2d_Curve & C) ;
+ void Load(const Handle_Geom2d_Curve & C,const Standard_Real UFirst,const Standard_Real ULast) ;
+};
+
+/**
+ * Adaptor3d_Curve
+ */
+%{#include "Adaptor3d_Curve.hxx"%}
+
+class Adaptor3d_Curve
+{
+ Adaptor3d_Curve()=0;
+ public:
+ %rename(value) Value;
+ const gp_Pnt Value(const Standard_Real U) const;
+};
+
+//extends the Adaptor3d_Curve class to reduce the JNI overhead when
+//calling a lot of Adaptor3d_Curve.Value
+%extend Adaptor3d_Curve
+{
+ public:
+ void arrayValues(int size, double u[])
+ {
+ for (int i = 0; i < size; i++)
+ {
+ gp_Pnt gp=self->Value(u[3*i]);
+ u[3*i] = gp.X();
+ u[3*i+1] = gp.Y();
+ u[3*i+2] = gp.Z();
+ }
+ }
+};
+
+/**
+ * GeomAdaptor_Curve
+ */
+%{#include "GeomAdaptor_Curve.hxx"%}
+
+class GeomAdaptor_Curve: public Adaptor3d_Curve
+{
+ %rename(load) Load;
+ public:
+ GeomAdaptor_Curve();
+ GeomAdaptor_Curve(const Handle_Geom_Curve & C);
+ GeomAdaptor_Curve(const Handle_Geom_Curve & C,
+ const Standard_Real UFirst,const Standard_Real ULast);
+ void Load(const Handle_Geom_Curve & C) ;
+ void Load(const Handle_Geom_Curve & C,
+ const Standard_Real UFirst,const Standard_Real ULast) ;
+
+};
+
+
+/**
+ * GProp_GProps
+ */
+ %{#include "GProp_GProps.hxx"%}
+// class GProp_GProps
+// {
+// public:
+// %rename(mass) Mass;
+// GProp_GProps();
+// Standard_Real Mass() const;
+//};
+class GProp_GProps
+{
+ public:
+ %rename(mass) Mass;
+ %rename(centreOfMass) CentreOfMass;
+ %rename(matrixOfInertia) MatrixOfInertia;
+ GProp_GProps();
+ Standard_Real Mass() const;
+ gp_Pnt CentreOfMass() const;
+ gp_Mat MatrixOfInertia() const;
+};
+
+%{#include "GProp_PGProps.hxx"%}
+class GProp_PGProps : public GProp_GProps
+{
+};
+%{#include "GProp_CelGProps.hxx"%}
+class GProp_CelGProps: public GProp_GProps
+{
+};
+
+%{#include "GProp_SelGProps.hxx"%}
+class GProp_SelGProps: public GProp_GProps
+{
+};
+
+%{#include "GProp_VelGProps.hxx"%}
+class GProp_VelGProps: public GProp_GProps
+{
+};
+
+
+//%{#include "GProp_CGProps.gxx"%}
+//class GProp_CGProps: public GProp_GProps
+//{
+//};
+
+//%{#include "GProp_SGProps.gxx"%}
+//class GProp_SGProps: public GProp_GProps
+//{
+//};
+
+//%{#include "GProp_VGProps.gxx"%}
+//class GProp_VGProps
+//{
+//};
+
+
+/**
+ * BRepGProp
+ */
+%{#include "BRepGProp.hxx"%}
+class BRepGProp
+{
+ public:
+ %rename(linearProperties) LinearProperties;
+ %rename(surfaceProperties) SurfaceProperties;
+ %rename(volumeProperties) VolumeProperties;
+ %rename(volumePropertiesGK) VolumePropertiesGK;
+ static void LinearProperties(const TopoDS_Shape& shape, GProp_GProps& properties);
+ static void VolumeProperties(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Boolean onlyClosed = Standard_False) ;
+ static Standard_Real VolumeProperties(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Real Eps, const Standard_Boolean onlyClosed = Standard_False) ;
+ static void SurfaceProperties(const TopoDS_Shape& shape, GProp_GProps& properties) ;
+ static Standard_Real SurfaceProperties(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Real Eps) ;
+ static Standard_Real VolumePropertiesGK(const TopoDS_Shape& shape, GProp_GProps& properties, const Standard_Real Eps, const Standard_Boolean onlyClosed = Standard_False, const Standard_Boolean isUseSpan = Standard_False, const Standard_Boolean cgFlag = Standard_False, const Standard_Boolean iFlag = Standard_False) ;
+};
+
+/**
+ *
+ */
+%rename(VOID) IFSelect_RetVoid;
+%rename(DONE) IFSelect_RetDone;
+%rename(ERROR) IFSelect_RetError;
+%rename(FAIL) IFSelect_RetFail;
+%rename(STOP) IFSelect_RetStop;
+enum IFSelect_ReturnStatus {
+ IFSelect_RetVoid,
+ IFSelect_RetDone,
+ IFSelect_RetError,
+ IFSelect_RetFail,
+ IFSelect_RetStop
+};
+
+%{#include <ShapeAnalysis_FreeBounds.hxx>%}
+class ShapeAnalysis_FreeBounds
+{
+ %rename(getClosedWires) GetClosedWires;
+ %rename(getOpenWires) GetOpenWires;
+ public:
+ ShapeAnalysis_FreeBounds(const TopoDS_Shape& shape,
+ const Standard_Boolean splitclosed = Standard_False,
+ const Standard_Boolean splitopen = Standard_True);
+ const TopoDS_Compound& GetClosedWires() const;
+ const TopoDS_Compound& GetOpenWires() const;
+};
+
+%{#include <GCPnts_UniformDeflection.hxx>%}
+class GCPnts_UniformDeflection
+{
+ %rename(initialize) Initialize;
+ %rename(nbPoints) NbPoints;
+ %rename(parameter) Parameter;
+ public:
+ GCPnts_UniformDeflection();
+ void Initialize(Adaptor3d_Curve& C,const Standard_Real Deflection,
+ const Standard_Real U1,const Standard_Real U2,
+ const Standard_Boolean WithControl = Standard_True) ;
+ Standard_Integer NbPoints() const;
+ Standard_Real Parameter(const Standard_Integer Index) const;
+};
+
+%{#include <BRepMesh_DiscretRoot.hxx>%}
+class BRepMesh_DiscretRoot
+{
+ //%rename(setDeflection) SetDeflection;
+ //%rename(setAngle) SetAngle;
+ //%rename(deflection) Deflection;
+ //%rename(angle) Angle;
+ %rename(perform) Perform;
+
+ protected:
+ BRepMesh_DiscretRoot();
+ public:
+ //void SetDeflection(const Standard_Real D) ;
+ //void SetAngle(const Standard_Real Ang) ;
+ //Standard_Real Deflection() const;
+ //Standard_Real Angle() const;
+ virtual void Perform();
+};
+
+%{#include <BRepMesh_IncrementalMesh.hxx>%}
+class BRepMesh_IncrementalMesh : public BRepMesh_DiscretRoot
+{
+ %rename(perform) Perform;
+ %rename(isModified) IsModified;
+
+ public:
+ BRepMesh_IncrementalMesh();
+ BRepMesh_IncrementalMesh(const TopoDS_Shape& S,const Standard_Real D,
+ const Standard_Boolean Relatif = Standard_False,
+ const Standard_Real Ang = 0.5);
+
+ void Perform();
+ Standard_Boolean IsModified() const;
+};
+
+%{#include <GeomAPI_ProjectPointOnSurf.hxx>%}
+
+%typemap(javacode) GeomAPI_ProjectPointOnSurf
+%{
+ public void lowerDistanceParameters(double[] uv)
+ {
+ double[] d2=new double[1];
+ lowerDistanceParameters(uv, d2);
+ uv[1]=d2[0];
+ }
+%}
+
+class GeomAPI_ProjectPointOnSurf
+{
+ %rename(init) Init;
+ %rename(nbPoints) NbPoints;
+ %rename(lowerDistanceParameters) LowerDistanceParameters;
+ %rename(lowerDistance) LowerDistance;
+ %rename(point) Point;
+ %rename(parameters) Parameters;
+ %rename(nearestPoint) NearestPoint;
+ public:
+ GeomAPI_ProjectPointOnSurf(const gp_Pnt& P,
+ const Handle_Geom_Surface & Surface);
+ void Init(const gp_Pnt& P,const Handle_Geom_Surface & surface);
+ Standard_Integer NbPoints() const;
+ Standard_Real LowerDistance() const;
+ const gp_Pnt Point(const Standard_Integer Index) const;
+ void LowerDistanceParameters(Standard_Real& U,Standard_Real& V) const;
+ void Parameters(const Standard_Integer Index,Standard_Real& U,Standard_Real& V) const;
+ gp_Pnt NearestPoint() const;
+};
+
+/**
+ * BRepAlgo
+ */
+%{#include <BRepAlgo.hxx>%}
+class BRepAlgo
+{
+ %rename(isValid) IsValid;
+ %rename(isTopologicallyValid) IsTopologicallyValid;
+ public:
+ static Standard_Boolean IsValid(const TopoDS_Shape& S);
+ static Standard_Boolean IsTopologicallyValid(const TopoDS_Shape& S);
+};