diff --git a/Geo/CMakeLists.txt b/Geo/CMakeLists.txt index 514533cc4e539888164f5efaf9042d15a863b2c2..4cd0471bc0961dc5f9c3e700f8985e4e962b3d5a 100644 --- a/Geo/CMakeLists.txt +++ b/Geo/CMakeLists.txt @@ -11,7 +11,7 @@ set(SRC GEdgeLoop.cpp GEdgeCompound.cpp GFaceCompound.cpp GRegionCompound.cpp GRbf.cpp gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp - gmshCurve.cpp gmshSurface.cpp + gmshSurface.cpp OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp discreteEdge.cpp discreteFace.cpp discreteRegion.cpp fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp diff --git a/Geo/gmshCurve.cpp b/Geo/gmshCurve.cpp deleted file mode 100644 index 82f9ee5fbf5ab542cbc6b9257998908df998fbb8..0000000000000000000000000000000000000000 --- a/Geo/gmshCurve.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "gmshCurve.h" -#include "Geo.h" -#include "GeoInterpolation.h" -SVector3 gmshCurve::curvature (double t) const { - - SVector3 dx = firstDer(t); - SVector3 dxx = secondDer(t); - - double normdx = dx.norm(); - double oneovernormdx = 1./normdx; - double oneovernormdx3 = oneovernormdx*oneovernormdx*oneovernormdx; - - SVector3 c = (dxx * normdx - dx * (dot(dx,dxx) * oneovernormdx))*oneovernormdx3; - return c; -} - - -gmshCubicSpline::gmshCubicSpline (std::vector<SPoint3> & data) -{ - c = Create_Curve ( 0 , MSH_SEGM_BSPLN , 3 , 0 , 0 , 0 , 0 , 0., 1.) ; - - c->Control_Points = List_Create(data.size(), 1, sizeof(Vertex *)); - - for (unsigned int i=0;i<data.size(); i++){ - Vertex *v = new Vertex (data[i].x(),data[i].y(),data[i].z(), 0.0); - List_Add (c->Control_Points, &v); - } -} - -gmshCubicSpline::gmshCubicSpline (std::vector<SPoint2> & data) -{ - c = Create_Curve ( 0 , MSH_SEGM_BSPLN , 3 , 0 , 0 , 0 , 0 , 0., 1.) ; - - c->Control_Points = List_Create(data.size(), 1, sizeof(Vertex *)); - - for (unsigned int i=0;i<data.size(); i++){ - Vertex *v = new Vertex (data[i].x(),data[i].y(),0.0, 0.0); - List_Add (c->Control_Points, &v); - } -} - -SPoint3 gmshCubicSpline::point (double t) const -{ - Vertex v = InterpolateCurve(c, t, 0); - return SPoint3 (v.Pos.X,v.Pos.Y,v.Pos.Z); -} - -SVector3 gmshCubicSpline::firstDer (double t) const -{ - Vertex v = InterpolateCurve(c, t, 1); - return SVector3 (v.Pos.X,v.Pos.Y,v.Pos.Z); -} - -SVector3 gmshCubicSpline::secondDer (double t) const -{ - Vertex v = InterpolateCurve(c, t, 2); - return SVector3 (v.Pos.X,v.Pos.Y,v.Pos.Z); -} - - -gmshCubicSpline::~gmshCubicSpline () -{ - for (int i=0;i< List_Nbr(c->Control_Points); i++){ - Vertex *v; - List_Read(c->Control_Points, i, &v); - delete v; - } - List_Delete(c->Control_Points); -} - diff --git a/Geo/gmshCurve.h b/Geo/gmshCurve.h deleted file mode 100644 index 6a8e5788ad5aea0db60fef063471404fd8ea41e3..0000000000000000000000000000000000000000 --- a/Geo/gmshCurve.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _GMSH_CURVE_ -#define _GMSH_CURVE_ -#include <vector> -#include "SVector3.h" -#include "SPoint3.h" -#include "SPoint2.h" - -class Curve; - -class gmshCurve { - public : - virtual SPoint3 point (double t) const = 0; - virtual SVector3 firstDer (double t) const = 0; - virtual SVector3 secondDer (double t) const = 0; - SVector3 curvature (double t) const; -}; - -class gmshCubicSpline : public gmshCurve -{ - Curve *c; - public: - gmshCubicSpline (std::vector<SPoint3> & data); - gmshCubicSpline (std::vector<SPoint2> & data); - ~gmshCubicSpline(); - virtual SPoint3 point (double t) const; - virtual SVector3 firstDer (double t) const; - virtual SVector3 secondDer (double t) const; -}; - - -#endif