Skip to content

Commit 326ba92

Browse files
committed
original copy of meshfix 1.2
0 parents  commit 326ba92

File tree

144 files changed

+260859
-0
lines changed

Some content is hidden

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

144 files changed

+260859
-0
lines changed

CMakeLists.txt

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
cmake_minimum_required (VERSION 2.6)
2+
project (MeshFix)
3+
add_subdirectory(contrib/JMeshLib)
4+
include_directories(
5+
include
6+
/usr/include/superlu
7+
contrib/JMeshLib/include
8+
contrib/OpenNL3.2.1/src
9+
contrib/jrs_predicates
10+
)
11+
link_directories(
12+
${LINK_DIRECTORIES}
13+
${CMAKE_CURRENT_SOURCE_DIR}/contrib/JMeshLib/lib
14+
)
15+
file(GLOB meshfix_h include/*.h)
16+
set(meshfix_src
17+
contrib/jrs_predicates/jrs_predicates.c
18+
src/detectIntersections.cpp
19+
src/holeFilling.cpp
20+
src/sparseLSystem.cpp
21+
src/mwExtensions.cpp
22+
src/smoothing.cpp
23+
contrib/OpenNL3.2.1/src/nl_single_file.c
24+
src/epsilonSampling.cpp
25+
src/simplification.cpp
26+
src/uniform.cpp
27+
src/cleaning.cpp
28+
)
29+
add_custom_command(
30+
TARGET meshfix
31+
PRE_LINK
32+
COMMAND make
33+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/contrib/JMeshLib/
34+
)
35+
if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
36+
ADD_DEFINITIONS(-DIS64BITPLATFORM) ## needed for 64 bit
37+
endif()
38+
ADD_DEFINITIONS(-DNL_USE_SUPERLU)
39+
add_executable(meshfix ${meshfix_src} ${meshfix_h} meshfix.cpp)
40+
target_link_libraries(meshfix jmesh superlu blas)

contrib/JMeshLib/CMakeLists.txt

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
cmake_minimum_required (VERSION 2.6)
2+
project (JMeshLib)
3+
include_directories(include)
4+
5+
set(jmesh_h
6+
include/binTree.h
7+
include/clusterGraph.h
8+
include/dijkstraGraph.h
9+
include/edge.h
10+
include/graph.h
11+
include/heap.h
12+
include/jmesh.h
13+
include/jqsort.h
14+
include/j_mesh.h
15+
include/list.h
16+
include/matrix.h
17+
include/point.h
18+
include/tin.h
19+
include/triangle.h
20+
include/vertex.h
21+
)
22+
set(jmesh_src
23+
src/PRIMITIVES/binTree.cpp
24+
src/PRIMITIVES/clusterGraph.cpp
25+
src/PRIMITIVES/dijkstraGraph.cpp
26+
src/PRIMITIVES/graph.cpp
27+
src/PRIMITIVES/heap.cpp
28+
src/PRIMITIVES/jqsort.cpp
29+
src/PRIMITIVES/list.cpp
30+
src/PRIMITIVES/matrix.cpp
31+
src/MESH_STRUCTURE/checkAndRepair.cpp
32+
src/MESH_STRUCTURE/edge.cpp
33+
src/MESH_STRUCTURE/point.cpp
34+
src/MESH_STRUCTURE/tin.cpp
35+
src/MESH_STRUCTURE/triangle.cpp
36+
src/MESH_STRUCTURE/vertex.cpp
37+
src/MESH_STRUCTURE/io.cpp
38+
src/JMESH/jmesh.cpp
39+
)
40+
add_library(jmesh STATIC ${jmesh_src} ${jmesh_h})
41+
add_executable(test_jmeshlib ${jmesh_src} ${jmesh_h} test/test.cpp)
42+
43+
## Compiler flags
44+
if(CMAKE_COMPILER_IS_GNUCXX)
45+
## Use '-pg' to prfile/debug; '-O1' for development; '-O2' for release version
46+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
47+
## On some versions of gcc the optimizer uses strict aliasing rules.
48+
## If this is not your case try to comment out the following line.
49+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
50+
if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
51+
ADD_DEFINITIONS(-DIS64BITPLATFORM) ## needed for 64 bit
52+
endif()
53+
endif()
54+

contrib/JMeshLib/README.txt

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
----------------------------
2+
JMeshLib - Version 1.1
3+
----------------------------
4+
5+
by Marco Attene
6+
7+
Consiglio Nazionale delle Ricerche
8+
Istituto di Matematica Applicata e Tecnologie Informatiche
9+
Sezione di Genova
10+
IMATI-GE / CNR
11+
12+
JMeshLib provides a framework to work with manifold triangle meshes.
13+
It implements an edge-based data structure with all its fundamental
14+
functionalities (i.e., file I/O, mesh construction/destruction, traversal).
15+
It is written in C++ and includes support for reading and writing the
16+
following file formats:
17+
OFF (http://shape.cs.princeton.edu/benchmark/documentation/off_format.html)
18+
PLY (http://www.cs.unc.edu/~geom/Powerplant/Ply.doc)
19+
STL (http://www.sdsc.edu/tmf/Stl-specs/stl.html)
20+
VER-TRI (proprietary format used at IMATI-GE / CNR)
21+
and partially:
22+
IV 2.1, VRML 1.0, VRML 2.0, OBJ.
23+
24+
In contrast to other generic libraries dealing with surface meshes,
25+
JMeshLib includes tools to automatically fix the most common problems
26+
present in surface meshes coming from laser scanning (conversion to
27+
oriented manifold, topological noise detection, hole filling, removal
28+
of degenerate faces, ...) through a clear and easy-to-learn C++ API.
29+
30+
This package provides pre-compiled static libraries Windows only (lib/jmesh.lib).
31+
For Linux you must compile the source tree yourself.
32+
33+
See the comments within the source files for details or use doxygen to
34+
produce documentation in a more readable format.
35+
The file "tin.h" is a good starting point.
36+
37+
-------------------
38+
System Rrequirements
39+
--------------------
40+
41+
JMeshLib v1.0 has been extensively tested on 32 bit PCs running either:
42+
- ELF Linux with standard development tools (gcc/g++)
43+
- Windows OS with MSVC 8.0 (Visual C++ 2005)
44+
45+
In version 1.1 it should compile and work properly on 64-bit Linux
46+
machines too. Uncomment the proper line in the 'makeconf' to create
47+
64-bit-enabled binaries.
48+
49+
-------------------
50+
Building the tree
51+
-------------------
52+
53+
On WINDOWS: double-click on minJMeshLib.vcproj and press F7.
54+
On Linux: type 'make' on the command line.
55+
56+
On Linux systems you need the command 'makedepend'. If you
57+
don't have it installed on your system, you may need to
58+
download and install the 'imake' package.
59+
60+
-------------------
61+
Using the library
62+
-------------------
63+
64+
On WINDOWS:
65+
Add the path to jmesh's include dir to your project's include path
66+
AND
67+
add the path to jmesh.lib to your linker's command line
68+
69+
On Linux:
70+
Add the path to jmesh's include dir to your project's include path
71+
AND
72+
add the path to jmesh.a to your linker's command line
73+
74+
---------
75+
Copyright
76+
---------
77+
78+
JMeshLib is
79+
80+
Copyright(C) 2006-2010: IMATI-GE / CNR
81+
82+
All rights reserved.
83+
84+
This program is free software; you can redistribute it and/or modify
85+
it under the terms of the GNU General Public License as published by
86+
the Free Software Foundation; either version 2 of the License, or
87+
(at your option) any later version.
88+
89+
This program is distributed in the hope that it will be useful,
90+
but WITHOUT ANY WARRANTY; without even the implied warranty of
91+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
92+
GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
93+
for more details.

contrib/JMeshLib/changes.txt

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 1.0 to 1.1
2+
3+
- SymMatrix3x3
4+
- added == and != operators
5+
- added method 'determinant'
6+
- added = operator
7+
- added trace method
8+
- added /= operator
9+
- added lrMultiply for different vectors
10+
11+
- Matrix3x3
12+
- added constructor from vector product
13+
- added lrMultiply for different vectors
14+
- added = operator
15+
- added /= operator
16+
- added transpose
17+
18+
- SymMatrix4x4
19+
- added == and != operators
20+
21+
- List
22+
- Added method 'popTail()'
23+
- Corrected List::joinTailList(l) (buggy when l was empty)
24+
- removeNode now returns the index of the removed element
25+
- Added method 'getNode'
26+
27+
- Triangulation
28+
- Clone constructor does no longer destroy info fields
29+
- Clone constructor allows to clone info fiels too (setting non-default second par)
30+
- CreateEdge modified. e0 pointer for vertices now points to new edge after creation.
31+
- CheckConnectivity does no longer exit in case of error. Now it returns the error string.
32+
33+
- I/O
34+
- Updates for 64bit systems (to be checked carefully !)
35+
- Small bug-fix in ply loader
36+
37+
- selectConnectedComponent and selectBoundaryTriangles return the # of selected tris
38+
- growSelection returns the # of newly selected tris
39+
40+
- Point.cpp
41+
- getAngle() does no longer exit with error. Warning + return -1 now.
42+
43+
- splitTriangle
44+
- Bug-fix: when splitEdge was invoked for robustness the method crashed
45+
46+
- JMesh
47+
- added 'quiet' field to prevent message reporting

0 commit comments

Comments
 (0)