CGAL location
While compiling OpenFOAM I ran into this error:
Code:
-L/lib64 -L/lib64 -L/lustre/home/user/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/boost-system/lib -L/lustre/home/user/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/CGAL-4.10/lib -lCGAL -lmpfr -lmeshTools -ledgeMesh -lfileFormats -ltriSurface -ldynamicMesh -lsurfMesh -lsampling -lsnappyHexMesh -o /lustre/home/user/OpenFOAM/OpenFOAM-4.1/platforms/linux64GccDPInt32Opt/lib/libconformalVoronoiMesh.so Code:
.../platforms/linux64Gcc/CGAL-4.10/lib64 # Note lib64 instead of lib |
this answer can be easily given by wyldcat.....he is second to none...d best
|
issue
Hi Macelee, Have you found a better way to resolve it?
regards, Nish Quote:
|
See file:
Code:
OpenFOAM/OpenFOAM-5.0/etc/config.sh/CGAL Code:
thirdPartyPath=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH In the same file you will also see: Code:
export CGAL_ARCH_PATH=$thirdPartyPath/$cgal_version You can modify here using sed if you want to automate it in a build script. For instance: Code:
sed 's,_foamAddLib $CGAL_ARCH_PATH\/lib,_foamAddLib $CGAL_ARCH_PATH\/lib64' $WM_PROJECT_DIR/etc/config.sh/CGAL |
Quote:
Sometime you only want to add a library path if it really exists, sometimes it doesn't exists until the ThirdParty build is through. For OpenFOAM-v1806, this problem is handled with some additional logic, bundled as a _foamAddLibAuto function. If you want to auto explore lib/ and lib64/ but only use it if it exists: Code:
_foamAddLibAuto $CGAL_ARCH_PATH Code:
_foamAddLibAuto $CGAL_ARCH_PATH lib$WM_COMPILER_LIB_ARCH Code:
-DCGAL_INSTALL_LIB_DIR=lib$WM_COMPILER_LIB_ARCH |
Delaunay triangulation 3D with CGAL
I am trying to use CGAL to do some Delaunay triangulation. I used one of the CGAL samples to compute a triangulation which includes a height field attribute.
The problem I have having is that I have no idea how to get the resulting triangulation. I figured out how to get the face_iterator, but I don't know what to do from there. What I'm hoping to get is an index into the point array for each of the 3 points on each triangle. Im just wanna get smth like: Triang: triangle1 = (1,2,3) triangle2 = (3,4,1) where numbers its a vertices HELP PLEASE!!! This is my code: #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/Random.h> #include <CGAL/Triangulation_3.h> #include <CGAL/Delaunay_triangulation_cell_base_3.h> #include <CGAL/Triangulation_vertex_base_with_info_3.h> #include <vector> #include <cassert> #include <iostream> #include <fstream> using namespace std; typedef CGAL::Exact_predicates_inexact_constructions_kerne l K; typedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Delaunay; typedef Delaunay::Point Point; typedef Delaunay::Vertex_handle Vertex_handle; typedef Delaunay::Cell_handle Cell_handle; typedef Delaunay::All_cells_iterator Cells_iterator; typedef Delaunay::Vertex Vertex; typedef CGAL::Triangulation_vertex_base_with_info_3<unsign ed, K> Vb; typedef CGAL::Delaunay_triangulation_cell_base_3<K> Cb; typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds; typedef Delaunay::Finite_vertices_iterator Finite_vertices_iterator; typedef Delaunay::Finite_edges_iterator Finite_edges_iterator; typedef Delaunay::Finite_facets_iterator Finite_facets_iterator; typedef Delaunay::Finite_cells_iterator Finite_cells_iterator; typedef Delaunay::Simplex Simplex; typedef Delaunay::Locate_type Locate_type; int main() { // generating points on a grid. std::vector<Point> P; for (int z = 0; z < 3; z++) for (int y = 0; y < 3; y++) for (int x = 0; x < 3; x++) P.push_back(Point(x, y, z)); // building their Delaunay triangulation. Delaunay T(P.begin(), P.end()); //assert(T.number_of_vertices() == 8000); for (?????????) { ???????????????????????? } std::ofstream oFileT("output", std::ios::out); // writing file output; oFileT << T; cout << T.is_valid() << endl; return 0; } ``` |
All times are GMT -4. The time now is 16:46. |