Skip to content

Commit a9a39cc

Browse files
committed
[geogram] update to 1.3.9
1 parent 040b3ea commit a9a39cc

736 files changed

Lines changed: 126808 additions & 9113 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ include(cmake/geogram.cmake)
3030

3131
set(VORPALINE_VERSION_MAJOR 1)
3232
set(VORPALINE_VERSION_MINOR 3)
33-
set(VORPALINE_VERSION_PATCH 8)
33+
set(VORPALINE_VERSION_PATCH 9)
3434
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})
3535

3636
set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})

cmake/FindGeogram.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
#
66
# This module defines the following variables:
77
#
8-
# Geogram_FOUND - True if geogram has been found.
9-
# Geogram::geogram - Imported target for the main Geogram library.
8+
# Geogram_FOUND - True if geogram has been found.
9+
# Geogram::geogram - Imported target for the main Geogram library.
10+
# Geogram::geogram_gfx - Imported target for Geogram graphics library.
1011
#
1112
# This module reads hints about the Geogram location from the following
1213
# environment variables:

src/bin/geobox/main.cpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#include <geogram/mesh/mesh_decimate.h>
5656
#include <geogram/mesh/mesh_tetrahedralize.h>
5757
#include <geogram/mesh/mesh_topology.h>
58+
#include <geogram/mesh/mesh_AABB.h>
5859

5960
#include <geogram/delaunay/LFS.h>
6061

@@ -101,7 +102,7 @@ namespace {
101102
);
102103
ImGui::Image(
103104
convert_to_ImTextureID(geogram_logo_texture_),
104-
ImVec2(256, 256)
105+
ImVec2(256.0f * scaling(), 256.0f * scaling())
105106
);
106107
ImGui::Text(
107108
"\n"
@@ -128,6 +129,15 @@ namespace {
128129
" (C)opyright 2006-2016\n"
129130
" The ALICE project, Inria\n"
130131
);
132+
ImGui::Text("\n");
133+
ImGui::Separator();
134+
ImGui::Text(
135+
"%s",
136+
(
137+
"GEOGRAM version:" +
138+
Environment::instance()->get_value("version")
139+
).c_str()
140+
);
131141
ImGui::EndMenu();
132142
}
133143
}
@@ -340,6 +350,12 @@ namespace {
340350
this, &GeoBoxApplication::compute_local_feature_size
341351
);
342352
}
353+
if(ImGui::MenuItem("compute distance to border")) {
354+
Command::set_current(
355+
"compute_distance_to_border(std::string attribute_name=\"distance\")",
356+
this, &GeoBoxApplication::compute_distance_to_border
357+
);
358+
}
343359
ImGui::EndMenu();
344360
}
345361
}
@@ -842,6 +858,27 @@ namespace {
842858
set_attribute("vertices." + attribute_name);
843859
show_attributes();
844860
}
861+
862+
void compute_distance_to_border(std::string attribute_name) {
863+
if(mesh()->cells.nb() == 0) {
864+
Logger::err("Distance") << "Mesh has no cell"
865+
<< std::endl;
866+
return;
867+
}
868+
begin();
869+
Attribute<double> distance(
870+
mesh()->vertices.attributes(), attribute_name
871+
);
872+
MeshFacetsAABB AABB(*mesh());
873+
for(index_t v=0; v<mesh()->vertices.nb(); ++v) {
874+
distance[v] = ::sqrt(
875+
AABB.squared_distance(vec3(mesh()->vertices.point_ptr(v)))
876+
);
877+
}
878+
end();
879+
set_attribute("vertices." + attribute_name);
880+
show_attributes();
881+
}
845882

846883
protected:
847884

src/bin/geodump/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ int main(int argc, char** argv) {
8787
<< file.read_string()
8888
<< std::endl;
8989
}
90+
} else if(chunk_class == "CMNT") {
91+
GEO::Logger::out("GeoFile")
92+
<< "comment: "
93+
<< file.current_comment()
94+
<< std::endl;
9095
} else if(
9196
chunk_class == "GROB" ||
9297
chunk_class == "SHDR" ||

src/demos/demo_Evert/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ namespace {
632632
ImGui::Text("\n");
633633
ImGui::Image(
634634
convert_to_ImTextureID(geogram_logo_texture_),
635-
ImVec2(256, 256)
635+
ImVec2(256.0f * scaling(), 256.0f * scaling())
636636
);
637637
ImGui::Text("\n");
638638
ImGui::Text(

src/lib/geogram/NL/OpenNL.psm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ nl_blas.h \
1212
nl_iterative_solvers.h \
1313
nl_preconditioners.h \
1414
nl_superlu.h \
15+
nl_cholmod.h \
1516
nl_cnc_gpu_cuda.h \
1617
nl_os.c \
1718
nl_matrix.c \
@@ -20,6 +21,7 @@ nl_blas.c \
2021
nl_iterative_solvers.c \
2122
nl_preconditioners.c \
2223
nl_superlu.c \
24+
nl_cholmod.c \
2325
nl_cnc_gpu_cuda.c \
2426
nl_api.c"
2527

src/lib/geogram/NL/nl_api.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "nl_preconditioners.h"
5050
#include "nl_cnc_gpu_cuda.h"
5151
#include "nl_superlu.h"
52+
#include "nl_cholmod.h"
5253

5354
/*****************************************************************************/
5455

@@ -57,7 +58,9 @@ NLboolean nlInitExtension(const char* extension) {
5758
nl_arg_used(extension);
5859

5960
if(!strcmp(extension, "SUPERLU")) {
60-
return nlInitExtension_SUPERLU() ;
61+
return nlInitExtension_SUPERLU();
62+
} else if(!strcmp(extension, "CHOLMOD")) {
63+
return nlInitExtension_CHOLMOD();
6164
}
6265

6366
#ifdef NL_USE_CNC
@@ -535,8 +538,8 @@ static void nlEndMatrix() {
535538
nlCurrentContext->preconditioner != NL_PRECOND_SSOR &&
536539
nlCurrentContext->solver != NL_SUPERLU_EXT &&
537540
nlCurrentContext->solver != NL_PERM_SUPERLU_EXT &&
538-
nlCurrentContext->solver != NL_SYMMETRIC_SUPERLU_EXT
539-
541+
nlCurrentContext->solver != NL_SYMMETRIC_SUPERLU_EXT &&
542+
nlCurrentContext->solver != NL_CHOLMOD_EXT
540543
) {
541544
if(getenv("NL_LOW_MEM") == NULL) {
542545
nlSparseMatrixCompress(&nlCurrentContext->M);

0 commit comments

Comments
 (0)