Skip to content
Snippets Groups Projects
Commit a81c25ff authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

move DivideAndConquer to mesh module, since it now depends plenty of GModel

parent 7d01aacb
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,15 @@
#include <math.h>
#include <time.h>
#include <stdlib.h>
#include "GmshConfig.h"
#include "SOrientedBoundingBox.h"
#include "fullMatrix.h"
#include "DivideAndConquer.h"
#include "SBoundingBox3d.h"
#if defined(HAVE_MESH)
#include "DivideAndConquer.h"
#endif
double SOrientedBoundingRectangle::area()
{
double b = size->at(0);
......@@ -201,6 +205,7 @@ bool SOrientedBoundingBox::intersects(SOrientedBoundingBox& obb)
SOrientedBoundingBox* SOrientedBoundingBox::buildOBB(std::vector<SPoint3> vertices)
{
#if defined(HAVE_MESH)
int num_vertices = vertices.size();
// First organize the data
fullMatrix<double> data(3,num_vertices);
......@@ -547,6 +552,10 @@ SOrientedBoundingBox* SOrientedBoundingBox::buildOBB(std::vector<SPoint3> vertic
*/
return (new SOrientedBoundingBox(center,
size[0], size[1], size[2], Axis1, Axis2, Axis3));
#else
Msg::Error("SOrientedBoundingBox requires mesh module");
return 0;
#endif
}
double SOrientedBoundingBox::compare(SOrientedBoundingBox& obb1, SOrientedBoundingBox& obb2)
......
......@@ -32,6 +32,7 @@ CenterlineField.cpp
QuadTriUtils.cpp
QuadTriExtruded2D.cpp QuadTriExtruded3D.cpp QuadTriTransfinite3D.cpp
simple3D.cpp
DivideAndConquer.cpp
Voronoi3D.cpp
Levy3D.cpp
periodical.cpp
......
File moved
File moved
......@@ -23,7 +23,6 @@ set(SRC
robustPredicates.cpp
mathEvaluator.cpp
Iso.cpp
DivideAndConquer.cpp
)
file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
......
......@@ -4,6 +4,7 @@
// bugs and problems to <gmsh@geuz.org>.
#include <vector>
#include "GmshConfig.h"
#include "GModel.h"
#include "GmshMessage.h"
#include "Tetrahedralize.h"
......
......@@ -5,14 +5,18 @@
#include <vector>
#include <stdlib.h>
#include "GmshConfig.h"
#include "GModel.h"
#include "discreteFace.h"
#include "DivideAndConquer.h"
#include "GmshMessage.h"
#include "MVertex.h"
#include "Triangulate.h"
#include "Context.h"
#if defined(HAVE_MESH)
#include "DivideAndConquer.h"
#endif
StringXNumber TriangulateOptions_Number[] = {
{GMSH_FULLRC, "View", NULL, -1.}
};
......@@ -70,6 +74,7 @@ static void project(MVertex *v, double mat[3][3])
PView *GMSH_TriangulatePlugin::execute(PView *v)
{
#if defined(HAVE_MESH)
int iView = (int)TriangulateOptions_Number[0].def;
PView *v1 = getView(iView, v);
......@@ -176,4 +181,8 @@ PView *GMSH_TriangulatePlugin::execute(PView *v)
data2->finalize();
return v2;
#else
Msg::Error("Plugin(Triangulate) requires mesh module");
return v;
#endif
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment