Back to index

salome-geom  6.5.0
GEOMImpl_IBasicOperations.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef _GEOMImpl_IBasicOperations_HXX_
00024 #define _GEOMImpl_IBasicOperations_HXX_
00025 
00026 #include "Utils_SALOME_Exception.hxx"
00027 #include "GEOM_IOperations.hxx"
00028 #include "GEOM_Engine.hxx"
00029 #include "GEOM_Object.hxx"
00030 #include <TDocStd_Document.hxx>
00031 
00032 class GEOMImpl_IBasicOperations : public GEOM_IOperations {
00033  public:
00034   Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID);
00035   Standard_EXPORT ~GEOMImpl_IBasicOperations();
00036 
00037   // Point
00038   Standard_EXPORT Handle(GEOM_Object) MakePointXYZ (double theX, double theY, double theZ);
00039 
00040   Standard_EXPORT Handle(GEOM_Object) MakePointWithReference (Handle(GEOM_Object) theReference,
00041                                               double theX, double theY, double theZ);
00042 
00043   Standard_EXPORT Handle(GEOM_Object) MakePointOnCurve (Handle(GEOM_Object) theCurve,
00044                                                         double theParameter);
00045 
00046   Standard_EXPORT Handle(GEOM_Object) MakePointOnCurveByLength (Handle(GEOM_Object) theCurve,
00047                                                         double              theLength,
00048                                                         Handle(GEOM_Object) theStartPoint);
00049 
00050   Standard_EXPORT Handle(GEOM_Object) MakePointOnCurveByCoord (Handle(GEOM_Object) theCurve,
00051                                                                double theXParam,
00052                                                                double theYParam,
00053                                                                double theZParam);
00054 
00055   Standard_EXPORT Handle(GEOM_Object) MakePointOnLinesIntersection
00056                                       (Handle(GEOM_Object) theLine1, Handle(GEOM_Object) theLine2);
00057 
00058   Standard_EXPORT Handle(GEOM_Object) MakePointOnSurface (Handle(GEOM_Object) theSurface,
00059                                                           double theUParameter,
00060                                                           double theVParameter);
00061 
00062   Standard_EXPORT Handle(GEOM_Object) MakePointOnSurfaceByCoord (Handle(GEOM_Object) theSurface,
00063                                                                  double theXParam,
00064                                                                  double theYParam,
00065                                                                  double theZParam);
00066 
00067   // Vector
00068   Standard_EXPORT Handle(GEOM_Object) MakeVectorDXDYDZ (double theDX, double theDY, double theDZ);
00069 
00070   Standard_EXPORT Handle(GEOM_Object) MakeVectorTwoPnt (Handle(GEOM_Object) thePnt1,
00071                                         Handle(GEOM_Object) thePnt2);
00072 
00073   Standard_EXPORT Handle(GEOM_Object) MakeTangentOnCurve(const Handle(GEOM_Object)& theCurve, 
00074                                                          double theParameter);
00075 
00076   // Line
00077   Standard_EXPORT Handle(GEOM_Object) MakeLineTwoPnt (Handle(GEOM_Object) thePnt1,
00078                                       Handle(GEOM_Object) thePnt2);
00079 
00080   Standard_EXPORT Handle(GEOM_Object) MakeLineTwoFaces (Handle(GEOM_Object) theFace1,
00081                                       Handle(GEOM_Object) theFace2);
00082 
00083   Standard_EXPORT Handle(GEOM_Object) MakeLine (Handle(GEOM_Object) thePnt,
00084                                 Handle(GEOM_Object) theDir);
00085 
00086   // Plane
00087   Standard_EXPORT Handle(GEOM_Object) MakePlaneThreePnt (Handle(GEOM_Object) thePnt1,
00088                                          Handle(GEOM_Object) thePnt2,
00089                                          Handle(GEOM_Object) thePnt3,
00090                                          double theSize);
00091 
00092   Standard_EXPORT Handle(GEOM_Object) MakePlanePntVec (Handle(GEOM_Object) thePnt,
00093                                        Handle(GEOM_Object) theVec,
00094                                        double theSize);
00095 
00096   Standard_EXPORT Handle(GEOM_Object) MakePlaneFace (Handle(GEOM_Object) theFace, double theSize);
00097   
00098   Standard_EXPORT Handle(GEOM_Object) MakePlane2Vec (Handle(GEOM_Object) theVec1,
00099                                                      Handle(GEOM_Object) theVec2,
00100                                                      double theSize);
00101                                                      
00102   Standard_EXPORT Handle(GEOM_Object) MakePlaneLCS (Handle(GEOM_Object) theFace, double theSize, int theOrientation);
00103 
00104   // Marker
00105   Standard_EXPORT Handle(GEOM_Object) MakeMarker (double theOX,  double theOY,  double theOZ,
00106                                   double theXDX, double theXDY, double theXDZ,
00107                                   double theYDX, double theYDY, double theYDZ);
00108                               
00109   Standard_EXPORT Handle(GEOM_Object) MakeMarkerFromShape (const Handle(GEOM_Object)& theShape);
00110   
00111   Standard_EXPORT Handle(GEOM_Object) MakeMarkerPntTwoVec (const Handle(GEOM_Object)& theOrigin,
00112                                                            const Handle(GEOM_Object)& theXVec,
00113                                                            const Handle(GEOM_Object)& theYVec);
00114 
00115   Standard_EXPORT Handle(GEOM_Object) MakeTangentPlaneOnFace(const Handle(GEOM_Object)& theFace,
00116                                                              double theParamU,
00117                                                              double theParamV,
00118                                                              double theSize);
00119 
00120   private:
00121   // Private methods
00122 
00125   enum PointLocation
00126   { 
00127     PointOn_CurveByParam,
00128     PointOn_CurveByCoord,
00129     PointOn_CurveByLength,   
00130     PointOn_SurfaceByParam,
00131     PointOn_SurfaceByCoord
00132   };
00133 
00134   Handle(GEOM_Object) makePointOnGeom (Handle(GEOM_Object) theGeomObj,
00135                                        double theParam1,
00136                                        double theParam2,
00137                                        double theParam3,
00138                                        const PointLocation theLocation,
00139                                    Handle(GEOM_Object) theRefPoint = 0);
00140 };
00141 
00142 #endif