Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare proper software release of Software Remesher #1

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eb2fe38
Adding CMake rules to build the project, and Dockefile to define the …
dmikushin Sep 21, 2024
7d3382f
Renaming Visualizer.cpp to Visualizer.cu, so that it gets handled by …
dmikushin Sep 22, 2024
b288364
Fixing compiler errors by changing the order of CGAL include files in…
dmikushin Sep 22, 2024
92ef797
Correcting Dockerfile to add some CUDA architecture into CMake settings
dmikushin Sep 22, 2024
553d932
Cleaning up CMakeLists.txt from unused dependencies, switching the re…
dmikushin Sep 22, 2024
62b1c16
Adding building and usage instructions
dmikushin Sep 22, 2024
7ba66c8
clang-format-18
dmikushin Sep 22, 2024
fbce87b
Use path and name of input file for the output files
dmikushin Sep 22, 2024
56c78fe
Generating reference results for horse, nefertiti and pig meshes
dmikushin Sep 22, 2024
46731ca
Adding a script to utomatically render screenshots for the given mesh…
dmikushin Sep 22, 2024
9594741
Adding sample screenshots, cropped from polyscope renders
dmikushin Sep 22, 2024
0bb074a
Remove old visualization tools, there are much better ways to visuali…
dmikushin Sep 22, 2024
978bc7d
Split the main entry and the core processing function, making tunable…
dmikushin Sep 22, 2024
8186d18
Do not use malloc() in main()
dmikushin Sep 25, 2024
84aa4fe
Adding Dev Container for VSCode
dmikushin Sep 25, 2024
0912f6b
Optimizing VSCode settings
dmikushin Sep 25, 2024
d8ec58e
Preinstalling some useful tools into the dev container
dmikushin Sep 25, 2024
7dc3e79
Formatting the sources and fixing the warnings
dmikushin Sep 25, 2024
10cd943
Check whether the input file has an .off or .json extension; if exten…
dmikushin Sep 25, 2024
7e4e47d
Adding more detailed usage instructions into README
dmikushin Sep 27, 2024
53550ec
Making the rendering script more user-friendly:
dmikushin Sep 28, 2024
f5fb9c6
Explaining in the README how to use the provided simple mesh renderin…
dmikushin Sep 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM nvidia/cuda:12.6.1-devel-ubuntu22.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
cmake \
ninja-build \
libboost-all-dev \
libeigen3-dev \
libgmp-dev \
libmpfr-dev \
nlohmann-json3-dev \
wget

# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Download and install CGAL
RUN wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-5.0.2/CGAL-5.0.2.tar.xz \
&& tar -xf CGAL-5.0.2.tar.xz \
&& cd CGAL-5.0.2 \
&& cmake . \
&& make \
&& make install

ENV PATH=$PATH:/usr/local/cuda/bin

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
git \
vim \
fish

# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
21 changes: 21 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Surface Remesher development container",
"build": {
"dockerfile": "Dockerfile"
},
"runArgs": [
"--gpus",
"all"
],
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/usr/bin/fish"
},
"extensions": [
"ms-vscode.cpptools",
"ms-python.python"
]
}
}
}
15 changes: 15 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"intelliSenseMode": "linux-gcc-x64",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
218 changes: 218 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
{
"editor.tabSize": 4,
"editor.rulers": [
120
],
"editor.renderWhitespace": "trailing",
"editor.suggestSelection": "first",
"editor.formatOnSave": true,
"editor.defaultFormatter": "xaver.clang-format",
"editor.stickyScroll.enabled": false,
"editor.bracketPairColorization.enabled": false,
"editor.cursorSmoothCaretAnimation": "on",
"editor.suggest.preview": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"debug.onTaskErrors": "debugAnyway",
"explorer.compactFolders": false,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"explorer.copyRelativePathSeparator": "/",
"files.autoSave": "onFocusChange",
"files.exclude": {
"node_modules/**/*": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"files.associations": {
".clang*": "yaml",
"*.hpp.in": "cpp",
"*.in": "cpp"
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"workbench.startupEditor": "none",
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
},
"workbench.colorTheme": "Catppuccin Macchiato",
"git.enableSmartCommit": true,
"git.autofetch": true,
"git.confirmSync": false,
"git.openRepositoryInParentFolders": "always",
"prettier.tabWidth": 4,
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"prettier.trailingComma": "all",
"prettier.useEditorConfig": true,
"prettier.bracketSpacing": false,
"markdown.validate.enabled": true,
"[markdown]": {
"files.trimTrailingWhitespace": false,
"editor.formatOnSave": false,
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"[yaml]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"[json]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.formatOnSave": false
},
"[plaintext]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"[toml]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"better-comments.tags": [
{
"tag": "XXX",
"color": "#F8C471"
},
{
"tag": "WARN",
"color": "#FF6961"
},
{
"tag": "NOTE",
"color": "#3498DB"
},
{
"tag": "TODO",
"color": "#77C3EC"
}
],
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"codesnap.showWindowControls": false,
"codesnap.shutterAction": "copy",
"Workspace_Formatter.excludePattern": [
"**/build",
"**/.*",
"**/.vscode",
"**/html"
],
"Workspace_Formatter.includePattern": [
"*.c",
"*.h",
"*.cc",
"*.hh",
"*.cpp",
"*.hpp"
],
"svg.preview.autoOpen": true,
"remote.WSL.fileWatcher.polling": true,
"errorLens.delay": 1000,
"errorLens.enabledDiagnosticLevels": [
"error",
"warning"
],
"errorLens.enabled": false,
"C_Cpp.clang_format_sortIncludes": true,
"C_Cpp.vcFormat.indent.preserveComments": true,
"C_Cpp.vcFormat.indent.namespaceContents": false,
"C_Cpp.vcFormat.indent.caseContentsWhenBlock": true,
"C_Cpp.vcFormat.space.pointerReferenceAlignment": "right",
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": false,
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.default.cStandard": "c11",
"C_Cpp.formatting": "clangFormat",
"C_Cpp.intelliSenseEngine" : "Tag Parser",
"[c]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"[cpp]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"[cuda-cpp]": {
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"cmake.configureOnOpen": false,
"cmake.autoSelectActiveFolder": false,
"cmake.configureOnEdit": false,
"[cmake]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "cheshirekow.cmake-format"
},
"cmake.options.statusBarVisibility": "visible",
"doxdocgen.file.fileTemplate": "@file {name}",
"doxdocgen.cpp.tparamTemplate": "@tparam {param} ",
"doxdocgen.generic.briefTemplate": "@brief {text}",
"doxdocgen.generic.boolReturnsTrueFalse": false,
"doxdocgen.generic.paramTemplate": "@param {param} ",
"doxdocgen.generic.returnTemplate": "@return",
"doxdocgen.generic.includeTypeAtReturn": false,
"C_Cpp.codeAnalysis.clangTidy.enabled": false,
"C_Cpp.configurationWarnings": "disabled",
"C_Cpp_Runner.cppStandard": "c++20",
"C_Cpp_Runner.cStandard": "c11",
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false,
"C_Cpp_Runner.msvcBatchPath": ""
}
31 changes: 31 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "CMake: build",
"command": "build",
"targets": [
"all"
],
"group": "build",
"problemMatcher": [
"$gcc"
],
"detail": "CMake build task"
},
{
"type": "cmake",
"label": "CMake: clean rebuild",
"command": "cleanRebuild",
"targets": [
"all"
],
"group": "build",
"problemMatcher": [
"$gcc"
],
"detail": "CMake clean rebuild task"
}
]
}
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

project(surfremesh LANGUAGES CXX CUDA)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_STANDARD 17)

find_package(Boost REQUIRED)
find_package(CGAL REQUIRED)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(CUDA REQUIRED)

include_directories(include ${CUDA_INCLUDE_DIRS})

file(GLOB_RECURSE SRCS
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cu)

add_executable(${PROJECT_NAME} ${SRCS})

target_link_libraries(${PROJECT_NAME} Boost::boost Eigen3::Eigen CGAL::CGAL)
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM nvidia/cuda:12.6.1-devel-ubuntu22.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
cmake \
ninja-build \
libboost-all-dev \
libeigen3-dev \
libgmp-dev \
libmpfr-dev \
wget

# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Download and install CGAL
RUN wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-5.0.2/CGAL-5.0.2.tar.xz \
&& tar -xf CGAL-5.0.2.tar.xz \
&& cd CGAL-5.0.2 \
&& cmake . \
&& make \
&& make install

# Copy the current directory contents into the container at /app
COPY . /app

# Set the working directory in the container to /app
WORKDIR /app

ENV PATH=$PATH:/usr/local/cuda/bin

# Run CMake to build the project
RUN mkdir build \
&& cd build \
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=86 -G Ninja \
&& ninja

Loading