From 27262b0715d511287b128b3bb1c5dbb39d01b114 Mon Sep 17 00:00:00 2001 From: Emilie Marchandise <emilie.marchandise@uclouvain.be> Date: Mon, 13 Feb 2012 11:28:23 +0000 Subject: [PATCH] added empty centerline field for compile --- Mesh/CenterlineField.h | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/Mesh/CenterlineField.h b/Mesh/CenterlineField.h index c88b91d274..b2dfdfcef9 100644 --- a/Mesh/CenterlineField.h +++ b/Mesh/CenterlineField.h @@ -26,10 +26,6 @@ class discreteEdge; class discreteFace; class MElement; -#if defined(HAVE_ANN) -#include <ANN/ANN.h> -class ANNkd_tree; - // A branch of a 1D tree struct Branch{ int tag; @@ -42,6 +38,10 @@ struct Branch{ double maxRad; }; +#if defined(HAVE_ANN) +#include <ANN/ANN.h> +class ANNkd_tree; + // This class takes as input A 1D mesh which is the centerline // of a tubular 2D surface mesh // It computes a mesh size field function of the distance to the centerlines @@ -147,9 +147,38 @@ class Centerline : public Field{ //Print for debugging void printSplit() const; +}; +#else +class Centerline : public Field{ + public: + Centerline(std::string fileName); + Centerline(); + ~Centerline(); + + virtual bool isotropic () const {return false;} + virtual const char *getName() + { + return "centerline Field"; + } + virtual std::string getDescription() + { + return "The value of this field is the distance to the centerline.\n\n" +" You should specify a fileName that contains the centerline." +" The centerline of a surface can be obtained with the open source software vmtk (http://www.vmtk.org/)" +" using the following script:\n\n" +"vmtk vmtkcenterlines -seedselector openprofiles -ifile mysurface.stl -ofile centerlines.vtp --pipe vmtksurfacewriter -ifile centerlines.vtp -ofile centerlines.vtk\n"; + } + + void cleanMesh(); + + //isotropic operator for mesh size field function of distance to centerline + double operator() (double x, double y, double z, GEntity *ge=0); + //anisotropic operator + void operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge=0); + +} -}; #endif #endif -- GitLab