mirror of https://github.com/CGAL/cgal
clean up mesh_3 package directory
This commit is contained in:
parent
c6575e1717
commit
eedee33c44
237
Mesh_3/Doxyfile
237
Mesh_3/Doxyfile
|
|
@ -1,237 +0,0 @@
|
||||||
# Doxyfile 0.1
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Project related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
PROJECT_NAME = Mesh_3
|
|
||||||
PROJECT_NUMBER = 0.1
|
|
||||||
OUTPUT_DIRECTORY = doxygen/
|
|
||||||
CREATE_SUBDIRS = NO
|
|
||||||
OUTPUT_LANGUAGE = English
|
|
||||||
USE_WINDOWS_ENCODING = NO
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
|
||||||
REPEAT_BRIEF = YES
|
|
||||||
ABBREVIATE_BRIEF = "The $name class" \
|
|
||||||
"The $name widget" \
|
|
||||||
"The $name file" \
|
|
||||||
is \
|
|
||||||
provides \
|
|
||||||
specifies \
|
|
||||||
contains \
|
|
||||||
represents \
|
|
||||||
a \
|
|
||||||
an \
|
|
||||||
the
|
|
||||||
ALWAYS_DETAILED_SEC = NO
|
|
||||||
INLINE_INHERITED_MEMB = NO
|
|
||||||
FULL_PATH_NAMES = NO
|
|
||||||
STRIP_FROM_PATH =
|
|
||||||
STRIP_FROM_INC_PATH =
|
|
||||||
SHORT_NAMES = NO
|
|
||||||
JAVADOC_AUTOBRIEF = NO
|
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
|
||||||
DETAILS_AT_TOP = YES
|
|
||||||
INHERIT_DOCS = YES
|
|
||||||
DISTRIBUTE_GROUP_DOC = NO
|
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
|
||||||
TAB_SIZE = 8
|
|
||||||
ALIASES =
|
|
||||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
|
||||||
SUBGROUPING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Build related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
EXTRACT_ALL = YES
|
|
||||||
EXTRACT_PRIVATE = YES
|
|
||||||
EXTRACT_STATIC = NO
|
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
|
||||||
EXTRACT_LOCAL_METHODS = NO
|
|
||||||
HIDE_UNDOC_MEMBERS = NO
|
|
||||||
HIDE_UNDOC_CLASSES = NO
|
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
|
||||||
HIDE_IN_BODY_DOCS = NO
|
|
||||||
INTERNAL_DOCS = NO
|
|
||||||
CASE_SENSE_NAMES = YES
|
|
||||||
HIDE_SCOPE_NAMES = NO
|
|
||||||
SHOW_INCLUDE_FILES = YES
|
|
||||||
INLINE_INFO = YES
|
|
||||||
SORT_MEMBER_DOCS = NO
|
|
||||||
SORT_BRIEF_DOCS = NO
|
|
||||||
SORT_BY_SCOPE_NAME = NO
|
|
||||||
GENERATE_TODOLIST = YES
|
|
||||||
GENERATE_TESTLIST = YES
|
|
||||||
GENERATE_BUGLIST = YES
|
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
|
||||||
ENABLED_SECTIONS =
|
|
||||||
MAX_INITIALIZER_LINES = 30
|
|
||||||
SHOW_USED_FILES = YES
|
|
||||||
SHOW_DIRECTORIES = YES
|
|
||||||
FILE_VERSION_FILTER =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to warning and progress messages
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
QUIET = NO
|
|
||||||
WARNINGS = YES
|
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
|
||||||
WARN_IF_DOC_ERROR = YES
|
|
||||||
WARN_NO_PARAMDOC = NO
|
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
|
||||||
WARN_LOGFILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the input files
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
INPUT = include \
|
|
||||||
applications
|
|
||||||
FILE_PATTERNS = *.h
|
|
||||||
RECURSIVE = YES
|
|
||||||
EXCLUDE = include/boost
|
|
||||||
EXCLUDE_SYMLINKS = NO
|
|
||||||
EXCLUDE_PATTERNS =
|
|
||||||
EXAMPLE_PATH =
|
|
||||||
EXAMPLE_PATTERNS =
|
|
||||||
EXAMPLE_RECURSIVE = NO
|
|
||||||
IMAGE_PATH =
|
|
||||||
INPUT_FILTER =
|
|
||||||
FILTER_PATTERNS =
|
|
||||||
FILTER_SOURCE_FILES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to source browsing
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SOURCE_BROWSER = YES
|
|
||||||
INLINE_SOURCES = NO
|
|
||||||
STRIP_CODE_COMMENTS = YES
|
|
||||||
REFERENCED_BY_RELATION = YES
|
|
||||||
REFERENCES_RELATION = YES
|
|
||||||
USE_HTAGS = NO
|
|
||||||
VERBATIM_HEADERS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the alphabetical class index
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ALPHABETICAL_INDEX = NO
|
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the HTML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_HTML = YES
|
|
||||||
HTML_OUTPUT = html
|
|
||||||
HTML_FILE_EXTENSION = .html
|
|
||||||
HTML_HEADER =
|
|
||||||
HTML_FOOTER =
|
|
||||||
HTML_STYLESHEET = stylesheet.css
|
|
||||||
HTML_ALIGN_MEMBERS = YES
|
|
||||||
GENERATE_HTMLHELP = NO
|
|
||||||
CHM_FILE =
|
|
||||||
HHC_LOCATION =
|
|
||||||
GENERATE_CHI = NO
|
|
||||||
BINARY_TOC = NO
|
|
||||||
TOC_EXPAND = NO
|
|
||||||
DISABLE_INDEX = NO
|
|
||||||
ENUM_VALUES_PER_LINE = 4
|
|
||||||
GENERATE_TREEVIEW = NO
|
|
||||||
TREEVIEW_WIDTH = 250
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the LaTeX output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_LATEX = YES
|
|
||||||
LATEX_OUTPUT = latex
|
|
||||||
LATEX_CMD_NAME = latex
|
|
||||||
MAKEINDEX_CMD_NAME = makeindex
|
|
||||||
COMPACT_LATEX = NO
|
|
||||||
PAPER_TYPE = a4wide
|
|
||||||
EXTRA_PACKAGES =
|
|
||||||
LATEX_HEADER =
|
|
||||||
PDF_HYPERLINKS = YES
|
|
||||||
USE_PDFLATEX = YES
|
|
||||||
LATEX_BATCHMODE = NO
|
|
||||||
LATEX_HIDE_INDICES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the RTF output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_RTF = NO
|
|
||||||
RTF_OUTPUT = rtf
|
|
||||||
COMPACT_RTF = NO
|
|
||||||
RTF_HYPERLINKS = NO
|
|
||||||
RTF_STYLESHEET_FILE =
|
|
||||||
RTF_EXTENSIONS_FILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the man page output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_MAN = NO
|
|
||||||
MAN_OUTPUT = man
|
|
||||||
MAN_EXTENSION = .3
|
|
||||||
MAN_LINKS = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the XML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_XML = NO
|
|
||||||
XML_OUTPUT = xml
|
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options for the AutoGen Definitions output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the Perl module output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_PERLMOD = NO
|
|
||||||
PERLMOD_LATEX = NO
|
|
||||||
PERLMOD_PRETTY = YES
|
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the preprocessor
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ENABLE_PREPROCESSING = YES
|
|
||||||
MACRO_EXPANSION = YES
|
|
||||||
EXPAND_ONLY_PREDEF = NO
|
|
||||||
SEARCH_INCLUDES = YES
|
|
||||||
INCLUDE_PATH = /absinthe/CGAL-testsuites/CGAL-I/include/CGAL \
|
|
||||||
/0/prisme_util/CGAL/CGAL-I/include/CGAL \
|
|
||||||
/home/lrineau/CGAL-3.1-I-49/include \
|
|
||||||
/users/algo2/rineau/CGAL-3.2/include/CGAL
|
|
||||||
INCLUDE_FILE_PATTERNS =
|
|
||||||
PREDEFINED = "CGAL_USE_GMP CGAL_USE_QT" \
|
|
||||||
CGAL_USE_BOOST
|
|
||||||
EXPAND_AS_DEFINED =
|
|
||||||
SKIP_FUNCTION_MACROS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to external references
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
TAGFILES =
|
|
||||||
GENERATE_TAGFILE = /users/algo2/rineau/CGAL/Mesh_3/Mesh_3.tags.xml
|
|
||||||
ALLEXTERNALS = NO
|
|
||||||
EXTERNAL_GROUPS = YES
|
|
||||||
PERL_PATH = /usr/bin/perl
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the dot tool
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
CLASS_DIAGRAMS = YES
|
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
|
||||||
HAVE_DOT = YES
|
|
||||||
CLASS_GRAPH = YES
|
|
||||||
COLLABORATION_GRAPH = YES
|
|
||||||
GROUP_GRAPHS = YES
|
|
||||||
UML_LOOK = NO
|
|
||||||
TEMPLATE_RELATIONS = YES
|
|
||||||
INCLUDE_GRAPH = YES
|
|
||||||
INCLUDED_BY_GRAPH = YES
|
|
||||||
CALL_GRAPH = NO
|
|
||||||
GRAPHICAL_HIERARCHY = YES
|
|
||||||
DIRECTORY_GRAPH = YES
|
|
||||||
DOT_IMAGE_FORMAT = png
|
|
||||||
DOT_PATH =
|
|
||||||
DOTFILE_DIRS =
|
|
||||||
MAX_DOT_GRAPH_WIDTH = 1024
|
|
||||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
|
||||||
MAX_DOT_GRAPH_DEPTH = 0
|
|
||||||
DOT_TRANSPARENT = NO
|
|
||||||
DOT_MULTI_TARGETS = NO
|
|
||||||
GENERATE_LEGEND = YES
|
|
||||||
DOT_CLEANUP = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to the search engine
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SEARCHENGINE = NO
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
3D mesh package, from Laurent Rineau
|
|
||||||
|
|
||||||
|
|
@ -1,14 +1,7 @@
|
||||||
stylesheet.css
|
|
||||||
depends
|
|
||||||
GNUmakefile
|
|
||||||
Doxyfile
|
|
||||||
TODO
|
TODO
|
||||||
applications
|
applications
|
||||||
applications.README
|
applications.README
|
||||||
spheres_create_input.sh
|
|
||||||
README
|
README
|
||||||
makefile.dependencies
|
|
||||||
examples/Mesh_3/old_stuff
|
|
||||||
demo/Mesh_3/C3t3_rib_exporter_plugin.cpp
|
demo/Mesh_3/C3t3_rib_exporter_plugin.cpp
|
||||||
examples/Mesh_3/mesh_polyhedral_edge_tolerance_region.cpp
|
examples/Mesh_3/mesh_polyhedral_edge_tolerance_region.cpp
|
||||||
examples/Mesh_3/mesh_polyhedral_implicit_function.cpp
|
examples/Mesh_3/mesh_polyhedral_implicit_function.cpp
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
//#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
|
||||||
#include <CGAL/MP_Float.h>
|
|
||||||
|
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
|
|
||||||
#include <CGAL/Constrained_regular_triangulation_3.h>
|
|
||||||
#include <CGAL/Constrained_triangulation_vertex_base_3.h>
|
|
||||||
#include <CGAL/Constrained_triangulation_cell_base_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Triangulation_mesher_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Triangulation_2_traits_3.h>
|
|
||||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
|
||||||
#include <CGAL/Constrained_triangulation_plus_2.h>
|
|
||||||
|
|
||||||
typedef CGAL::Quotient<CGAL::MP_Float> FT;
|
|
||||||
//struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
struct K : public CGAL::Simple_cartesian<FT> {};
|
|
||||||
|
|
||||||
typedef CGAL::Regular_triangulation_euclidean_traits_3<K> Traits_3;
|
|
||||||
typedef CGAL::Constrained_triangulation_cell_base_3<Traits_3> Cb_3;
|
|
||||||
typedef CGAL::Constrained_triangulation_vertex_base_3<Traits_3> Vb_3;
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb_3, Cb_3> Tds_3;
|
|
||||||
typedef CGAL::Regular_triangulation_3<Traits_3, Tds_3> Rt_3;
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
50
|
|
||||||
-0.962091 4.29644 3.20013 0 1
|
|
||||||
2.9798 0.665479 -4.02371 0 1
|
|
||||||
0.798918 3.34291 3.80502 0 1
|
|
||||||
-1.34035 2.48727 2.56651 0 1
|
|
||||||
-0.779099 4.16919 3.43113 0 1
|
|
||||||
-3.64296 -1.70149 -2.58643 0 1
|
|
||||||
-0.183306 4.78251 2.89528 0 1
|
|
||||||
-0.576508 4.31994 3.42079 0 1
|
|
||||||
1.24531 2.06204 1.58332 0 1
|
|
||||||
0.931825 4.62641 2.83569 0 1
|
|
||||||
-1.98197 4.43193 1.89467 0 1
|
|
||||||
0.175591 4.8952 2.35862 0 1
|
|
||||||
-0.585039 4.25863 3.48122 0 1
|
|
||||||
-1.00295 4.6036 1.52496 0 1
|
|
||||||
-0.396008 4.59985 3.17528 0 1
|
|
||||||
-1.26098 4.04133 0.911762 0 1
|
|
||||||
-1.32094 4.671 2.37494 0 1
|
|
||||||
-0.205472 4.88865 2.17462 0 1
|
|
||||||
-0.659441 4.71583 2.86942 0 1
|
|
||||||
0.267546 2.94443 4.35277 0 1
|
|
||||||
0.814989 1.65597 2.62121 0 1
|
|
||||||
-0.330295 4.46034 3.37401 0 1
|
|
||||||
-0.791681 4.79073 1.90392 0 1
|
|
||||||
0.916285 3.81045 0.809655 0 1
|
|
||||||
-0.860659 4.2918 3.27629 0 1
|
|
||||||
-0.665876 3.8261 3.72927 0 1
|
|
||||||
-0.777995 4.67578 2.87886 0 1
|
|
||||||
-1.43436 4.69924 1.98157 0 1
|
|
||||||
0.654073 2.50011 4.07744 0 1
|
|
||||||
-0.74088 4.44492 3.20183 0 1
|
|
||||||
-0.901011 3.12717 3.72781 0 1
|
|
||||||
0.384743 4.43059 1.30036 0 1
|
|
||||||
-0.866976 4.79913 1.97478 0 1
|
|
||||||
-1.43272 4.4956 2.5397 0 1
|
|
||||||
2.1925 4.36668 1.24094 0 1
|
|
||||||
-1.08955 4.49327 2.88816 0 1
|
|
||||||
0.773753 1.59507 2.45844 0 1
|
|
||||||
-0.250799 2.80953 0.589323 0 1
|
|
||||||
-1.37415 3.52807 3.05786 0 1
|
|
||||||
-0.714308 4.78918 1.87355 0 1
|
|
||||||
-0.713128 3.86645 0.857905 0 1
|
|
||||||
-0.372133 4.47991 1.36377 0 1
|
|
||||||
1.22629 2.26518 2.52419 0 1
|
|
||||||
-0.77199 4.74956 2.70684 0 1
|
|
||||||
-0.855385 4.77765 2.55746 0 1
|
|
||||||
-0.815444 3.76835 0.79916 0 1
|
|
||||||
-1.24381 4.46365 2.77729 0 1
|
|
||||||
-0.334701 4.79837 2.83606 0 1
|
|
||||||
1.27387 2.83038 3.02403 0 1
|
|
||||||
-0.792618 4.62158 2.9585 0 1
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
50
|
|
||||||
242.494 246.559 229.945 0 1
|
|
||||||
199.751 18.7342 -0.0398643 0 1
|
|
||||||
216.586 0.116861 208.19 0 1
|
|
||||||
111.38 240.904 0.0599967 0 1
|
|
||||||
95.1525 248.46 83.6585 0 1
|
|
||||||
98.3182 51.9303 -0.210843 0 1
|
|
||||||
213.596 -0.0290652 132.087 0 1
|
|
||||||
126.056 -0.162689 205.17 0 1
|
|
||||||
79.5246 -0.172195 190.897 0 1
|
|
||||||
76.7212 230.184 -0.126733 0 1
|
|
||||||
149.273 67.4092 230.06 0 1
|
|
||||||
-0.19792 146.215 110.237 0 1
|
|
||||||
248.526 43.6298 140.792 0 1
|
|
||||||
139.271 248.415 1.54855 0 1
|
|
||||||
-0.0974803 103.206 85.0248 0 1
|
|
||||||
54.9168 -0.201341 120.945 0 1
|
|
||||||
248.387 96.1526 123.869 0 1
|
|
||||||
63.0589 11.8597 229.865 0 1
|
|
||||||
98.8556 171.232 229.992 0 1
|
|
||||||
248.22 134.632 138.186 0 1
|
|
||||||
63.3016 248.304 194.219 0 1
|
|
||||||
26.0023 2.14593 -0.12508 0 1
|
|
||||||
99.1813 248.212 81.8493 0 1
|
|
||||||
168.798 103.085 230.003 0 1
|
|
||||||
212.18 248.412 45.3686 0 1
|
|
||||||
143.48 126.542 0.127335 0 1
|
|
||||||
100.087 248.568 141.119 0 1
|
|
||||||
0.159492 107.811 27.7851 0 1
|
|
||||||
209.286 248.487 202.318 0 1
|
|
||||||
0.169306 194.609 169.737 0 1
|
|
||||||
170.626 135.976 0.0845226 0 1
|
|
||||||
157.205 175.644 -0.198241 0 1
|
|
||||||
13.8451 41.4607 230 0 1
|
|
||||||
212.712 73.4301 230.013 0 1
|
|
||||||
122.896 81.1601 230.082 0 1
|
|
||||||
55.8332 117.769 -0.187901 0 1
|
|
||||||
102.409 22.2594 0.141905 0 1
|
|
||||||
122.894 128.949 229.789 0 1
|
|
||||||
0.053107 121.044 45.1356 0 1
|
|
||||||
248.558 59.3183 155.197 0 1
|
|
||||||
48.9929 75.1214 0.148398 0 1
|
|
||||||
53.5563 0.0762955 224.721 0 1
|
|
||||||
61.2847 0.613641 0.0523039 0 1
|
|
||||||
248.318 129.894 229.796 0 1
|
|
||||||
220.142 0.120269 97.3321 0 1
|
|
||||||
80.397 104.223 229.921 0 1
|
|
||||||
0.199899 113.316 161.381 0 1
|
|
||||||
184.725 126.288 -0.0611164 0 1
|
|
||||||
97.9933 100.884 0.0591876 0 1
|
|
||||||
248.493 60.0497 45.7408 0 1
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
50
|
|
||||||
1.91372 2.20439 1.5281 0 1
|
|
||||||
1.11181 1.85547 0.623428 0 1
|
|
||||||
1.76718 -2.0611 0.786923 0 1
|
|
||||||
1.70884 2.08109 0.806296 0 1
|
|
||||||
1.41706 0.0615779 -1.78695 0 1
|
|
||||||
2.23479 1.3923 1.37598 0 1
|
|
||||||
1.29069 1.06591 2.14564 0 1
|
|
||||||
0.825874 -1.86214 0.921324 0 1
|
|
||||||
1.53959 0.571686 1.00719 0 1
|
|
||||||
0.876177 1.30396 0.824114 0 1
|
|
||||||
1.34716 1.95479 0.564054 0 1
|
|
||||||
2.23241 1.30966 1.4443 0 1
|
|
||||||
0.966785 1.27883 0.75018 0 1
|
|
||||||
1.17042 0.937336 2.05824 0 1
|
|
||||||
1.9879 2.11832 1.24106 0 1
|
|
||||||
1.97524 0.778668 1.14329 0 1
|
|
||||||
1.98232 0.924585 1.00481 0 1
|
|
||||||
0.858469 2.09867 1.7226 0 1
|
|
||||||
0.809683 0.793813 1.65103 0 1
|
|
||||||
1.48842 -1.97777 0.545318 0 1
|
|
||||||
0.888012 0.942072 1.92035 0 1
|
|
||||||
1.71587 0.542254 1.06163 0 1
|
|
||||||
0.810704 0.793186 1.50748 0 1
|
|
||||||
1.25476 0.465837 1.246 0 1
|
|
||||||
1.61303 0.582655 0.998106 0 1
|
|
||||||
0.986566 1.42056 0.633008 0 1
|
|
||||||
1.18531 2.20929 1.4751 0 1
|
|
||||||
0.968138 1.38319 2.13296 0 1
|
|
||||||
0.88706 1.12294 0.960487 0 1
|
|
||||||
1.25014 0.655853 1.95974 0 1
|
|
||||||
-1.9098 0.534487 1.83401 0 1
|
|
||||||
2.2431 1.69382 1.35129 0 1
|
|
||||||
1.97943 -2.00549 0.934641 0 1
|
|
||||||
2.24289 1.63154 1.3435 0 1
|
|
||||||
2.17994 1.48587 1.95342 0 1
|
|
||||||
1.81679 -1.62409 2.23765 0 1
|
|
||||||
-2.20877 1.41451 1.88315 0 1
|
|
||||||
2.01622 1.17461 0.831301 0 1
|
|
||||||
2.24499 1.76904 1.70178 0 1
|
|
||||||
0.818809 1.438 2.08402 0 1
|
|
||||||
1.82509 1.21279 0.465171 0 1
|
|
||||||
2.04598 1.08076 0.987179 0 1
|
|
||||||
-2.01144 0.992617 0.999723 0 1
|
|
||||||
2.03247 1.79415 0.744802 0 1
|
|
||||||
1.00449 0.97058 2.00181 0 1
|
|
||||||
1.89001 0.902715 0.887177 0 1
|
|
||||||
1.24054 1.96198 2.13006 0 1
|
|
||||||
1.00047 1.22895 0.758094 0 1
|
|
||||||
1.2467 2.22089 1.66742 0 1
|
|
||||||
-1.81206 1.46842 0.0584816 0 1
|
|
||||||
|
|
@ -1,605 +0,0 @@
|
||||||
#include "debug.h"
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Robust_circumcenter_traits_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Regular_triangulation_cell_base_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/IO.h>
|
|
||||||
#include <CGAL/Complex_2_in_triangulation_3.h>
|
|
||||||
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
|
|
||||||
|
|
||||||
#include <CGAL/make_surface_mesh.h>
|
|
||||||
#include <CGAL/Implicit_surface_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Gray_level_image_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Volume_mesher_cell_base_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_filtered_traits_3.h>
|
|
||||||
#include <CGAL/Implicit_surfaces_mesher_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Surface_mesher/Standard_criteria.h>
|
|
||||||
#include <CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h>
|
|
||||||
#include <CGAL/Mesh_3/Slivers_exuder.h>
|
|
||||||
|
|
||||||
#include <CGAL/IO/File_medit.h>
|
|
||||||
|
|
||||||
#include <CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_criteria_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Point_traits.h>
|
|
||||||
#include <CGAL/Weighted_point_with_surface_index_geom_traits.h>
|
|
||||||
|
|
||||||
#include "implicit_functions.h"
|
|
||||||
#include "parameters.h"
|
|
||||||
|
|
||||||
#include <CGAL/Timer.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
#include <boost/tuple/tuple.hpp> // boost::tie
|
|
||||||
|
|
||||||
using boost::tie;
|
|
||||||
|
|
||||||
/////////////// Types ///////////////
|
|
||||||
|
|
||||||
struct K2 : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
typedef CGAL::Robust_circumcenter_traits_3<K2> K;
|
|
||||||
typedef CGAL::Regular_triangulation_filtered_traits_3<K> Regular_traits;
|
|
||||||
typedef CGAL::Weighted_point_with_surface_index_geom_traits<Regular_traits> My_traits;
|
|
||||||
typedef CGAL::Surface_mesh_vertex_base_3<My_traits> Vb;
|
|
||||||
typedef CGAL::Regular_triangulation_cell_base_3<My_traits> Cb1;
|
|
||||||
typedef CGAL::Surface_mesh_cell_base_3<My_traits, Cb1> Cb2;
|
|
||||||
typedef CGAL::Volume_mesher_cell_base_3<My_traits, Cb2> Cb;
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
|
|
||||||
typedef CGAL::Regular_triangulation_3<My_traits, Tds> Tr;
|
|
||||||
|
|
||||||
typedef My_traits::Point_3 Point_3;
|
|
||||||
typedef My_traits::Sphere_3 Sphere_3;
|
|
||||||
typedef My_traits::FT FT;
|
|
||||||
|
|
||||||
typedef CGAL::Implicit_function_wrapper<FT, Point_3> Implicit_function_wrapper;
|
|
||||||
|
|
||||||
typedef CGAL::Implicit_surface_3<My_traits, Implicit_function_wrapper> Surface;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesher::Refine_criterion<Tr> Criterion;
|
|
||||||
typedef CGAL::Surface_mesher::Standard_criteria <Criterion > Criteria;
|
|
||||||
typedef CGAL::Mesh_criteria_3<Tr> Tets_criteria;
|
|
||||||
|
|
||||||
typedef CGAL::Gray_level_image_3<FT, Point_3> Gray_image;
|
|
||||||
|
|
||||||
Gray_image* isosurface = 0;
|
|
||||||
|
|
||||||
double generic_inrimage_function(double x, double y, double z)
|
|
||||||
{
|
|
||||||
assert(isosurface != 0);
|
|
||||||
|
|
||||||
return (*isosurface)(Point_3(x, y, z));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Special_tets_criteria
|
|
||||||
{
|
|
||||||
double size_bound;
|
|
||||||
double shape_bound;
|
|
||||||
double special_size;
|
|
||||||
double r;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Special_tets_criteria(const double special_size, const double r1,
|
|
||||||
const double radius_edge_bound = 2,
|
|
||||||
const double radius_bound = 0)
|
|
||||||
: size_bound(radius_bound*radius_bound),
|
|
||||||
shape_bound(radius_edge_bound),
|
|
||||||
special_size(special_size),
|
|
||||||
r(r1) {}
|
|
||||||
|
|
||||||
typedef Tr::Cell_handle Cell_handle;
|
|
||||||
typedef Tets_criteria::Quality Quality;
|
|
||||||
|
|
||||||
class Is_bad
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
const double shape_bound;
|
|
||||||
const double size_bound;
|
|
||||||
const double r1;
|
|
||||||
const double squared_special_size;
|
|
||||||
public:
|
|
||||||
typedef Tr::Point Point_3;
|
|
||||||
|
|
||||||
Is_bad(const double radius_edge_bound,
|
|
||||||
const double squared_radius_bound,
|
|
||||||
const double r1,
|
|
||||||
const double size)
|
|
||||||
: shape_bound(radius_edge_bound),
|
|
||||||
size_bound(squared_radius_bound),
|
|
||||||
r1(r1),
|
|
||||||
squared_special_size(size*size){};
|
|
||||||
|
|
||||||
bool operator()(const Cell_handle& c,
|
|
||||||
Quality& qual) const
|
|
||||||
{
|
|
||||||
const Point_3& p = c->vertex(0)->point();
|
|
||||||
const Point_3& q = c->vertex(1)->point();
|
|
||||||
const Point_3& r = c->vertex(2)->point();
|
|
||||||
const Point_3& s = c->vertex(3)->point();
|
|
||||||
|
|
||||||
typedef Tr::Geom_traits Geom_traits;
|
|
||||||
typedef Geom_traits::Compute_squared_radius_3 Radius;
|
|
||||||
typedef Geom_traits::Compute_squared_distance_3 Distance;
|
|
||||||
typedef Geom_traits::Construct_circumcenter_3 Circumcenter;
|
|
||||||
typedef Geom_traits::FT FT;
|
|
||||||
|
|
||||||
Radius radius = Geom_traits().compute_squared_radius_3_object();
|
|
||||||
Distance distance = Geom_traits().compute_squared_distance_3_object();
|
|
||||||
Circumcenter circumcenter =
|
|
||||||
Geom_traits().construct_circumcenter_3_object();
|
|
||||||
|
|
||||||
const double sq_distance_from_origin =
|
|
||||||
CGAL::to_double(distance(CGAL::ORIGIN, circumcenter(p, q, r, s)));
|
|
||||||
|
|
||||||
double min_sq_length = CGAL::to_double(distance(p, q));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(p, r)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(p, s)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(q, r)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(q, s)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(r, s)));
|
|
||||||
|
|
||||||
double min_size_bound = size_bound;
|
|
||||||
if( squared_special_size != 0 &&
|
|
||||||
sq_distance_from_origin < r1*r1 )
|
|
||||||
{
|
|
||||||
if( min_size_bound == 0 )
|
|
||||||
min_size_bound = squared_special_size;
|
|
||||||
else
|
|
||||||
if( squared_special_size < min_size_bound )
|
|
||||||
min_size_bound = squared_special_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( min_size_bound != 0)
|
|
||||||
{
|
|
||||||
qual.second = min_sq_length / min_size_bound;
|
|
||||||
// normalized by size bound to deal
|
|
||||||
// with size field
|
|
||||||
if( qual.sq_size() > 1 )
|
|
||||||
{
|
|
||||||
qual.first = 1; // (do not compute aspect)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( shape_bound == 0 )
|
|
||||||
{
|
|
||||||
qual = Quality(0,1);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const double size = CGAL::to_double(radius(p, q, r, s));
|
|
||||||
qual.first = size / min_sq_length;
|
|
||||||
|
|
||||||
return (qual.first > shape_bound);
|
|
||||||
}
|
|
||||||
|
|
||||||
}; // end Is_bad
|
|
||||||
|
|
||||||
|
|
||||||
Is_bad is_bad_object() const
|
|
||||||
{ return Is_bad(shape_bound, size_bound, r, special_size); }
|
|
||||||
|
|
||||||
}; // end Special_tets_criteria
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesher::Point_surface_indices_visitor Volume_mesher_traits_visitor;
|
|
||||||
|
|
||||||
template <typename A>
|
|
||||||
struct Return_1 : public std::binary_function<A, A, int> {
|
|
||||||
int operator()(A, A)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesher::Implicit_surface_oracle_3<
|
|
||||||
My_traits,
|
|
||||||
Surface,
|
|
||||||
CGAL::Real_embeddable_traits<FT>::Sgn,
|
|
||||||
Return_1<bool>,
|
|
||||||
CGAL::Creator_uniform_3<My_traits::FT, My_traits::Point_3>,
|
|
||||||
Volume_mesher_traits_visitor
|
|
||||||
> Volume_mesh_traits;
|
|
||||||
|
|
||||||
typedef Volume_mesh_traits::Construct_initial_points Initial_points;
|
|
||||||
|
|
||||||
typedef CGAL::Implicit_surfaces_mesher_3<
|
|
||||||
C2t3,
|
|
||||||
Surface,
|
|
||||||
Criteria,
|
|
||||||
Tets_criteria,
|
|
||||||
Volume_mesh_traits> Mesher;
|
|
||||||
|
|
||||||
typedef CGAL::Simple_cartesian<double> Simple_kernel;
|
|
||||||
typedef Simple_kernel::Iso_rectangle_2 Rectangle_2;
|
|
||||||
typedef Simple_kernel::Segment_2 Segment_2;
|
|
||||||
typedef Simple_kernel::Point_2 Point_2;
|
|
||||||
|
|
||||||
typedef CGAL::Point_traits<Point_3> Point_traits;
|
|
||||||
typedef Point_traits::Bare_point Bare_point_3;
|
|
||||||
typedef Regular_traits::Point_3 Kernel_point_3;
|
|
||||||
|
|
||||||
/// Global variables
|
|
||||||
std::ostream *out = 0;
|
|
||||||
std::string filename = std::string();
|
|
||||||
std::string function_name = "sphere";
|
|
||||||
char* argv0 = "";
|
|
||||||
|
|
||||||
void usage(std::string error = "")
|
|
||||||
{
|
|
||||||
if( error != "" )
|
|
||||||
std:: cerr << "Error: " << error << std::endl;
|
|
||||||
std::cerr << "Usage:\n "
|
|
||||||
<< argv0
|
|
||||||
<< " [-f function_name]"
|
|
||||||
<< " [output_file.mesh|-]\n"
|
|
||||||
<< "If output_file.mesh is '-', outputs to standard out.\n"
|
|
||||||
<< "-f define the implicite function to use\n";
|
|
||||||
for(String_options::iterator it = string_options.begin();
|
|
||||||
it != string_options.end();
|
|
||||||
++it)
|
|
||||||
std::cerr << "--" << it->first << " default value is \""
|
|
||||||
<< it->second << "\".\n";
|
|
||||||
for(Double_options::iterator it = double_options.begin();
|
|
||||||
it != double_options.end();
|
|
||||||
++it)
|
|
||||||
std::cerr << "--" << it->first << " default value is "
|
|
||||||
<< it->second << ".\n";
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::pair<std::ostream*, const bool>
|
|
||||||
open_file_for_writing(std::string filename,
|
|
||||||
std::string display_string = "Writing to ")
|
|
||||||
{
|
|
||||||
if( filename != "")
|
|
||||||
{
|
|
||||||
if( filename == "-" )
|
|
||||||
{
|
|
||||||
std::cerr << display_string << "standard out...\n";
|
|
||||||
return std::make_pair(&std::cout, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::ofstream* result = new std::ofstream(filename.c_str());
|
|
||||||
if( *result )
|
|
||||||
{
|
|
||||||
std::cerr << display_string << "file " << filename << "...\n";
|
|
||||||
return std::make_pair(result, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
delete result;
|
|
||||||
std::cerr << "Error: cannot create " << filename << "\n";
|
|
||||||
usage();
|
|
||||||
return std::pair<std::ostream*, bool>(0, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return std::pair<std::ostream*, bool>(0, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void parse_argv(int argc, char** argv, int extra_args = 0)
|
|
||||||
{
|
|
||||||
if (argc >=(2 + extra_args))
|
|
||||||
{
|
|
||||||
std::string arg = argv[1+extra_args];
|
|
||||||
if( arg == "-h" || arg == "--help")
|
|
||||||
usage();
|
|
||||||
else if( arg == "-f" )
|
|
||||||
{
|
|
||||||
if( argc < (3 + extra_args) )
|
|
||||||
usage("-f must be followed by a function name!");
|
|
||||||
function_name = argv[2 + extra_args];
|
|
||||||
parse_argv(argc, argv, extra_args + 2);
|
|
||||||
}
|
|
||||||
else if( arg.substr(0, 2) == "--" )
|
|
||||||
{
|
|
||||||
Double_options::iterator opt_it =
|
|
||||||
double_options.find(arg.substr(2, arg.length()-2));
|
|
||||||
if( opt_it != double_options.end() )
|
|
||||||
{
|
|
||||||
if( argc < (3 + extra_args) )
|
|
||||||
usage((arg + " must be followed by a double!").c_str());
|
|
||||||
std::stringstream s;
|
|
||||||
double val;
|
|
||||||
s << argv[extra_args + 2];
|
|
||||||
s >> val;
|
|
||||||
if( !s )
|
|
||||||
usage(("Bad double after " + arg + "!").c_str());
|
|
||||||
opt_it->second = val;
|
|
||||||
parse_argv(argc, argv, extra_args + 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
String_options::iterator opt_it =
|
|
||||||
string_options.find(arg.substr(2, arg.length()-2));
|
|
||||||
if( opt_it != string_options.end() )
|
|
||||||
{
|
|
||||||
if( argc < (3 + extra_args) )
|
|
||||||
usage((arg + " must be followed by a string!").c_str());
|
|
||||||
std::string s = argv[extra_args + 2];
|
|
||||||
opt_it->second = s;
|
|
||||||
parse_argv(argc, argv, extra_args + 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
usage(("Invalid option " + arg).c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
filename = argv[1+extra_args];
|
|
||||||
parse_argv(argc, argv, extra_args + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////// Main function ///////////////
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
argv0 = argv[0];
|
|
||||||
|
|
||||||
init_parameters();
|
|
||||||
functions["generic_inrimage"] = &generic_inrimage_function;
|
|
||||||
usage_ptr = &usage;
|
|
||||||
|
|
||||||
parse_argv(argc, argv);
|
|
||||||
|
|
||||||
std::string inrimage = get_string_option("inrimage");
|
|
||||||
if( inrimage != "")
|
|
||||||
{
|
|
||||||
function_name = "generic_inrimage";
|
|
||||||
CGAL_assertion(get_double_option("iso_value") > 0);
|
|
||||||
isosurface = new Gray_image(inrimage.c_str(),
|
|
||||||
get_double_option("iso_value"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function
|
|
||||||
FT sphere_radius = get_double_option("enclosing_sphere_radius");
|
|
||||||
|
|
||||||
Surface surface(Implicit_function_wrapper(get_function(function_name)),
|
|
||||||
Sphere_3(
|
|
||||||
Bare_point_3(get_double_option("center_x"),
|
|
||||||
get_double_option("center_y"),
|
|
||||||
get_double_option("center_z")),
|
|
||||||
sphere_radius*sphere_radius),
|
|
||||||
get_double_option("precision"));
|
|
||||||
|
|
||||||
// 2D-complex in 3D-Delaunay triangulation
|
|
||||||
Tr tr;
|
|
||||||
C2t3 c2t3(tr);
|
|
||||||
|
|
||||||
CGAL::Timer timer;
|
|
||||||
|
|
||||||
bool need_delete = false;
|
|
||||||
std::ostream* out = 0;
|
|
||||||
|
|
||||||
// Create the volume_mesh_traits by hand, to pass it
|
|
||||||
// Point_surface_indices_visitor(1), that is a visitor for oracles that
|
|
||||||
// sets surface_index() to a given integer.
|
|
||||||
Volume_mesh_traits
|
|
||||||
volume_mesh_traits
|
|
||||||
(Volume_mesh_traits::Transform_functor(),
|
|
||||||
Volume_mesh_traits::Surface_identifiers_generator(),
|
|
||||||
Volume_mesher_traits_visitor(1)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Initial point sample
|
|
||||||
std::string read_initial_points = get_string_option("read_initial_points");
|
|
||||||
if( read_initial_points != "")
|
|
||||||
{
|
|
||||||
std::ifstream in( read_initial_points.c_str() );
|
|
||||||
int n;
|
|
||||||
in >> n;
|
|
||||||
CGAL_assertion(in);
|
|
||||||
while( !in.eof() )
|
|
||||||
{
|
|
||||||
Point_3 p;
|
|
||||||
if(in >> p)
|
|
||||||
{
|
|
||||||
tr.insert(p);
|
|
||||||
--n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CGAL_assertion( n == 0 );
|
|
||||||
double_options["number_of_initial_points"] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const int number_of_initial_points =
|
|
||||||
static_cast<int>(get_double_option("number_of_initial_points"));
|
|
||||||
|
|
||||||
std::vector<Point_3> initial_point_sample;
|
|
||||||
initial_point_sample.reserve(number_of_initial_points);
|
|
||||||
|
|
||||||
Initial_points get_initial_points =
|
|
||||||
volume_mesh_traits.construct_initial_points_object();
|
|
||||||
|
|
||||||
get_initial_points(surface,
|
|
||||||
std::back_inserter(initial_point_sample),
|
|
||||||
number_of_initial_points);
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("dump_of_initial_points"),
|
|
||||||
"Writing initial points to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
*out << initial_point_sample.size() << "\n";
|
|
||||||
for(std::vector<Point_3>::const_iterator it =
|
|
||||||
initial_point_sample.begin();
|
|
||||||
it != initial_point_sample.end();
|
|
||||||
++it)
|
|
||||||
*out << *it <<"\n";
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
tr.insert (initial_point_sample.begin(), initial_point_sample.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Meshing criteria
|
|
||||||
CGAL::Surface_mesher::Curvature_size_criterion<Tr>
|
|
||||||
curvature_size_criterion (get_double_option("distance_bound"));
|
|
||||||
CGAL::Surface_mesher::Uniform_size_criterion<Tr>
|
|
||||||
uniform_size_criterion (get_double_option("radius_bound"));
|
|
||||||
CGAL::Surface_mesher::Aspect_ratio_criterion<Tr>
|
|
||||||
aspect_ratio_criterion (get_double_option("angle_bound"));
|
|
||||||
CGAL::Surface_mesher::Vertices_on_the_same_surface_criterion<Tr>
|
|
||||||
vertices_on_the_same_surface_criterion;
|
|
||||||
|
|
||||||
std::vector<Criterion*> criterion_vector;
|
|
||||||
criterion_vector.push_back(&aspect_ratio_criterion);
|
|
||||||
criterion_vector.push_back(&uniform_size_criterion);
|
|
||||||
criterion_vector.push_back(&curvature_size_criterion);
|
|
||||||
criterion_vector.push_back(&vertices_on_the_same_surface_criterion);
|
|
||||||
Criteria criteria (criterion_vector);
|
|
||||||
|
|
||||||
Tets_criteria
|
|
||||||
tets_criteria(get_double_option("tets_aspect_ratio_bound"),
|
|
||||||
get_double_option("tets_radius_bound"));
|
|
||||||
|
|
||||||
std::cerr << "\nInitial number of points: " << tr.number_of_vertices()
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Surface meshing
|
|
||||||
|
|
||||||
Mesher mesher (c2t3, surface, criteria, tets_criteria, volume_mesh_traits);
|
|
||||||
timer.start();
|
|
||||||
mesher.refine_surface();
|
|
||||||
timer.stop();
|
|
||||||
std::cerr << "\nNumber of points after refine_surface(): "
|
|
||||||
<< tr.number_of_vertices() << std::endl
|
|
||||||
<< "Elapsed time: " << timer.time() << std::endl;
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("initial_surface_off"),
|
|
||||||
"Writing initial surface off to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_oriented_surface_facets_to_off(*out, tr);
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
timer.start();
|
|
||||||
mesher.refine_mesh();
|
|
||||||
timer.stop();
|
|
||||||
|
|
||||||
std::cout.flush();
|
|
||||||
|
|
||||||
std::cerr << "\nFinal number of points: " << tr.number_of_vertices()
|
|
||||||
<< std::endl
|
|
||||||
<< "Total time: " << timer.time() << std::endl;
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(filename,
|
|
||||||
"Writing medit mesh before exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_to_medit(*out, mesher.complex_2_in_triangulation_3());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("cgal_mesh_before_exudation"),
|
|
||||||
"Writing cgal mesh before exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::Mesh_3::output_mesh(*out, mesher.complex_2_in_triangulation_3());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
CGAL::Mesh_3::Slivers_exuder<C2t3> exuder(tr);
|
|
||||||
exuder.pump_vertices(get_double_option("pumping_bound"));
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("cgal_mesh_after_filename"),
|
|
||||||
"Writing cgal mesh after exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::Mesh_3::output_mesh(*out, mesher.complex_2_in_triangulation_3());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("mesh_after_filename"),
|
|
||||||
"Writing medit mesh after exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_to_medit(*out, mesher.complex_2_in_triangulation_3());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("surface_off"),
|
|
||||||
"Writing finale surface off to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_oriented_surface_facets_to_off(*out, tr);
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// std::string dump_final_surface_filename = get_string_option("surface_ghs");
|
|
||||||
// if( dump_final_surface_filename != "" )
|
|
||||||
// {
|
|
||||||
// std::ofstream dump_points((dump_final_surface_filename +
|
|
||||||
// ".points").c_str());
|
|
||||||
// std::ofstream dump_faces((dump_final_surface_filename +
|
|
||||||
// ".faces").c_str());
|
|
||||||
// if( dump_points && dump_faces ) {
|
|
||||||
// std::cerr << "Writing final surface to ghs file "
|
|
||||||
// << dump_final_surface_filename << "..." << std::endl;
|
|
||||||
// output_surface_facets_to_ghs(dump_points, dump_faces, tr);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// usage(("Error: cannot create " +
|
|
||||||
// dump_final_surface_filename).c_str());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("slivers_off"),
|
|
||||||
"Writing slivers off to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_slivers_to_off(*out, tr, get_double_option("sliver_test"));
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cerr << " done\n";
|
|
||||||
|
|
||||||
#ifdef CGAL_SURFACE_MESHER_TEST_OPTIONS
|
|
||||||
check_all_options_have_been_used();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
@ -1,880 +0,0 @@
|
||||||
MeshVersionFormatted 1
|
|
||||||
Dimension 3
|
|
||||||
Vertices
|
|
||||||
143
|
|
||||||
0.98036263481573682199 0.10675296188087485261 0.99839912302741118388 1
|
|
||||||
-0.48655318576831563249 -0.99972301165058075068 -0.098725652135726676972 1
|
|
||||||
-0.074272213664211439443 -0.44881122361745107163 -1.0000230900004680734 1
|
|
||||||
-0.9991970125523699231 0.53571718602907913986 -0.76582330117071251152 1
|
|
||||||
-1.0012962378233822847 0.4608264306958099743 0.65126409363710990874 1
|
|
||||||
0.34211152549037826542 -1.0004151335212285723 -0.11450617334958224092 1
|
|
||||||
0.99853039482548056061 0.31113972141656165427 0.15710900566773489118 1
|
|
||||||
-0.91444433309043282598 -1.0009864632409564145 0.80955506716782088539 1
|
|
||||||
0.59182561426402435778 -0.5336706414337966109 -1.0020170475299892132 1
|
|
||||||
1.0010612592518048913 0.58436404238380712517 0.88118685543122410309 1
|
|
||||||
0.31068983935139016239 0.9977865269717742791 0.042395894640321785118 1
|
|
||||||
0.64339164665844161828 -0.71107108075152347659 1.0003531962993292836 1
|
|
||||||
-0.72849566959318456938 -0.40595701047002719086 1.0020754330844283686 1
|
|
||||||
-0.21241192293189065099 -0.99949565239688986651 -0.50466640162812836934 1
|
|
||||||
-0.24933960790265549679 -1.0010163685594033467 0.47039730872074869694 1
|
|
||||||
0.06977664719994304543 0.78791995689174554318 -0.99922197920932376292 1
|
|
||||||
-0.44441230640917961381 0.51333273643514676365 1.0014952191058910103 1
|
|
||||||
-0.62955982835497847905 -0.26655857350925582505 -0.998301767846896837 1
|
|
||||||
0.23830065477231107685 -0.06321193374183554925 0.9983284602112689754 1
|
|
||||||
-0.37942327721094543103 1.0023489596009502733 -0.24151313959919207264 1
|
|
||||||
-1.0011406366881903107 -0.29193393289345004327 0.14352244883039627643 1
|
|
||||||
1.0021073294649507357 0.3920076494379124421 -0.86186221340738478069 1
|
|
||||||
1.0016910904488600664 -0.45554422965901852915 -0.24399162466830723317 1
|
|
||||||
-0.036483848422079648288 0.16530567978589724709 -0.51259404904220207122 0
|
|
||||||
0.33791310762138815349 0.12993487732822328606 -1.0010343914931820741 1
|
|
||||||
0.66246712330245971501 0.99943628455645783237 -0.60910932974404974338 1
|
|
||||||
1.0009815367752326054 0.98382880250648496734 -0.005644559278906207539 1
|
|
||||||
1.0026026983739164677 0.099877599654066478996 -0.37234377412327962498 1
|
|
||||||
0.69199123542082707772 1.000232321865259788 0.5351552849404140888 1
|
|
||||||
-1.0005658500909111464 -0.066858030897380571478 -0.48294386872532435451 1
|
|
||||||
-0.54583957718388420588 0.99956503273808938737 0.46808666700541790018 1
|
|
||||||
-0.99936415520936094925 0.66913042150906354433 -0.048248697738058898832 1
|
|
||||||
-0.10538319955070606093 -0.62870488316647810123 0.99818665876286338801 1
|
|
||||||
0.67013776662788648864 0.21766773865164054658 0.29339292823272367094 0
|
|
||||||
-0.41703862928896029416 0.35163690944498632307 -0.99935723398371822945 1
|
|
||||||
-0.79737562224609703776 0.11886680640743196857 1.0000741988190120502 1
|
|
||||||
-0.38497242823287436408 -0.33881000773129321679 0.42176359722898659754 0
|
|
||||||
0.31059474311123558277 0.63518046619057910718 0.99802927138648611649 1
|
|
||||||
0.11274119511076380329 0.99907817445742586049 0.58947671591710038008 1
|
|
||||||
0.36276356897620126718 0.40635509362493971164 0.36459841999699588166 0
|
|
||||||
0.99849636628403759531 -0.32893330143845345148 0.44727462630805914223 1
|
|
||||||
0.34863255456912822794 -0.99780083516103679209 -0.7129134297148972399 1
|
|
||||||
1.0005249313419686263 -0.93773406724537156087 -0.68751007793215834774 1
|
|
||||||
0.36465475162094834749 -0.40810193587702126017 -0.3982810238577259021 0
|
|
||||||
0.39819976630181930233 0.41331251378165201338 -0.38478622856905009275 0
|
|
||||||
-0.29896009346425395092 -0.082655821751925137586 0.999840776470734105 1
|
|
||||||
0.23327246834116016627 -1.0011771679514818167 0.75372096836777435769 1
|
|
||||||
0.82353473985708014471 -0.99885026923546904598 0.38678118066833083732 1
|
|
||||||
-0.61991587571333739426 -0.63740382194391542736 0.15700003876964907512 0
|
|
||||||
0.12219630043877777181 1.0019387397100631976 -0.48009479396514709304 1
|
|
||||||
0.57740366228945283478 0.66339754011982132731 -1.0003053961322130316 1
|
|
||||||
0.67014935476717640839 -0.24375893823722791232 1.0008454601564835684 1
|
|
||||||
1.0007655306728397981 -0.66333634655207251996 0.1512982901449171913 1
|
|
||||||
0.99975728072550495984 0.62548432125545350146 -0.3906011652475124829 1
|
|
||||||
0.99980395448611858455 0.62229746987097878108 -0.028368491315066104302 1
|
|
||||||
0.17215649582639996895 -0.99966373017715703941 0.30512511348661952582 1
|
|
||||||
0.99884354371170047671 -0.49684729136921057524 0.85403289132286130947 1
|
|
||||||
0.99855576054700834199 -0.12223471148658621166 0.052180996646859711952 1
|
|
||||||
0.81418338624797670366 -0.06821418189343975147 -0.99962602937203826059 1
|
|
||||||
-0.04515704548365512272 0.57913543027894887061 -0.080094393093129989669 0
|
|
||||||
-0.99888477422914967452 -0.89716589842064797811 0.21498856237825872406 1
|
|
||||||
-0.9984170026515329921 0.21867609851488245543 0.19838955442852146405 1
|
|
||||||
-0.38917316990221206829 0.30595958254294430834 0.39278317858032513188 0
|
|
||||||
-0.71478502662926513 0.99841084272719593518 0.054141373644322123015 1
|
|
||||||
0.036855403718042911709 0.020191403756531611791 0.51751175051223741175 0
|
|
||||||
-1.0008751604079035857 0.8397676681685761757 0.38333413993229570327 1
|
|
||||||
-0.99860098563398635996 -0.81071109736063562412 -0.62320160440178151706 1
|
|
||||||
-0.47986389424539943604 -0.37778883256589401718 -0.19999006062423080321 0
|
|
||||||
-0.51433259472314363236 -0.85254189245989753232 -0.99853107785779759986 1
|
|
||||||
-0.11064832432946780649 -0.51158093735361243048 -0.50691216513633396978 0
|
|
||||||
0.99852841617161625098 -0.25464441109313562528 -0.64058019359110929258 1
|
|
||||||
0.57042635268995600661 -0.0020220014939054675729 -0.57968424904154924882 0
|
|
||||||
0.51627747870309226297 0.071533438934681919941 -0.0068133601960206485737 0
|
|
||||||
0.99978464895250329647 0.25937762228886823701 0.59022931700128367094 1
|
|
||||||
0.57093710175683276553 -0.0033354623976089015081 0.56992294573779445077 0
|
|
||||||
0.54510145239283391838 0.60930624225096163826 -0.00045758099769258736567 0
|
|
||||||
-0.10712025579519911245 0.010736667996349848198 -1.000355253054936 1
|
|
||||||
0.30077100386511462782 0.21870566845500696851 0.66995590167862761888 0
|
|
||||||
-0.88204578791639776103 0.99932967453555332504 -0.48080240814757679857 1
|
|
||||||
-1.0017347322865020054 0.27842656709334639986 -0.22714140286133815971 1
|
|
||||||
-0.52854068021558597845 -0.075528051599551504491 -0.56968782149726615582 0
|
|
||||||
-0.15295725516368588459 -1.0009715972309010112 0.85892147582356281887 1
|
|
||||||
-0.055459619773448709523 -0.60828957742857259205 0.55532414957872777705 0
|
|
||||||
0.28971251773111394989 -0.48164323241538581355 0.99887964924128080924 1
|
|
||||||
0.28697883943340185553 -0.26993840319995981991 -0.99812140126353465774 1
|
|
||||||
0.79063162742333470412 -1.0002521471967191768 -0.063434385327172826408 1
|
|
||||||
0.54186963037860103043 -0.57937184059469337694 0.019251443921661059999 0
|
|
||||||
0.99859602005747738485 -0.82482441138714612805 -0.32638221840191322665 1
|
|
||||||
-0.41878856162864491752 0.99926910830990611778 -0.80632640088130602685 1
|
|
||||||
-0.673363149428988228 0.70408363384664074403 -1.0012153971043775691 1
|
|
||||||
-0.99786817572779862306 -0.54581126955585923533 0.58890531428635917166 1
|
|
||||||
-0.87668489619707734573 0.96676910928692338931 0.99906298864693954265 1
|
|
||||||
-0.38765846436259054908 0.99986062231116890064 0.93623974777502649847 1
|
|
||||||
-0.83986151689617649652 0.56910649170270222186 1.0001292752210988457 1
|
|
||||||
-0.48696242103955889036 0.59781007808229591483 0.049761538116573356128 0
|
|
||||||
-0.15125083059559851772 1.0024256820263297563 0.18459583118583844374 1
|
|
||||||
-1.0011426385842792097 -0.05986786472363134215 0.59665786640351381465 1
|
|
||||||
-0.57852724119278142734 0.035334666922507140807 0.036244828202199125267 0
|
|
||||||
-0.99916542176370715111 -0.49002555267422509555 -0.28131169907203074088 1
|
|
||||||
0.99935873704299127418 0.68461151766283467879 0.44224328510524690827 1
|
|
||||||
0.64848296107701142166 0.37477468459243412635 0.99840718859921362416 1
|
|
||||||
0.9997749573330920736 -0.5793924853775206385 -0.90852034023398986484 1
|
|
||||||
-0.67207492047284012049 -0.99907997725392294619 0.46312290321778371016 1
|
|
||||||
-0.55828674867216432354 -0.0065185790781354668866 0.65249833416117808405 0
|
|
||||||
0.6685194127525512231 -0.99849374505273691405 -0.4720662563781997112 1
|
|
||||||
-1.0005006385446955086 -0.39492659222076220704 -0.7856851407904812401 1
|
|
||||||
-0.035861543990852270958 -0.93238092117799331593 -1.0013598578760072311 1
|
|
||||||
-0.012942321071232422425 0.31236754641544295374 0.22971203104957022001 0
|
|
||||||
0.38514062785337854766 1.0017856239096691873 0.37867828588400181955 1
|
|
||||||
0.026280139767893638536 0.94705949424237523271 0.99926127206357673316 1
|
|
||||||
-0.067234037685737907397 0.57627301246881446062 0.99979817220150091206 1
|
|
||||||
-0.29481898451218846446 0.70500344502602829699 -1.0008697148189777959 1
|
|
||||||
0.4795756938007139647 -1.000289385833260658 0.49170436014684670845 1
|
|
||||||
-0.55853342966749464082 0.99995383900506196184 -0.51280363046703225649 1
|
|
||||||
-0.99811250473064938582 0.59659096074309803104 -0.40595127085296744962 1
|
|
||||||
-0.21238142288762257293 0.99828930368289714448 -0.53692000062177380748 1
|
|
||||||
0.44999555409135805206 0.99975537098850675299 -0.30310660601785510693 1
|
|
||||||
0.99829957122303736305 0.33370120360706756468 -0.15878617866876643117 1
|
|
||||||
-0.6006215901377759403 0.60269082161715481494 0.61469163064191678636 0
|
|
||||||
-0.54451764374905720079 -0.82082876224401313259 1.0010361674648782238 1
|
|
||||||
-0.59298172880852417777 -0.62883688293846717876 0.63529252569048322297 0
|
|
||||||
-0.23401212660553827316 0.99968907080675684096 0.62352531007838618571 1
|
|
||||||
-0.022738525422734443687 -0.28187083640553783903 0.26251912957434198059 0
|
|
||||||
-0.070906801822372328425 -1.0015764376469662444 -0.037547713973215775252 1
|
|
||||||
0.16984928380338290554 0.29681263441972538519 1.0001942725540764467 1
|
|
||||||
-0.00096016920237236504272 -0.30498393049291638857 0.99831339474842184512 1
|
|
||||||
-0.17548985600599914525 0.24413321598668535906 0.99756754913900924642 1
|
|
||||||
1.0018954511699431631 0.35679798137305229755 -0.5509473478020172621 1
|
|
||||||
0.26419104162646117606 0.48352063689838348237 -1.000660518069827809 1
|
|
||||||
0.32959235574642675726 1.0019255449294868221 -0.8073580488140883471 1
|
|
||||||
1.0006863077587373478 0.86521550614707609661 -0.91653268889750783011 1
|
|
||||||
0.6688405363050808905 0.59860726137798347946 -0.61535724314510731325 0
|
|
||||||
-0.99842367241411755785 0.54079174977524591128 0.25202350211687651882 1
|
|
||||||
-0.16600392072175346181 -0.16429481377390922625 -0.66287492629973299163 0
|
|
||||||
0.059092736489901209751 0.5848843455402575886 -0.60811179652547664443 0
|
|
||||||
0.11380005322873906759 0.28248721951369937244 -0.20738373893265196757 0
|
|
||||||
0.32580316951172427764 -0.059319425181216939302 0.29006987515480248119 0
|
|
||||||
0.28341468258830970761 -0.17461880724609085691 0.6702612037078343743 0
|
|
||||||
0.65308485876454747121 -0.38539517106802112512 0.63179991451078654219 0
|
|
||||||
-0.00045871377667885959717 -0.00716097622032262765 -0.027053612176287433755 0
|
|
||||||
0.32144026415110782402 -0.41316058330044702629 0.4178195906898723444 0
|
|
||||||
0.65332573049019015965 0.99973574761091521523 -0.020283804552046320879 1
|
|
||||||
-0.48793610131992815049 0.3394513985116662802 -0.33188376821935383632 0
|
|
||||||
Triangles
|
|
||||||
208
|
|
||||||
96 50 20 1
|
|
||||||
35 129 77 1
|
|
||||||
35 112 129 1
|
|
||||||
67 14 69 1
|
|
||||||
9 85 59 1
|
|
||||||
19 46 127 1
|
|
||||||
35 90 112 1
|
|
||||||
22 59 25 1
|
|
||||||
22 51 25 1
|
|
||||||
9 107 3 1
|
|
||||||
1 74 41 1
|
|
||||||
101 125 38 1
|
|
||||||
100 74 7 1
|
|
||||||
46 36 127 1
|
|
||||||
113 56 47 1
|
|
||||||
15 2 103 1
|
|
||||||
85 25 59 1
|
|
||||||
71 28 128 1
|
|
||||||
86 53 88 1
|
|
||||||
111 17 127 1
|
|
||||||
111 125 127 1
|
|
||||||
1 101 52 1
|
|
||||||
88 71 102 1
|
|
||||||
88 71 23 1
|
|
||||||
116 89 114 1
|
|
||||||
31 66 64 1
|
|
||||||
31 66 92 1
|
|
||||||
69 3 18 1
|
|
||||||
107 69 3 1
|
|
||||||
2 124 14 1
|
|
||||||
31 93 122 1
|
|
||||||
16 129 112 1
|
|
||||||
96 31 64 1
|
|
||||||
21 30 80 1
|
|
||||||
50 117 11 1
|
|
||||||
96 50 11 1
|
|
||||||
57 12 52 1
|
|
||||||
99 30 21 1
|
|
||||||
106 99 30 1
|
|
||||||
39 110 38 1
|
|
||||||
111 110 38 1
|
|
||||||
46 13 36 1
|
|
||||||
116 16 89 1
|
|
||||||
33 46 13 1
|
|
||||||
33 126 46 1
|
|
||||||
51 26 131 1
|
|
||||||
96 20 64 1
|
|
||||||
117 130 50 1
|
|
||||||
14 107 42 1
|
|
||||||
100 10 74 1
|
|
||||||
42 9 107 1
|
|
||||||
42 9 43 1
|
|
||||||
111 93 110 1
|
|
||||||
17 111 93 1
|
|
||||||
47 84 33 1
|
|
||||||
96 109 11 1
|
|
||||||
128 54 22 1
|
|
||||||
21 61 91 1
|
|
||||||
32 80 115 1
|
|
||||||
7 118 58 1
|
|
||||||
51 16 130 1
|
|
||||||
101 38 10 1
|
|
||||||
47 15 82 1
|
|
||||||
21 97 62 1
|
|
||||||
77 3 18 1
|
|
||||||
9 43 102 1
|
|
||||||
51 131 22 1
|
|
||||||
35 18 4 1
|
|
||||||
31 92 93 1
|
|
||||||
84 12 52 1
|
|
||||||
120 13 33 1
|
|
||||||
100 27 29 1
|
|
||||||
100 10 29 1
|
|
||||||
120 82 33 1
|
|
||||||
21 91 97 1
|
|
||||||
94 92 5 1
|
|
||||||
106 69 18 1
|
|
||||||
47 82 33 1
|
|
||||||
58 23 28 1
|
|
||||||
114 64 79 1
|
|
||||||
20 114 64 1
|
|
||||||
51 130 26 1
|
|
||||||
129 51 16 1
|
|
||||||
91 8 13 1
|
|
||||||
50 116 20 1
|
|
||||||
19 125 127 1
|
|
||||||
36 94 17 1
|
|
||||||
36 17 127 1
|
|
||||||
114 89 79 1
|
|
||||||
106 18 4 1
|
|
||||||
12 48 57 1
|
|
||||||
62 80 32 1
|
|
||||||
84 52 19 1
|
|
||||||
10 38 29 1
|
|
||||||
59 71 22 1
|
|
||||||
102 59 71 1
|
|
||||||
6 113 56 1
|
|
||||||
54 26 131 1
|
|
||||||
88 53 23 1
|
|
||||||
14 6 42 1
|
|
||||||
17 94 93 1
|
|
||||||
102 9 59 1
|
|
||||||
133 66 5 1
|
|
||||||
53 23 58 1
|
|
||||||
23 71 28 1
|
|
||||||
7 74 58 1
|
|
||||||
103 8 61 1
|
|
||||||
103 2 61 1
|
|
||||||
35 77 18 1
|
|
||||||
91 8 61 1
|
|
||||||
92 5 66 1
|
|
||||||
1 101 10 1
|
|
||||||
79 90 4 1
|
|
||||||
51 129 25 1
|
|
||||||
62 32 133 1
|
|
||||||
30 106 4 1
|
|
||||||
53 58 41 1
|
|
||||||
55 54 118 1
|
|
||||||
33 84 126 1
|
|
||||||
88 102 43 1
|
|
||||||
88 105 43 1
|
|
||||||
48 41 53 1
|
|
||||||
48 41 57 1
|
|
||||||
1 57 52 1
|
|
||||||
57 1 41 1
|
|
||||||
74 41 58 1
|
|
||||||
28 58 118 1
|
|
||||||
79 89 90 1
|
|
||||||
2 124 15 1
|
|
||||||
7 55 118 1
|
|
||||||
2 67 61 1
|
|
||||||
97 62 5 1
|
|
||||||
39 109 96 1
|
|
||||||
36 94 5 1
|
|
||||||
36 97 5 1
|
|
||||||
35 90 4 1
|
|
||||||
61 99 21 1
|
|
||||||
61 99 67 1
|
|
||||||
39 29 109 1
|
|
||||||
38 39 29 1
|
|
||||||
42 105 43 1
|
|
||||||
2 14 67 1
|
|
||||||
1 10 74 1
|
|
||||||
85 9 3 1
|
|
||||||
7 100 55 1
|
|
||||||
25 129 77 1
|
|
||||||
128 28 118 1
|
|
||||||
116 20 114 1
|
|
||||||
126 19 84 1
|
|
||||||
131 22 54 1
|
|
||||||
64 32 79 1
|
|
||||||
64 32 66 1
|
|
||||||
115 80 4 1
|
|
||||||
94 92 93 1
|
|
||||||
120 8 13 1
|
|
||||||
142 117 11 1
|
|
||||||
16 116 50 1
|
|
||||||
42 6 105 1
|
|
||||||
56 47 15 1
|
|
||||||
77 85 25 1
|
|
||||||
77 85 3 1
|
|
||||||
124 56 15 1
|
|
||||||
124 6 14 1
|
|
||||||
39 122 110 1
|
|
||||||
47 12 84 1
|
|
||||||
130 16 50 1
|
|
||||||
86 53 48 1
|
|
||||||
89 112 90 1
|
|
||||||
54 27 26 1
|
|
||||||
115 79 4 1
|
|
||||||
29 142 109 1
|
|
||||||
105 6 86 1
|
|
||||||
6 86 113 1
|
|
||||||
80 30 4 1
|
|
||||||
101 19 52 1
|
|
||||||
86 48 113 1
|
|
||||||
12 113 47 1
|
|
||||||
48 12 113 1
|
|
||||||
21 80 62 1
|
|
||||||
32 115 79 1
|
|
||||||
16 112 89 1
|
|
||||||
122 39 96 1
|
|
||||||
13 97 36 1
|
|
||||||
91 13 97 1
|
|
||||||
55 27 100 1
|
|
||||||
105 86 88 1
|
|
||||||
125 101 19 1
|
|
||||||
67 99 106 1
|
|
||||||
67 69 106 1
|
|
||||||
14 107 69 1
|
|
||||||
109 142 11 1
|
|
||||||
71 128 22 1
|
|
||||||
126 46 19 1
|
|
||||||
118 54 128 1
|
|
||||||
62 133 5 1
|
|
||||||
31 96 122 1
|
|
||||||
103 8 120 1
|
|
||||||
120 15 103 1
|
|
||||||
120 15 82 1
|
|
||||||
122 93 110 1
|
|
||||||
54 27 55 1
|
|
||||||
27 29 142 1
|
|
||||||
26 27 142 1
|
|
||||||
117 26 130 1
|
|
||||||
117 142 26 1
|
|
||||||
125 111 38 1
|
|
||||||
6 124 56 1
|
|
||||||
133 66 32 1
|
|
||||||
Tetrahedra
|
|
||||||
520
|
|
||||||
96 50 60 20 1
|
|
||||||
135 130 50 132 1
|
|
||||||
67 70 14 69 1
|
|
||||||
72 44 24 134 1
|
|
||||||
72 9 85 59 1
|
|
||||||
19 46 127 65 1
|
|
||||||
1 75 74 41 1
|
|
||||||
141 139 138 84 1
|
|
||||||
121 49 91 37 1
|
|
||||||
34 100 74 7 1
|
|
||||||
46 36 127 104 1
|
|
||||||
71 59 28 128 1
|
|
||||||
63 104 17 119 1
|
|
||||||
86 53 88 87 1
|
|
||||||
138 141 84 83 1
|
|
||||||
123 138 65 83 1
|
|
||||||
140 44 73 137 1
|
|
||||||
45 25 132 72 1
|
|
||||||
40 96 11 60 1
|
|
||||||
73 118 28 45 1
|
|
||||||
116 89 112 114 1
|
|
||||||
21 104 37 98 1
|
|
||||||
2 68 70 14 1
|
|
||||||
119 31 93 122 1
|
|
||||||
37 123 68 98 1
|
|
||||||
135 16 129 112 1
|
|
||||||
99 68 30 98 1
|
|
||||||
96 31 64 95 1
|
|
||||||
83 126 65 37 1
|
|
||||||
42 85 44 9 1
|
|
||||||
54 142 76 55 1
|
|
||||||
21 98 30 80 1
|
|
||||||
21 68 99 98 1
|
|
||||||
76 117 60 11 1
|
|
||||||
57 12 52 139 1
|
|
||||||
123 138 141 65 1
|
|
||||||
138 52 75 19 1
|
|
||||||
140 73 108 137 1
|
|
||||||
132 25 51 22 1
|
|
||||||
111 39 110 38 1
|
|
||||||
140 44 134 24 1
|
|
||||||
67 68 14 70 1
|
|
||||||
30 81 18 4 1
|
|
||||||
132 51 26 131 1
|
|
||||||
83 121 82 33 1
|
|
||||||
139 41 141 75 1
|
|
||||||
40 100 101 34 1
|
|
||||||
95 96 20 64 1
|
|
||||||
70 123 44 140 1
|
|
||||||
14 107 70 42 1
|
|
||||||
101 100 10 74 1
|
|
||||||
135 132 129 130 1
|
|
||||||
95 140 143 60 1
|
|
||||||
83 121 33 37 1
|
|
||||||
73 44 140 136 1
|
|
||||||
47 84 83 33 1
|
|
||||||
60 136 140 143 1
|
|
||||||
128 132 54 22 1
|
|
||||||
49 21 61 91 1
|
|
||||||
40 76 73 136 1
|
|
||||||
95 119 122 31 1
|
|
||||||
46 13 36 104 1
|
|
||||||
32 95 80 115 1
|
|
||||||
7 118 58 73 1
|
|
||||||
21 97 98 62 1
|
|
||||||
132 51 131 22 1
|
|
||||||
81 35 18 4 1
|
|
||||||
7 76 118 34 1
|
|
||||||
119 31 92 93 1
|
|
||||||
74 75 101 34 1
|
|
||||||
120 13 33 121 1
|
|
||||||
123 140 98 63 1
|
|
||||||
121 120 82 33 1
|
|
||||||
65 108 78 40 1
|
|
||||||
76 45 136 60 1
|
|
||||||
21 91 104 97 1
|
|
||||||
106 68 69 18 1
|
|
||||||
73 34 40 137 1
|
|
||||||
47 83 82 33 1
|
|
||||||
52 12 84 139 1
|
|
||||||
56 47 141 83 1
|
|
||||||
72 85 25 59 1
|
|
||||||
143 115 114 4 1
|
|
||||||
63 95 122 96 1
|
|
||||||
141 139 75 138 1
|
|
||||||
21 99 30 98 1
|
|
||||||
108 63 96 95 1
|
|
||||||
60 96 20 95 1
|
|
||||||
15 121 83 49 1
|
|
||||||
49 121 83 37 1
|
|
||||||
40 108 96 60 1
|
|
||||||
121 91 8 13 1
|
|
||||||
60 50 116 20 1
|
|
||||||
65 104 46 127 1
|
|
||||||
36 119 94 17 1
|
|
||||||
28 59 72 128 1
|
|
||||||
140 44 137 87 1
|
|
||||||
73 76 118 45 1
|
|
||||||
68 81 70 18 1
|
|
||||||
115 95 143 114 1
|
|
||||||
62 95 80 32 1
|
|
||||||
84 52 138 19 1
|
|
||||||
44 9 102 105 1
|
|
||||||
63 17 111 119 1
|
|
||||||
143 114 90 4 1
|
|
||||||
65 138 126 83 1
|
|
||||||
41 57 52 139 1
|
|
||||||
6 113 87 56 1
|
|
||||||
107 3 70 42 1
|
|
||||||
54 132 26 131 1
|
|
||||||
88 53 23 87 1
|
|
||||||
14 70 6 42 1
|
|
||||||
123 141 137 65 1
|
|
||||||
70 44 6 42 1
|
|
||||||
49 68 99 21 1
|
|
||||||
17 122 93 111 1
|
|
||||||
17 119 94 93 1
|
|
||||||
95 114 115 79 1
|
|
||||||
133 119 66 5 1
|
|
||||||
73 23 58 87 1
|
|
||||||
136 24 140 143 1
|
|
||||||
106 81 18 30 1
|
|
||||||
87 53 23 58 1
|
|
||||||
23 71 72 28 1
|
|
||||||
76 45 73 136 1
|
|
||||||
123 140 68 98 1
|
|
||||||
45 132 129 135 1
|
|
||||||
81 35 77 18 1
|
|
||||||
137 44 73 87 1
|
|
||||||
128 72 45 132 1
|
|
||||||
124 141 123 56 1
|
|
||||||
40 136 73 108 1
|
|
||||||
62 63 95 133 1
|
|
||||||
98 140 143 95 1
|
|
||||||
127 104 17 63 1
|
|
||||||
24 135 35 143 1
|
|
||||||
62 95 32 133 1
|
|
||||||
17 119 93 122 1
|
|
||||||
141 138 137 65 1
|
|
||||||
78 63 111 108 1
|
|
||||||
44 9 85 72 1
|
|
||||||
70 85 44 42 1
|
|
||||||
34 76 118 73 1
|
|
||||||
49 123 68 37 1
|
|
||||||
34 73 40 76 1
|
|
||||||
49 37 68 98 1
|
|
||||||
78 19 75 52 1
|
|
||||||
108 137 40 65 1
|
|
||||||
73 23 44 72 1
|
|
||||||
49 2 99 68 1
|
|
||||||
61 2 99 49 1
|
|
||||||
30 18 106 4 1
|
|
||||||
87 53 58 41 1
|
|
||||||
140 65 108 63 1
|
|
||||||
55 54 118 76 1
|
|
||||||
101 78 75 52 1
|
|
||||||
34 75 101 78 1
|
|
||||||
63 140 98 108 1
|
|
||||||
133 63 95 119 1
|
|
||||||
45 54 132 76 1
|
|
||||||
137 78 40 65 1
|
|
||||||
47 84 141 83 1
|
|
||||||
88 105 102 43 1
|
|
||||||
33 121 46 37 1
|
|
||||||
137 41 58 75 1
|
|
||||||
44 9 71 102 1
|
|
||||||
28 72 45 128 1
|
|
||||||
140 134 70 68 1
|
|
||||||
68 123 70 140 1
|
|
||||||
28 72 73 45 1
|
|
||||||
57 1 41 52 1
|
|
||||||
103 91 8 121 1
|
|
||||||
137 75 58 34 1
|
|
||||||
62 104 63 119 1
|
|
||||||
65 138 78 19 1
|
|
||||||
65 104 127 63 1
|
|
||||||
70 134 3 18 1
|
|
||||||
69 70 3 18 1
|
|
||||||
6 124 44 70 1
|
|
||||||
2 124 49 15 1
|
|
||||||
107 70 3 69 1
|
|
||||||
42 3 9 107 1
|
|
||||||
62 63 133 119 1
|
|
||||||
40 39 109 96 1
|
|
||||||
128 59 72 22 1
|
|
||||||
40 109 76 11 1
|
|
||||||
40 109 11 96 1
|
|
||||||
44 71 23 88 1
|
|
||||||
63 111 122 119 1
|
|
||||||
83 84 126 33 1
|
|
||||||
38 39 29 109 1
|
|
||||||
42 9 105 43 1
|
|
||||||
11 50 60 96 1
|
|
||||||
81 77 134 18 1
|
|
||||||
136 44 24 72 1
|
|
||||||
69 68 70 18 1
|
|
||||||
67 68 70 69 1
|
|
||||||
67 2 14 68 1
|
|
||||||
71 9 72 59 1
|
|
||||||
71 59 72 28 1
|
|
||||||
1 101 10 74 1
|
|
||||||
73 23 72 28 1
|
|
||||||
100 29 76 40 1
|
|
||||||
7 100 55 76 1
|
|
||||||
105 9 102 43 1
|
|
||||||
58 23 73 28 1
|
|
||||||
70 81 134 18 1
|
|
||||||
19 127 78 65 1
|
|
||||||
59 25 72 22 1
|
|
||||||
88 87 23 44 1
|
|
||||||
24 85 134 25 1
|
|
||||||
40 76 136 60 1
|
|
||||||
23 71 44 72 1
|
|
||||||
71 9 44 72 1
|
|
||||||
126 138 19 84 1
|
|
||||||
78 108 111 39 1
|
|
||||||
141 87 58 41 1
|
|
||||||
143 114 112 90 1
|
|
||||||
33 13 46 121 1
|
|
||||||
99 81 106 30 1
|
|
||||||
106 68 18 81 1
|
|
||||||
118 28 58 73 1
|
|
||||||
137 141 58 41 1
|
|
||||||
7 55 118 76 1
|
|
||||||
40 76 60 11 1
|
|
||||||
71 9 59 102 1
|
|
||||||
37 123 98 63 1
|
|
||||||
140 81 134 68 1
|
|
||||||
140 98 81 68 1
|
|
||||||
65 138 19 126 1
|
|
||||||
141 41 137 75 1
|
|
||||||
123 65 140 63 1
|
|
||||||
63 98 95 108 1
|
|
||||||
33 126 83 37 1
|
|
||||||
123 87 44 140 1
|
|
||||||
120 121 8 13 1
|
|
||||||
7 100 76 34 1
|
|
||||||
34 100 76 40 1
|
|
||||||
140 44 70 134 1
|
|
||||||
45 72 24 25 1
|
|
||||||
72 85 24 25 1
|
|
||||||
76 142 117 11 1
|
|
||||||
99 2 67 68 1
|
|
||||||
42 9 44 105 1
|
|
||||||
61 2 67 99 1
|
|
||||||
134 35 77 81 1
|
|
||||||
60 135 116 50 1
|
|
||||||
58 74 7 34 1
|
|
||||||
117 50 45 60 1
|
|
||||||
135 129 35 112 1
|
|
||||||
135 16 116 50 1
|
|
||||||
143 90 35 4 1
|
|
||||||
111 127 17 63 1
|
|
||||||
94 119 92 93 1
|
|
||||||
91 121 37 104 1
|
|
||||||
127 36 17 104 1
|
|
||||||
56 47 83 15 1
|
|
||||||
47 15 82 83 1
|
|
||||||
114 79 90 4 1
|
|
||||||
21 97 104 98 1
|
|
||||||
54 132 131 22 1
|
|
||||||
124 70 6 14 1
|
|
||||||
111 39 122 110 1
|
|
||||||
139 52 138 84 1
|
|
||||||
42 3 85 9 1
|
|
||||||
70 3 85 42 1
|
|
||||||
135 130 16 50 1
|
|
||||||
129 130 16 135 1
|
|
||||||
114 89 112 90 1
|
|
||||||
114 79 89 90 1
|
|
||||||
86 48 53 87 1
|
|
||||||
115 79 114 4 1
|
|
||||||
44 23 73 87 1
|
|
||||||
137 75 34 78 1
|
|
||||||
103 61 8 91 1
|
|
||||||
101 19 78 52 1
|
|
||||||
108 63 122 96 1
|
|
||||||
63 119 122 95 1
|
|
||||||
40 108 39 96 1
|
|
||||||
138 75 78 19 1
|
|
||||||
11 50 117 60 1
|
|
||||||
143 116 112 114 1
|
|
||||||
6 113 86 87 1
|
|
||||||
113 48 86 87 1
|
|
||||||
95 133 64 32 1
|
|
||||||
95 20 143 114 1
|
|
||||||
114 95 64 79 1
|
|
||||||
139 52 75 138 1
|
|
||||||
21 98 80 62 1
|
|
||||||
32 95 115 79 1
|
|
||||||
95 32 64 79 1
|
|
||||||
95 66 64 133 1
|
|
||||||
95 31 64 66 1
|
|
||||||
123 65 63 37 1
|
|
||||||
45 54 128 132 1
|
|
||||||
118 128 28 45 1
|
|
||||||
119 31 95 66 1
|
|
||||||
133 119 95 66 1
|
|
||||||
40 108 78 39 1
|
|
||||||
108 122 39 96 1
|
|
||||||
99 68 81 30 1
|
|
||||||
68 81 30 98 1
|
|
||||||
77 25 129 24 1
|
|
||||||
2 70 124 14 1
|
|
||||||
124 87 141 56 1
|
|
||||||
38 29 101 40 1
|
|
||||||
40 29 101 100 1
|
|
||||||
101 29 10 100 1
|
|
||||||
38 29 10 101 1
|
|
||||||
87 48 139 141 1
|
|
||||||
1 101 75 52 1
|
|
||||||
137 141 75 138 1
|
|
||||||
37 123 65 83 1
|
|
||||||
72 134 24 85 1
|
|
||||||
1 75 101 74 1
|
|
||||||
6 87 86 105 1
|
|
||||||
105 87 86 88 1
|
|
||||||
65 37 46 104 1
|
|
||||||
46 121 104 37 1
|
|
||||||
17 119 122 111 1
|
|
||||||
21 91 37 104 1
|
|
||||||
108 122 111 39 1
|
|
||||||
62 97 98 104 1
|
|
||||||
62 97 104 5 1
|
|
||||||
97 36 104 5 1
|
|
||||||
124 56 83 15 1
|
|
||||||
44 102 71 105 1
|
|
||||||
105 102 71 88 1
|
|
||||||
44 105 71 88 1
|
|
||||||
105 87 88 44 1
|
|
||||||
6 87 105 44 1
|
|
||||||
6 42 44 105 1
|
|
||||||
67 68 106 99 1
|
|
||||||
106 68 81 99 1
|
|
||||||
67 68 69 106 1
|
|
||||||
14 70 107 69 1
|
|
||||||
65 37 104 63 1
|
|
||||||
143 20 116 114 1
|
|
||||||
21 37 49 98 1
|
|
||||||
76 109 142 11 1
|
|
||||||
73 87 58 137 1
|
|
||||||
49 124 83 15 1
|
|
||||||
78 111 38 39 1
|
|
||||||
38 109 29 40 1
|
|
||||||
40 29 76 109 1
|
|
||||||
143 112 35 90 1
|
|
||||||
38 39 109 40 1
|
|
||||||
71 59 128 22 1
|
|
||||||
108 95 96 60 1
|
|
||||||
103 49 91 121 1
|
|
||||||
123 141 83 56 1
|
|
||||||
126 46 19 65 1
|
|
||||||
126 46 65 37 1
|
|
||||||
33 46 126 37 1
|
|
||||||
45 25 129 132 1
|
|
||||||
65 63 78 108 1
|
|
||||||
143 60 20 95 1
|
|
||||||
134 77 3 18 1
|
|
||||||
76 45 60 117 1
|
|
||||||
45 132 117 76 1
|
|
||||||
118 54 128 45 1
|
|
||||||
76 54 118 45 1
|
|
||||||
40 136 108 60 1
|
|
||||||
73 44 136 72 1
|
|
||||||
62 98 80 95 1
|
|
||||||
135 24 129 45 1
|
|
||||||
60 24 143 135 1
|
|
||||||
112 16 89 116 1
|
|
||||||
115 143 80 4 1
|
|
||||||
80 143 30 4 1
|
|
||||||
143 81 30 4 1
|
|
||||||
62 104 119 5 1
|
|
||||||
62 119 133 5 1
|
|
||||||
92 5 66 119 1
|
|
||||||
92 119 66 31 1
|
|
||||||
92 5 119 94 1
|
|
||||||
36 5 94 119 1
|
|
||||||
104 36 119 5 1
|
|
||||||
104 36 17 119 1
|
|
||||||
96 95 122 31 1
|
|
||||||
111 122 93 110 1
|
|
||||||
83 15 82 121 1
|
|
||||||
121 15 82 120 1
|
|
||||||
15 103 120 121 1
|
|
||||||
103 121 8 120 1
|
|
||||||
62 104 98 63 1
|
|
||||||
108 140 95 60 1
|
|
||||||
98 140 95 108 1
|
|
||||||
108 63 111 122 1
|
|
||||||
136 72 24 45 1
|
|
||||||
103 61 91 49 1
|
|
||||||
15 2 103 49 1
|
|
||||||
103 2 61 49 1
|
|
||||||
54 27 142 55 1
|
|
||||||
55 100 27 142 1
|
|
||||||
24 35 77 134 1
|
|
||||||
60 24 136 143 1
|
|
||||||
140 143 24 81 1
|
|
||||||
76 29 142 109 1
|
|
||||||
137 138 75 78 1
|
|
||||||
100 29 27 142 1
|
|
||||||
124 123 44 70 1
|
|
||||||
124 70 68 123 1
|
|
||||||
104 13 36 97 1
|
|
||||||
91 13 104 97 1
|
|
||||||
2 70 68 124 1
|
|
||||||
98 104 37 63 1
|
|
||||||
124 56 123 83 1
|
|
||||||
15 49 103 121 1
|
|
||||||
6 87 124 56 1
|
|
||||||
6 87 44 124 1
|
|
||||||
124 87 44 123 1
|
|
||||||
133 66 64 32 1
|
|
||||||
34 41 74 75 1
|
|
||||||
140 123 137 65 1
|
|
||||||
140 137 108 65 1
|
|
||||||
143 35 81 4 1
|
|
||||||
78 19 101 125 1
|
|
||||||
123 141 138 83 1
|
|
||||||
125 127 111 78 1
|
|
||||||
58 41 74 34 1
|
|
||||||
129 51 16 130 1
|
|
||||||
72 25 132 22 1
|
|
||||||
128 72 132 22 1
|
|
||||||
95 64 20 114 1
|
|
||||||
140 143 81 98 1
|
|
||||||
98 143 80 95 1
|
|
||||||
95 143 80 115 1
|
|
||||||
7 34 118 73 1
|
|
||||||
132 25 129 51 1
|
|
||||||
132 51 129 130 1
|
|
||||||
73 72 136 45 1
|
|
||||||
78 127 111 63 1
|
|
||||||
132 130 50 117 1
|
|
||||||
137 138 78 65 1
|
|
||||||
113 12 139 141 1
|
|
||||||
132 54 117 76 1
|
|
||||||
141 12 139 84 1
|
|
||||||
34 100 101 74 1
|
|
||||||
132 54 26 117 1
|
|
||||||
132 26 130 117 1
|
|
||||||
132 26 51 130 1
|
|
||||||
134 85 77 25 1
|
|
||||||
19 127 125 78 1
|
|
||||||
101 78 38 40 1
|
|
||||||
134 85 3 77 1
|
|
||||||
70 85 3 134 1
|
|
||||||
134 44 70 85 1
|
|
||||||
72 44 134 85 1
|
|
||||||
135 77 129 24 1
|
|
||||||
35 77 135 24 1
|
|
||||||
68 134 70 81 1
|
|
||||||
24 134 77 25 1
|
|
||||||
45 135 60 50 1
|
|
||||||
45 136 60 135 1
|
|
||||||
135 132 50 45 1
|
|
||||||
45 132 50 117 1
|
|
||||||
135 16 112 116 1
|
|
||||||
1 139 75 41 1
|
|
||||||
137 34 58 73 1
|
|
||||||
58 34 7 73 1
|
|
||||||
65 127 78 63 1
|
|
||||||
137 34 40 78 1
|
|
||||||
34 78 101 40 1
|
|
||||||
35 77 129 135 1
|
|
||||||
58 41 34 75 1
|
|
||||||
140 44 24 136 1
|
|
||||||
45 24 136 135 1
|
|
||||||
136 24 60 135 1
|
|
||||||
108 73 40 137 1
|
|
||||||
139 87 141 41 1
|
|
||||||
140 87 137 123 1
|
|
||||||
126 138 84 83 1
|
|
||||||
61 49 99 21 1
|
|
||||||
21 49 68 98 1
|
|
||||||
37 21 49 91 1
|
|
||||||
108 136 140 60 1
|
|
||||||
1 52 139 41 1
|
|
||||||
1 52 75 139 1
|
|
||||||
48 57 41 139 1
|
|
||||||
139 48 53 41 1
|
|
||||||
139 53 87 41 1
|
|
||||||
49 83 123 37 1
|
|
||||||
49 124 123 83 1
|
|
||||||
46 13 104 121 1
|
|
||||||
91 13 121 104 1
|
|
||||||
124 123 68 49 1
|
|
||||||
48 12 139 113 1
|
|
||||||
2 124 68 49 1
|
|
||||||
87 48 53 139 1
|
|
||||||
48 12 57 139 1
|
|
||||||
47 12 141 84 1
|
|
||||||
113 12 141 47 1
|
|
||||||
56 47 113 141 1
|
|
||||||
87 113 141 56 1
|
|
||||||
87 48 141 113 1
|
|
||||||
73 136 140 108 1
|
|
||||||
124 87 123 141 1
|
|
||||||
123 87 137 141 1
|
|
||||||
137 87 58 141 1
|
|
||||||
141 48 139 113 1
|
|
||||||
55 100 142 76 1
|
|
||||||
100 29 142 76 1
|
|
||||||
54 142 117 76 1
|
|
||||||
54 142 26 117 1
|
|
||||||
54 27 26 142 1
|
|
||||||
140 81 24 134 1
|
|
||||||
24 35 134 81 1
|
|
||||||
143 35 24 81 1
|
|
||||||
98 62 63 95 1
|
|
||||||
40 78 38 39 1
|
|
||||||
125 111 38 78 1
|
|
||||||
101 125 38 78 1
|
|
||||||
135 112 35 143 1
|
|
||||||
135 112 143 116 1
|
|
||||||
60 135 143 116 1
|
|
||||||
60 116 143 20 1
|
|
||||||
24 25 129 45 1
|
|
||||||
98 81 30 143 1
|
|
||||||
98 143 30 80 1
|
|
||||||
End
|
|
||||||
|
|
@ -1,353 +0,0 @@
|
||||||
OFF
|
|
||||||
143 208 0
|
|
||||||
0.98036263481573682199 0.10675296188087485261 0.99839912302741118388
|
|
||||||
-0.48655318576831563249 -0.99972301165058075068 -0.098725652135726676972
|
|
||||||
-0.074272213664211439443 -0.44881122361745107163 -1.0000230900004680734
|
|
||||||
-0.9991970125523699231 0.53571718602907913986 -0.76582330117071251152
|
|
||||||
-1.0012962378233822847 0.4608264306958099743 0.65126409363710990874
|
|
||||||
0.34211152549037826542 -1.0004151335212285723 -0.11450617334958224092
|
|
||||||
0.99853039482548056061 0.31113972141656165427 0.15710900566773489118
|
|
||||||
-0.91444433309043282598 -1.0009864632409564145 0.80955506716782088539
|
|
||||||
0.59182561426402435778 -0.5336706414337966109 -1.0020170475299892132
|
|
||||||
1.0010612592518048913 0.58436404238380712517 0.88118685543122410309
|
|
||||||
0.31068983935139016239 0.9977865269717742791 0.042395894640321785118
|
|
||||||
0.64339164665844161828 -0.71107108075152347659 1.0003531962993292836
|
|
||||||
-0.72849566959318456938 -0.40595701047002719086 1.0020754330844283686
|
|
||||||
-0.21241192293189065099 -0.99949565239688986651 -0.50466640162812836934
|
|
||||||
-0.24933960790265549679 -1.0010163685594033467 0.47039730872074869694
|
|
||||||
0.06977664719994304543 0.78791995689174554318 -0.99922197920932376292
|
|
||||||
-0.44441230640917961381 0.51333273643514676365 1.0014952191058910103
|
|
||||||
-0.62955982835497847905 -0.26655857350925582505 -0.998301767846896837
|
|
||||||
0.23830065477231107685 -0.06321193374183554925 0.9983284602112689754
|
|
||||||
-0.37942327721094543103 1.0023489596009502733 -0.24151313959919207264
|
|
||||||
-1.0011406366881903107 -0.29193393289345004327 0.14352244883039627643
|
|
||||||
1.0021073294649507357 0.3920076494379124421 -0.86186221340738478069
|
|
||||||
1.0016910904488600664 -0.45554422965901852915 -0.24399162466830723317
|
|
||||||
-0.036483848422079648288 0.16530567978589724709 -0.51259404904220207122
|
|
||||||
0.33791310762138815349 0.12993487732822328606 -1.0010343914931820741
|
|
||||||
0.66246712330245971501 0.99943628455645783237 -0.60910932974404974338
|
|
||||||
1.0009815367752326054 0.98382880250648496734 -0.005644559278906207539
|
|
||||||
1.0026026983739164677 0.099877599654066478996 -0.37234377412327962498
|
|
||||||
0.69199123542082707772 1.000232321865259788 0.5351552849404140888
|
|
||||||
-1.0005658500909111464 -0.066858030897380571478 -0.48294386872532435451
|
|
||||||
-0.54583957718388420588 0.99956503273808938737 0.46808666700541790018
|
|
||||||
-0.99936415520936094925 0.66913042150906354433 -0.048248697738058898832
|
|
||||||
-0.10538319955070606093 -0.62870488316647810123 0.99818665876286338801
|
|
||||||
0.67013776662788648864 0.21766773865164054658 0.29339292823272367094
|
|
||||||
-0.41703862928896029416 0.35163690944498632307 -0.99935723398371822945
|
|
||||||
-0.79737562224609703776 0.11886680640743196857 1.0000741988190120502
|
|
||||||
-0.38497242823287436408 -0.33881000773129321679 0.42176359722898659754
|
|
||||||
0.31059474311123558277 0.63518046619057910718 0.99802927138648611649
|
|
||||||
0.11274119511076380329 0.99907817445742586049 0.58947671591710038008
|
|
||||||
0.36276356897620126718 0.40635509362493971164 0.36459841999699588166
|
|
||||||
0.99849636628403759531 -0.32893330143845345148 0.44727462630805914223
|
|
||||||
0.34863255456912822794 -0.99780083516103679209 -0.7129134297148972399
|
|
||||||
1.0005249313419686263 -0.93773406724537156087 -0.68751007793215834774
|
|
||||||
0.36465475162094834749 -0.40810193587702126017 -0.3982810238577259021
|
|
||||||
0.39819976630181930233 0.41331251378165201338 -0.38478622856905009275
|
|
||||||
-0.29896009346425395092 -0.082655821751925137586 0.999840776470734105
|
|
||||||
0.23327246834116016627 -1.0011771679514818167 0.75372096836777435769
|
|
||||||
0.82353473985708014471 -0.99885026923546904598 0.38678118066833083732
|
|
||||||
-0.61991587571333739426 -0.63740382194391542736 0.15700003876964907512
|
|
||||||
0.12219630043877777181 1.0019387397100631976 -0.48009479396514709304
|
|
||||||
0.57740366228945283478 0.66339754011982132731 -1.0003053961322130316
|
|
||||||
0.67014935476717640839 -0.24375893823722791232 1.0008454601564835684
|
|
||||||
1.0007655306728397981 -0.66333634655207251996 0.1512982901449171913
|
|
||||||
0.99975728072550495984 0.62548432125545350146 -0.3906011652475124829
|
|
||||||
0.99980395448611858455 0.62229746987097878108 -0.028368491315066104302
|
|
||||||
0.17215649582639996895 -0.99966373017715703941 0.30512511348661952582
|
|
||||||
0.99884354371170047671 -0.49684729136921057524 0.85403289132286130947
|
|
||||||
0.99855576054700834199 -0.12223471148658621166 0.052180996646859711952
|
|
||||||
0.81418338624797670366 -0.06821418189343975147 -0.99962602937203826059
|
|
||||||
-0.04515704548365512272 0.57913543027894887061 -0.080094393093129989669
|
|
||||||
-0.99888477422914967452 -0.89716589842064797811 0.21498856237825872406
|
|
||||||
-0.9984170026515329921 0.21867609851488245543 0.19838955442852146405
|
|
||||||
-0.38917316990221206829 0.30595958254294430834 0.39278317858032513188
|
|
||||||
-0.71478502662926513 0.99841084272719593518 0.054141373644322123015
|
|
||||||
0.036855403718042911709 0.020191403756531611791 0.51751175051223741175
|
|
||||||
-1.0008751604079035857 0.8397676681685761757 0.38333413993229570327
|
|
||||||
-0.99860098563398635996 -0.81071109736063562412 -0.62320160440178151706
|
|
||||||
-0.47986389424539943604 -0.37778883256589401718 -0.19999006062423080321
|
|
||||||
-0.51433259472314363236 -0.85254189245989753232 -0.99853107785779759986
|
|
||||||
-0.11064832432946780649 -0.51158093735361243048 -0.50691216513633396978
|
|
||||||
0.99852841617161625098 -0.25464441109313562528 -0.64058019359110929258
|
|
||||||
0.57042635268995600661 -0.0020220014939054675729 -0.57968424904154924882
|
|
||||||
0.51627747870309226297 0.071533438934681919941 -0.0068133601960206485737
|
|
||||||
0.99978464895250329647 0.25937762228886823701 0.59022931700128367094
|
|
||||||
0.57093710175683276553 -0.0033354623976089015081 0.56992294573779445077
|
|
||||||
0.54510145239283391838 0.60930624225096163826 -0.00045758099769258736567
|
|
||||||
-0.10712025579519911245 0.010736667996349848198 -1.000355253054936
|
|
||||||
0.30077100386511462782 0.21870566845500696851 0.66995590167862761888
|
|
||||||
-0.88204578791639776103 0.99932967453555332504 -0.48080240814757679857
|
|
||||||
-1.0017347322865020054 0.27842656709334639986 -0.22714140286133815971
|
|
||||||
-0.52854068021558597845 -0.075528051599551504491 -0.56968782149726615582
|
|
||||||
-0.15295725516368588459 -1.0009715972309010112 0.85892147582356281887
|
|
||||||
-0.055459619773448709523 -0.60828957742857259205 0.55532414957872777705
|
|
||||||
0.28971251773111394989 -0.48164323241538581355 0.99887964924128080924
|
|
||||||
0.28697883943340185553 -0.26993840319995981991 -0.99812140126353465774
|
|
||||||
0.79063162742333470412 -1.0002521471967191768 -0.063434385327172826408
|
|
||||||
0.54186963037860103043 -0.57937184059469337694 0.019251443921661059999
|
|
||||||
0.99859602005747738485 -0.82482441138714612805 -0.32638221840191322665
|
|
||||||
-0.41878856162864491752 0.99926910830990611778 -0.80632640088130602685
|
|
||||||
-0.673363149428988228 0.70408363384664074403 -1.0012153971043775691
|
|
||||||
-0.99786817572779862306 -0.54581126955585923533 0.58890531428635917166
|
|
||||||
-0.87668489619707734573 0.96676910928692338931 0.99906298864693954265
|
|
||||||
-0.38765846436259054908 0.99986062231116890064 0.93623974777502649847
|
|
||||||
-0.83986151689617649652 0.56910649170270222186 1.0001292752210988457
|
|
||||||
-0.48696242103955889036 0.59781007808229591483 0.049761538116573356128
|
|
||||||
-0.15125083059559851772 1.0024256820263297563 0.18459583118583844374
|
|
||||||
-1.0011426385842792097 -0.05986786472363134215 0.59665786640351381465
|
|
||||||
-0.57852724119278142734 0.035334666922507140807 0.036244828202199125267
|
|
||||||
-0.99916542176370715111 -0.49002555267422509555 -0.28131169907203074088
|
|
||||||
0.99935873704299127418 0.68461151766283467879 0.44224328510524690827
|
|
||||||
0.64848296107701142166 0.37477468459243412635 0.99840718859921362416
|
|
||||||
0.9997749573330920736 -0.5793924853775206385 -0.90852034023398986484
|
|
||||||
-0.67207492047284012049 -0.99907997725392294619 0.46312290321778371016
|
|
||||||
-0.55828674867216432354 -0.0065185790781354668866 0.65249833416117808405
|
|
||||||
0.6685194127525512231 -0.99849374505273691405 -0.4720662563781997112
|
|
||||||
-1.0005006385446955086 -0.39492659222076220704 -0.7856851407904812401
|
|
||||||
-0.035861543990852270958 -0.93238092117799331593 -1.0013598578760072311
|
|
||||||
-0.012942321071232422425 0.31236754641544295374 0.22971203104957022001
|
|
||||||
0.38514062785337854766 1.0017856239096691873 0.37867828588400181955
|
|
||||||
0.026280139767893638536 0.94705949424237523271 0.99926127206357673316
|
|
||||||
-0.067234037685737907397 0.57627301246881446062 0.99979817220150091206
|
|
||||||
-0.29481898451218846446 0.70500344502602829699 -1.0008697148189777959
|
|
||||||
0.4795756938007139647 -1.000289385833260658 0.49170436014684670845
|
|
||||||
-0.55853342966749464082 0.99995383900506196184 -0.51280363046703225649
|
|
||||||
-0.99811250473064938582 0.59659096074309803104 -0.40595127085296744962
|
|
||||||
-0.21238142288762257293 0.99828930368289714448 -0.53692000062177380748
|
|
||||||
0.44999555409135805206 0.99975537098850675299 -0.30310660601785510693
|
|
||||||
0.99829957122303736305 0.33370120360706756468 -0.15878617866876643117
|
|
||||||
-0.6006215901377759403 0.60269082161715481494 0.61469163064191678636
|
|
||||||
-0.54451764374905720079 -0.82082876224401313259 1.0010361674648782238
|
|
||||||
-0.59298172880852417777 -0.62883688293846717876 0.63529252569048322297
|
|
||||||
-0.23401212660553827316 0.99968907080675684096 0.62352531007838618571
|
|
||||||
-0.022738525422734443687 -0.28187083640553783903 0.26251912957434198059
|
|
||||||
-0.070906801822372328425 -1.0015764376469662444 -0.037547713973215775252
|
|
||||||
0.16984928380338290554 0.29681263441972538519 1.0001942725540764467
|
|
||||||
-0.00096016920237236504272 -0.30498393049291638857 0.99831339474842184512
|
|
||||||
-0.17548985600599914525 0.24413321598668535906 0.99756754913900924642
|
|
||||||
1.0018954511699431631 0.35679798137305229755 -0.5509473478020172621
|
|
||||||
0.26419104162646117606 0.48352063689838348237 -1.000660518069827809
|
|
||||||
0.32959235574642675726 1.0019255449294868221 -0.8073580488140883471
|
|
||||||
1.0006863077587373478 0.86521550614707609661 -0.91653268889750783011
|
|
||||||
0.6688405363050808905 0.59860726137798347946 -0.61535724314510731325
|
|
||||||
-0.99842367241411755785 0.54079174977524591128 0.25202350211687651882
|
|
||||||
-0.16600392072175346181 -0.16429481377390922625 -0.66287492629973299163
|
|
||||||
0.059092736489901209751 0.5848843455402575886 -0.60811179652547664443
|
|
||||||
0.11380005322873906759 0.28248721951369937244 -0.20738373893265196757
|
|
||||||
0.32580316951172427764 -0.059319425181216939302 0.29006987515480248119
|
|
||||||
0.28341468258830970761 -0.17461880724609085691 0.6702612037078343743
|
|
||||||
0.65308485876454747121 -0.38539517106802112512 0.63179991451078654219
|
|
||||||
-0.00045871377667885959717 -0.00716097622032262765 -0.027053612176287433755
|
|
||||||
0.32144026415110782402 -0.41316058330044702629 0.4178195906898723444
|
|
||||||
0.65332573049019015965 0.99973574761091521523 -0.020283804552046320879
|
|
||||||
-0.48793610131992815049 0.3394513985116662802 -0.33188376821935383632
|
|
||||||
3 95 19 49
|
|
||||||
3 34 76 128
|
|
||||||
3 128 111 34
|
|
||||||
3 66 13 68
|
|
||||||
3 8 58 84
|
|
||||||
3 18 45 126
|
|
||||||
3 111 89 34
|
|
||||||
3 58 21 24
|
|
||||||
3 24 21 50
|
|
||||||
3 2 106 8
|
|
||||||
3 0 73 40
|
|
||||||
3 100 124 37
|
|
||||||
3 99 6 73
|
|
||||||
3 45 35 126
|
|
||||||
3 55 46 112
|
|
||||||
3 14 1 102
|
|
||||||
3 84 58 24
|
|
||||||
3 70 27 127
|
|
||||||
3 85 52 87
|
|
||||||
3 110 126 16
|
|
||||||
3 124 126 110
|
|
||||||
3 0 51 100
|
|
||||||
3 101 87 70
|
|
||||||
3 70 87 22
|
|
||||||
3 115 113 88
|
|
||||||
3 30 65 63
|
|
||||||
3 91 65 30
|
|
||||||
3 68 2 17
|
|
||||||
3 106 2 68
|
|
||||||
3 1 123 13
|
|
||||||
3 30 121 92
|
|
||||||
3 15 111 128
|
|
||||||
3 95 30 63
|
|
||||||
3 20 29 79
|
|
||||||
3 10 49 116
|
|
||||||
3 10 95 49
|
|
||||||
3 56 11 51
|
|
||||||
3 20 98 29
|
|
||||||
3 98 105 29
|
|
||||||
3 38 37 109
|
|
||||||
3 110 109 37
|
|
||||||
3 45 12 35
|
|
||||||
3 15 115 88
|
|
||||||
3 32 12 45
|
|
||||||
3 32 45 125
|
|
||||||
3 50 130 25
|
|
||||||
3 95 63 19
|
|
||||||
3 129 116 49
|
|
||||||
3 13 41 106
|
|
||||||
3 99 73 9
|
|
||||||
3 41 8 106
|
|
||||||
3 41 42 8
|
|
||||||
3 110 92 109
|
|
||||||
3 16 92 110
|
|
||||||
3 46 32 83
|
|
||||||
3 108 95 10
|
|
||||||
3 127 53 21
|
|
||||||
3 20 90 60
|
|
||||||
3 31 79 114
|
|
||||||
3 6 117 57
|
|
||||||
3 50 129 15
|
|
||||||
3 37 9 100
|
|
||||||
3 46 14 81
|
|
||||||
3 20 61 96
|
|
||||||
3 76 17 2
|
|
||||||
3 8 42 101
|
|
||||||
3 50 21 130
|
|
||||||
3 34 3 17
|
|
||||||
3 30 92 91
|
|
||||||
3 51 11 83
|
|
||||||
3 119 12 32
|
|
||||||
3 99 28 26
|
|
||||||
3 28 99 9
|
|
||||||
3 119 32 81
|
|
||||||
3 20 96 90
|
|
||||||
3 91 93 4
|
|
||||||
3 105 68 17
|
|
||||||
3 46 81 32
|
|
||||||
3 57 27 22
|
|
||||||
3 113 63 78
|
|
||||||
3 63 113 19
|
|
||||||
3 25 129 50
|
|
||||||
3 128 50 15
|
|
||||||
3 90 12 7
|
|
||||||
3 49 19 115
|
|
||||||
3 18 126 124
|
|
||||||
3 35 93 16
|
|
||||||
3 126 35 16
|
|
||||||
3 113 78 88
|
|
||||||
3 17 3 105
|
|
||||||
3 47 11 56
|
|
||||||
3 61 79 31
|
|
||||||
3 83 18 51
|
|
||||||
3 37 28 9
|
|
||||||
3 70 21 58
|
|
||||||
3 70 58 101
|
|
||||||
3 5 55 112
|
|
||||||
3 53 25 130
|
|
||||||
3 87 52 22
|
|
||||||
3 13 5 41
|
|
||||||
3 16 93 92
|
|
||||||
3 8 101 58
|
|
||||||
3 132 65 4
|
|
||||||
3 52 57 22
|
|
||||||
3 22 27 70
|
|
||||||
3 57 73 6
|
|
||||||
3 102 60 7
|
|
||||||
3 102 1 60
|
|
||||||
3 34 17 76
|
|
||||||
3 60 90 7
|
|
||||||
3 91 4 65
|
|
||||||
3 0 100 9
|
|
||||||
3 78 3 89
|
|
||||||
3 24 50 128
|
|
||||||
3 61 31 132
|
|
||||||
3 29 105 3
|
|
||||||
3 52 40 57
|
|
||||||
3 54 53 117
|
|
||||||
3 83 32 125
|
|
||||||
3 87 101 42
|
|
||||||
3 87 42 104
|
|
||||||
3 47 40 52
|
|
||||||
3 47 56 40
|
|
||||||
3 56 51 0
|
|
||||||
3 56 0 40
|
|
||||||
3 57 40 73
|
|
||||||
3 117 27 57
|
|
||||||
3 78 89 88
|
|
||||||
3 1 14 123
|
|
||||||
3 6 54 117
|
|
||||||
3 60 1 66
|
|
||||||
3 61 4 96
|
|
||||||
3 38 95 108
|
|
||||||
3 35 4 93
|
|
||||||
3 96 4 35
|
|
||||||
3 89 3 34
|
|
||||||
3 60 98 20
|
|
||||||
3 60 66 98
|
|
||||||
3 38 108 28
|
|
||||||
3 37 38 28
|
|
||||||
3 41 104 42
|
|
||||||
3 66 1 13
|
|
||||||
3 0 9 73
|
|
||||||
3 2 8 84
|
|
||||||
3 6 99 54
|
|
||||||
3 76 24 128
|
|
||||||
3 117 127 27
|
|
||||||
3 19 113 115
|
|
||||||
3 125 18 83
|
|
||||||
3 53 130 21
|
|
||||||
3 31 78 63
|
|
||||||
3 65 31 63
|
|
||||||
3 114 79 3
|
|
||||||
3 93 91 92
|
|
||||||
3 119 7 12
|
|
||||||
3 141 10 116
|
|
||||||
3 15 49 115
|
|
||||||
3 5 104 41
|
|
||||||
3 55 14 46
|
|
||||||
3 84 24 76
|
|
||||||
3 84 76 2
|
|
||||||
3 123 14 55
|
|
||||||
3 123 5 13
|
|
||||||
3 38 109 121
|
|
||||||
3 46 83 11
|
|
||||||
3 129 49 15
|
|
||||||
3 85 47 52
|
|
||||||
3 88 89 111
|
|
||||||
3 53 26 25
|
|
||||||
3 114 3 78
|
|
||||||
3 28 108 141
|
|
||||||
3 5 85 104
|
|
||||||
3 5 112 85
|
|
||||||
3 79 29 3
|
|
||||||
3 100 51 18
|
|
||||||
3 112 47 85
|
|
||||||
3 112 46 11
|
|
||||||
3 47 112 11
|
|
||||||
3 20 79 61
|
|
||||||
3 31 114 78
|
|
||||||
3 111 15 88
|
|
||||||
3 121 95 38
|
|
||||||
3 12 96 35
|
|
||||||
3 90 96 12
|
|
||||||
3 54 99 26
|
|
||||||
3 104 85 87
|
|
||||||
3 18 124 100
|
|
||||||
3 66 105 98
|
|
||||||
3 66 68 105
|
|
||||||
3 13 106 68
|
|
||||||
3 108 10 141
|
|
||||||
3 70 127 21
|
|
||||||
3 125 45 18
|
|
||||||
3 117 53 127
|
|
||||||
3 61 132 4
|
|
||||||
3 95 121 30
|
|
||||||
3 102 7 119
|
|
||||||
3 14 102 119
|
|
||||||
3 14 119 81
|
|
||||||
3 121 109 92
|
|
||||||
3 53 54 26
|
|
||||||
3 28 141 26
|
|
||||||
3 26 141 25
|
|
||||||
3 25 116 129
|
|
||||||
3 141 116 25
|
|
||||||
3 124 110 37
|
|
||||||
3 5 123 55
|
|
||||||
3 132 31 65
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,74 +0,0 @@
|
||||||
// geometric traits class
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Regular_triangulation_filtered_traits_3.h>
|
|
||||||
|
|
||||||
// triangulation
|
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
|
||||||
|
|
||||||
// vertex
|
|
||||||
#include <CGAL/Surface_mesh_vertex_base_3.h>
|
|
||||||
|
|
||||||
// cell
|
|
||||||
#include <CGAL/Multilabel_mesh_cell_base_3.h>
|
|
||||||
|
|
||||||
// c2t3
|
|
||||||
#include <CGAL/Surface_mesh_complex_2_in_triangulation_3.h>
|
|
||||||
|
|
||||||
// indexed 3D image
|
|
||||||
#include <CGAL/Labeled_image_3.h>
|
|
||||||
#include <CGAL/Labeled_image_volume_mesh_traits_3.h>
|
|
||||||
|
|
||||||
// meshing criteria
|
|
||||||
#include <CGAL/Surface_mesh_default_criteria_3.h>
|
|
||||||
#include <CGAL/Volume_mesh_default_criteria_3.h>
|
|
||||||
|
|
||||||
// meshing function
|
|
||||||
#include <CGAL/make_mesh_3_for_multivolumes.h>
|
|
||||||
|
|
||||||
// output
|
|
||||||
#include <CGAL/IO/File_medit.h>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
typedef CGAL::Regular_triangulation_filtered_traits_3<K> Traits;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesh_vertex_base_3<Traits> Vb;
|
|
||||||
typedef CGAL::Multilabel_mesh_cell_base_3<Traits, unsigned char> Cb;
|
|
||||||
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
|
|
||||||
typedef CGAL::Regular_triangulation_3<Traits, Tds> Tr;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<Tr> C2t3;
|
|
||||||
|
|
||||||
typedef CGAL::Labeled_image_3<unsigned char> Image_3;
|
|
||||||
typedef CGAL::Labeled_image_volume_mesh_traits_3<Image_3,Traits> Mesh_traits;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesh_default_criteria_3<Tr> Facets_criteria;
|
|
||||||
typedef CGAL::Volume_mesh_default_criteria_3<Tr> Tets_criteria;
|
|
||||||
|
|
||||||
int main(int, char **) {
|
|
||||||
Tr tr; // 3D Delaunay triangulation
|
|
||||||
C2t3 c2t3(tr); // 2D complex in 3D-Delaunay triangulation
|
|
||||||
|
|
||||||
// Loads image
|
|
||||||
Image_3 image("segmented_head.inr.gz");
|
|
||||||
Mesh_traits mesh_traits(image);
|
|
||||||
|
|
||||||
Facets_criteria facets_criteria(30, // angle upper bound,
|
|
||||||
5, // uniform radius upper bound,
|
|
||||||
1); // distance bound
|
|
||||||
|
|
||||||
Tets_criteria tets_criteria(4, // radius-edge ratio upper bound
|
|
||||||
5); // uniform radius bound
|
|
||||||
|
|
||||||
CGAL::make_mesh_3_for_multivolumes(c2t3,
|
|
||||||
mesh_traits,
|
|
||||||
facets_criteria,
|
|
||||||
tets_criteria,
|
|
||||||
0.5); // radius-radius ratio upper
|
|
||||||
// bound for the sliver
|
|
||||||
// exudation process
|
|
||||||
|
|
||||||
std::ofstream medit_file("out.mesh");
|
|
||||||
CGAL::output_to_medit_file(medit_file, c2t3);
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
// geometric traits class
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Robust_circumcenter_traits_3.h>
|
|
||||||
|
|
||||||
// triangulation
|
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
|
||||||
|
|
||||||
// vertex
|
|
||||||
#include <CGAL/PSC_mesh_vertex_base_3.h>
|
|
||||||
|
|
||||||
// cell
|
|
||||||
#include <CGAL/Volume_mesh_cell_base_3.h>
|
|
||||||
|
|
||||||
// c2t3
|
|
||||||
#include <CGAL/Surface_mesh_complex_2_in_triangulation_3.h>
|
|
||||||
|
|
||||||
// indexed 3D image
|
|
||||||
// PSC
|
|
||||||
#include <CGAL/Polyhedron_3.h>
|
|
||||||
#include <CGAL/Volume_bounded_by_polyhedron_mesh_traits_3.h>
|
|
||||||
|
|
||||||
// meshing criteria
|
|
||||||
#include <CGAL/PSC_mesh_default_edges_criteria_3.h>
|
|
||||||
#include <CGAL/PSC_mesh_default_facets_criteria_3.h>
|
|
||||||
#include <CGAL/PSC_mesh_default_cells_criteria_3.h>
|
|
||||||
|
|
||||||
// meshing function
|
|
||||||
#include <CGAL/make_mesh_3_from_piecewise_smooth_surfaces.h>
|
|
||||||
|
|
||||||
// input/output
|
|
||||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
|
||||||
#include <CGAL/IO/File_medit.h>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
|
|
||||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
typedef CGAL::Regular_triangulation_filtered_traits_3<K> Regular_traits;
|
|
||||||
typedef CGAL::Robust_circumcenter_traits_3<Regular_traits> Traits;
|
|
||||||
|
|
||||||
typedef CGAL::PSC_mesh_vertex_base_3<Traits> Vb;
|
|
||||||
typedef CGAL::Volume_mesh_cell_base_3<Traits> Cb;
|
|
||||||
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
|
|
||||||
typedef CGAL::Regular_triangulation_3<Traits, Tds> Tr;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<Tr> C2t3;
|
|
||||||
|
|
||||||
typedef CGAL::Polyhedron_3<Traits> Polyhedron;
|
|
||||||
typedef CGAL::Volume_bounded_by_polyhedron_mesh_traits_3<Polyhedron> Mesh_traits;
|
|
||||||
|
|
||||||
typedef CGAL::PSC_mesh_default_edges_criteria_3<Tr> Edges_criteria;
|
|
||||||
typedef CGAL::PSC_mesh_default_facets_criteria_3<Tr> Facets_criteria;
|
|
||||||
typedef CGAL::PSC_mesh_default_tetrahedra_criteria_3<Tr> Tets_criteria;
|
|
||||||
|
|
||||||
int main(int, char **) {
|
|
||||||
Tr tr; // 3D Delaunay triangulation
|
|
||||||
C2t3 c2t3(tr); // 2D complex in 3D-Delaunay triangulation
|
|
||||||
|
|
||||||
Polyhedron polyhedron;
|
|
||||||
std::ifstream input("input.off");
|
|
||||||
|
|
||||||
|
|
||||||
Edges_criteria edges_criteria(5, // uniform radius upper bound,
|
|
||||||
1); // distance bound
|
|
||||||
|
|
||||||
Facets_criteria facets_criteria(30, // angle upper bound,
|
|
||||||
5, // uniform radius upper bound,
|
|
||||||
1); // distance bound
|
|
||||||
|
|
||||||
Tets_criteria tets_criteria(4, // radius-edge ratio upper bound
|
|
||||||
5); // uniform radius bound
|
|
||||||
|
|
||||||
CGAL::make_mesh_3_from_piecewise_smooth_surfaces(c2t3,
|
|
||||||
mesh_traits,
|
|
||||||
edges_criteria,
|
|
||||||
facets_criteria,
|
|
||||||
tets_criteria,
|
|
||||||
0.5);
|
|
||||||
// 0.5 is radius-radius ratio upper bound for the sliver exudation
|
|
||||||
// process
|
|
||||||
|
|
||||||
std::ofstream file_medit("out.mesh");
|
|
||||||
CGAL::output_to_medit_file(file_medit, c2t3);
|
|
||||||
}
|
|
||||||
|
|
@ -1,166 +0,0 @@
|
||||||
// Copyright (c) 2006 INRIA Sophia-Antipolis (France).
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// Author(s) : Laurent Rineau
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include "parameters.h"
|
|
||||||
#include "implicit_functions.h"
|
|
||||||
|
|
||||||
String_options string_options;
|
|
||||||
Double_options double_options;
|
|
||||||
Implicit_function_map functions;
|
|
||||||
Check_strings check_strings;
|
|
||||||
|
|
||||||
Usage* usage_ptr = 0;
|
|
||||||
|
|
||||||
/** debugging function, auxiliary function for init_check_strings() */
|
|
||||||
template <class Map>
|
|
||||||
void init_check_strings_aux(const Map& map)
|
|
||||||
{
|
|
||||||
for(typename Map::const_iterator it = map.begin();
|
|
||||||
it != map.end();
|
|
||||||
++it)
|
|
||||||
{
|
|
||||||
Check_strings::const_iterator chk_it = check_strings.find(it->first);
|
|
||||||
if( chk_it != check_strings.end() )
|
|
||||||
std::cerr << "Warning: duplicate option --" << it->first << "\n";
|
|
||||||
else
|
|
||||||
check_strings.insert(it->first); // TODO: can be improved with lower_bound()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Debugging function.
|
|
||||||
Check that no option is used twice.
|
|
||||||
*/
|
|
||||||
void init_check_strings()
|
|
||||||
{
|
|
||||||
init_check_strings_aux(string_options);
|
|
||||||
init_check_strings_aux(double_options);
|
|
||||||
init_check_strings_aux(functions);
|
|
||||||
}
|
|
||||||
|
|
||||||
void check_all_options_have_been_used()
|
|
||||||
{
|
|
||||||
for(Check_strings::const_iterator it = check_strings.begin();
|
|
||||||
it!= check_strings.end();
|
|
||||||
++it)
|
|
||||||
if(functions.find(*it) == functions.end())
|
|
||||||
std::cerr << "Warning: option --" << *it << " was not used.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
void init_string_options()
|
|
||||||
{
|
|
||||||
string_options["dump_of_initial_points"] = "";
|
|
||||||
string_options["read_initial_points"] = "";
|
|
||||||
string_options["inrimage"] = "";
|
|
||||||
|
|
||||||
string_options["initial_surface_off"] = "";
|
|
||||||
|
|
||||||
string_options["cgal_mesh_before_exudation"] = "";
|
|
||||||
|
|
||||||
string_options["mesh_after_filename"] = "";
|
|
||||||
string_options["cgal_mesh_after_filename"] = "";
|
|
||||||
|
|
||||||
string_options["slivers_off"] = "";
|
|
||||||
|
|
||||||
string_options["surface_mesh"] = "";
|
|
||||||
string_options["surface_off"] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
void init_double_options()
|
|
||||||
{
|
|
||||||
double_options["r"] = 0;
|
|
||||||
double_options["special"] = 0.;
|
|
||||||
double_options["distance_bound"] = 1000000000000000.;
|
|
||||||
|
|
||||||
// bound on radius of surface Delaunay balls
|
|
||||||
double_options["radius_bound"] = 10000000000000.;
|
|
||||||
|
|
||||||
// bound on the radius of circumspheres
|
|
||||||
double_options["tets_radius_bound"] = 100000000000000.;
|
|
||||||
double_options["angle_bound"] = 30.; // in degrees
|
|
||||||
double_options["tets_aspect_ratio_bound"] = 0.;
|
|
||||||
double_options["enclosing_sphere_radius"] = 6.;
|
|
||||||
double_options["precision"] = 1e-6;
|
|
||||||
double_options["center_x"] = 0.0;
|
|
||||||
double_options["center_y"] = 0.0;
|
|
||||||
double_options["center_z"] = 0.0;
|
|
||||||
double_options["number_of_initial_points"] = 20;
|
|
||||||
double_options["pumping_bound"] = 0;
|
|
||||||
double_options["sliver_test"] = 0.15;
|
|
||||||
double_options["iso_value"] = 0.;
|
|
||||||
|
|
||||||
double_options["edges_radius_bound"] = 0.;
|
|
||||||
double_options["edges_distance_bound"] = 0.;
|
|
||||||
double_options["sharp_edge_cosine_bound"] = 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
void init_functions()
|
|
||||||
{
|
|
||||||
functions["chair"] = &chair_function;
|
|
||||||
functions["ellipsoid"] = &ellipsoid_function;
|
|
||||||
functions["false_knot"] = &false_knot_function;
|
|
||||||
functions["heart"] = &heart_function;
|
|
||||||
functions["klein"] = &klein_function;
|
|
||||||
functions["knot1"] = &knot1_function;
|
|
||||||
functions["knot2"] = &knot2_function;
|
|
||||||
functions["knot3"] = &knot3_function;
|
|
||||||
functions["octic"] = &octic_function;
|
|
||||||
functions["ring"] = &ring_function;
|
|
||||||
functions["sphere"] = &sphere_function;
|
|
||||||
functions["tanglecube"] = &tanglecube_function;
|
|
||||||
functions["torus"] = &torus_function;
|
|
||||||
functions["cube"] = &cube_function;
|
|
||||||
}
|
|
||||||
|
|
||||||
void init_parameters()
|
|
||||||
{
|
|
||||||
init_string_options();
|
|
||||||
init_double_options();
|
|
||||||
init_functions();
|
|
||||||
|
|
||||||
init_check_strings(); // for debugging
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Map>
|
|
||||||
typename Map::mapped_type
|
|
||||||
get_option(const Map& map, const std::string& s)
|
|
||||||
{
|
|
||||||
typename Map::const_iterator it = map.find(s);
|
|
||||||
if( it == map.end() )
|
|
||||||
{
|
|
||||||
std::cerr << "Error: invalid option \"--" << s << "\"\n";
|
|
||||||
if( usage_ptr ) usage_ptr("");
|
|
||||||
return typename Map::mapped_type();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
check_strings.erase(s);
|
|
||||||
return it->second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string get_string_option(const std::string s)
|
|
||||||
{
|
|
||||||
return get_option(string_options, s);
|
|
||||||
}
|
|
||||||
|
|
||||||
double get_double_option(std::string s)
|
|
||||||
{
|
|
||||||
return get_option(double_options, s);
|
|
||||||
}
|
|
||||||
|
|
||||||
Implicit_function* get_function(std::string s)
|
|
||||||
{
|
|
||||||
return get_option(functions, s);
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
#include <map>
|
|
||||||
#include <set>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
// type "pointer to implicit function"
|
|
||||||
typedef double (Implicit_function) (double, double, double);
|
|
||||||
|
|
||||||
typedef std::map<std::string, double> Double_options;
|
|
||||||
typedef std::map<std::string, Implicit_function*> Implicit_function_map;
|
|
||||||
typedef std::map<std::string, std::string> String_options;
|
|
||||||
typedef std::set<std::string> Check_strings;
|
|
||||||
|
|
||||||
extern String_options string_options;
|
|
||||||
extern Double_options double_options;
|
|
||||||
extern Implicit_function_map functions;
|
|
||||||
extern Check_strings check_strings;
|
|
||||||
|
|
||||||
typedef void (Usage)(std::string = "");
|
|
||||||
extern Usage* usage_ptr;
|
|
||||||
|
|
||||||
void init_parameters();
|
|
||||||
|
|
||||||
#ifdef CGAL_SURFACE_MESHER_TEST_OPTIONS
|
|
||||||
void check_all_options_have_been_used(); // debug function
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::string get_string_option(std::string);
|
|
||||||
|
|
||||||
double get_double_option(std::string);
|
|
||||||
|
|
||||||
Implicit_function* get_function(std::string);
|
|
||||||
|
|
@ -1,602 +0,0 @@
|
||||||
#include "debug.h"
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
|
|
||||||
#include <CGAL/Robust_circumcenter_traits_3.h>
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
# include <CGAL/Regular_triangulation_3.h>
|
|
||||||
# include <CGAL/Regular_triangulation_cell_base_3.h>
|
|
||||||
#else
|
|
||||||
# include <CGAL/Delaunay_triangulation_3.h>
|
|
||||||
# include <CGAL/Triangulation_cell_base_3.h>
|
|
||||||
#endif
|
|
||||||
#include <CGAL/Triangulation_cell_base_with_circumcenter_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/IO.h>
|
|
||||||
|
|
||||||
#include <CGAL/make_surface_mesh.h>
|
|
||||||
#include <CGAL/Polyhedral_surface_3.h>
|
|
||||||
#include <CGAL/Surface_mesher/Has_edges.h>
|
|
||||||
|
|
||||||
#include <CGAL/Volume_mesher_cell_base_3.h>
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
# include <CGAL/Regular_triangulation_euclidean_traits_3.h>
|
|
||||||
# include <CGAL/Regular_triangulation_filtered_traits_3.h>
|
|
||||||
#endif
|
|
||||||
#include <CGAL/Polyhedral_surface_mesher_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Surface_mesher/Standard_criteria.h>
|
|
||||||
#include <CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h>
|
|
||||||
#include <CGAL/Surface_mesh_default_edges_criteria_3.h>
|
|
||||||
#include <CGAL/Mesh_3/Slivers_exuder.h>
|
|
||||||
|
|
||||||
#define CGAL_C2T3_USE_POLYHEDRON
|
|
||||||
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
|
|
||||||
#include <CGAL/IO/File_medit.h>
|
|
||||||
|
|
||||||
// #include <CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_criteria_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Point_traits.h>
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
// # include <CGAL/Weighted_point_with_surface_index_geom_traits.h>
|
|
||||||
# include <CGAL/Weighted_point_with_psc_localisation.h>
|
|
||||||
#else
|
|
||||||
// # include <CGAL/Point_with_surface_index_geom_traits.h>
|
|
||||||
# include <CGAL/Point_with_psc_localisation.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "parameters.h"
|
|
||||||
|
|
||||||
#include <CGAL/Timer.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
#include <boost/tuple/tuple.hpp> // boost::tie
|
|
||||||
|
|
||||||
using boost::tie;
|
|
||||||
|
|
||||||
/////////////// Types ///////////////
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_USE_EXACT
|
|
||||||
struct K : public CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt {};
|
|
||||||
#else
|
|
||||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
typedef CGAL::Regular_triangulation_filtered_traits_3<K> Regular_traits;
|
|
||||||
struct My_traits1 : public Regular_traits
|
|
||||||
{
|
|
||||||
typedef CGAL::Weighted_point_with_psc_localisation<Regular_traits::Point_3> Weighted_point_3;
|
|
||||||
// typedef CGAL::Point_with_psc_localisation<My_traits1::Weighted_point_3> Weighted_point_3;
|
|
||||||
typedef Weighted_point_3 Point_3;
|
|
||||||
};
|
|
||||||
// typedef CGAL::Weighted_point_with_surface_index_geom_traits<My_traits1> My_traits2;
|
|
||||||
typedef My_traits1 My_traits2;
|
|
||||||
#ifndef CGAL_MESH_3_USE_EXACT
|
|
||||||
typedef CGAL::Robust_weighted_circumcenter_traits_3<My_traits2> My_traits;
|
|
||||||
#else
|
|
||||||
typedef My_traits2 My_traits;
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifndef CGAL_MESH_3_USE_EXACT
|
|
||||||
typedef CGAL::Robust_circumcenter_traits_3<K> Traits;
|
|
||||||
#else
|
|
||||||
typedef K Traits;
|
|
||||||
#endif
|
|
||||||
// typedef CGAL::Point_with_surface_index_geom_traits<Traits> My_traits1;
|
|
||||||
typedef Traits My_traits1;
|
|
||||||
struct My_traits : public My_traits1
|
|
||||||
{
|
|
||||||
typedef CGAL::Point_with_psc_localisation<My_traits::Point_3> Point_3;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_vertex_base_3<My_traits> Vb;
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
typedef CGAL::Regular_triangulation_cell_base_3<My_traits> Cb1;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Triangulation_cell_base_3<My_traits> Cb1;
|
|
||||||
#endif
|
|
||||||
typedef CGAL::Surface_mesh_cell_base_3<My_traits, Cb1> Cb2;
|
|
||||||
typedef CGAL::Volume_mesher_cell_base_3<My_traits, Cb2> Cb;
|
|
||||||
typedef CGAL::Triangulation_cell_base_with_circumcenter_3<My_traits,
|
|
||||||
Cb> Cb_with_circumcenter;
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb, Cb_with_circumcenter> Tds;
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
typedef CGAL::Regular_triangulation_3<My_traits, Tds> Tr;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Delaunay_triangulation_3<My_traits, Tds> Tr;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef My_traits::Point_3 Point_3;
|
|
||||||
typedef My_traits::Sphere_3 Sphere_3;
|
|
||||||
typedef My_traits::FT FT;
|
|
||||||
|
|
||||||
typedef CGAL::Polyhedral_surface_3<My_traits,
|
|
||||||
#ifdef CGAL_MESH_3_SURFACE_WITHOUT_EDGES
|
|
||||||
CGAL::Surface_mesher::Has_no_edges
|
|
||||||
#else
|
|
||||||
CGAL::Surface_mesher::Has_edges
|
|
||||||
#endif
|
|
||||||
> Surface;
|
|
||||||
|
|
||||||
|
|
||||||
// typedef CGAL::Triangulation_vertex_base_3<K> Del_Vb;
|
|
||||||
// typedef CGAL::Triangulation_cell_base_3<K> Del_Cb1;
|
|
||||||
// typedef CGAL::Mesh_3::Complex_2_in_triangulation_cell_base_3<K, Del_Cb1> Del_Cb;
|
|
||||||
// typedef CGAL::Triangulation_data_structure_3<Del_Vb, Del_Cb> Del_Tds;
|
|
||||||
// typedef CGAL::Delaunay_triangulation_3<K, Del_Tds> Del_tr;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesh_default_edges_criteria_3<Tr, Surface> Edges_criteria;
|
|
||||||
typedef CGAL::Surface_mesher::Refine_criterion<Tr> Criterion;
|
|
||||||
typedef CGAL::Surface_mesher::Standard_criteria <Criterion > Criteria;
|
|
||||||
typedef CGAL::Mesh_criteria_3<Tr> Tets_criteria;
|
|
||||||
|
|
||||||
struct Edge_info {
|
|
||||||
bool is_cached;
|
|
||||||
Point_3 lineic_center;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_3<Tr, Edge_info> C2t3;
|
|
||||||
|
|
||||||
// typedef CGAL::Surface_mesher::Point_surface_indices_visitor Volume_mesher_traits_visitor;
|
|
||||||
|
|
||||||
// #ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
// typedef Regular_traits::Point_3 Kernel_point_3;
|
|
||||||
// #else
|
|
||||||
// typedef Traits::Point_3 Kernel_point_3;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
#ifndef CGAL_MESH_3_MESH_THE_WHOLE_BBOX
|
|
||||||
#define CGAL_MESH_3_MESH_THE_WHOLE_BBOX false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesher::Polyhedral_oracle<
|
|
||||||
Surface,
|
|
||||||
CGAL::Creator_uniform_3<My_traits::FT, Point_3>,
|
|
||||||
CGAL::Surface_mesher::Null_oracle_visitor,
|
|
||||||
// Volume_mesher_traits_visitor,
|
|
||||||
Surface::Has_edges_tag,
|
|
||||||
CGAL_MESH_3_MESH_THE_WHOLE_BBOX
|
|
||||||
> Volume_mesh_traits;
|
|
||||||
|
|
||||||
typedef Volume_mesh_traits::Construct_initial_points Initial_points;
|
|
||||||
|
|
||||||
typedef CGAL::Polyhedral_surfaces_mesher_3<
|
|
||||||
C2t3,
|
|
||||||
Surface,
|
|
||||||
Edges_criteria,
|
|
||||||
Criteria,
|
|
||||||
Tets_criteria,
|
|
||||||
Volume_mesh_traits,
|
|
||||||
#ifdef CGAL_SURFACE_MESHER_VERBOSE
|
|
||||||
CGAL::Surface_mesher::VERBOSE
|
|
||||||
#else
|
|
||||||
CGAL::Surface_mesher::NOT_VERBOSE
|
|
||||||
#endif
|
|
||||||
> Mesher;
|
|
||||||
|
|
||||||
typedef CGAL::Simple_cartesian<double> Simple_kernel;
|
|
||||||
typedef Simple_kernel::Iso_rectangle_2 Rectangle_2;
|
|
||||||
typedef Simple_kernel::Segment_2 Segment_2;
|
|
||||||
typedef Simple_kernel::Point_2 Point_2;
|
|
||||||
|
|
||||||
typedef CGAL::Point_traits<Point_3> Point_traits;
|
|
||||||
typedef Point_traits::Bare_point Bare_point_3;
|
|
||||||
/// Global variables
|
|
||||||
std::ostream *out = 0;
|
|
||||||
std::string filename = std::string();
|
|
||||||
std::string function_name = "sphere";
|
|
||||||
char* argv0 = "";
|
|
||||||
|
|
||||||
void usage(std::string error = "")
|
|
||||||
{
|
|
||||||
if( error != "" )
|
|
||||||
std:: cerr << "Error: " << error << std::endl;
|
|
||||||
std::cerr << "Usage:\n "
|
|
||||||
<< argv0
|
|
||||||
<< " [-f function_name]"
|
|
||||||
<< " [output_file.mesh|-]\n"
|
|
||||||
<< "If output_file.mesh is '-', outputs to standard out.\n"
|
|
||||||
<< "-f define the implicite function to use\n";
|
|
||||||
for(String_options::iterator it = string_options.begin();
|
|
||||||
it != string_options.end();
|
|
||||||
++it)
|
|
||||||
std::cerr << "--" << it->first << " default value is \""
|
|
||||||
<< it->second << "\".\n";
|
|
||||||
for(Double_options::iterator it = double_options.begin();
|
|
||||||
it != double_options.end();
|
|
||||||
++it)
|
|
||||||
std::cerr << "--" << it->first << " default value is "
|
|
||||||
<< it->second << ".\n";
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::pair<std::ostream*, const bool>
|
|
||||||
open_file_for_writing(std::string filename,
|
|
||||||
std::string display_string = "Writing to ")
|
|
||||||
{
|
|
||||||
if( filename != "")
|
|
||||||
{
|
|
||||||
if( filename == "-" )
|
|
||||||
{
|
|
||||||
std::cerr << display_string << "standard out...\n";
|
|
||||||
return std::make_pair(&std::cout, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::ofstream* result = new std::ofstream(filename.c_str());
|
|
||||||
if( *result )
|
|
||||||
{
|
|
||||||
std::cerr << display_string << "file " << filename << "...\n";
|
|
||||||
return std::make_pair(result, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
delete result;
|
|
||||||
std::cerr << "Error: cannot create " << filename << "\n";
|
|
||||||
usage();
|
|
||||||
return std::pair<std::ostream*, bool>(0, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return std::pair<std::ostream*, bool>(0, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void parse_argv(int argc, char** argv, int extra_args = 0)
|
|
||||||
{
|
|
||||||
if (argc >=(2 + extra_args))
|
|
||||||
{
|
|
||||||
std::string arg = argv[1+extra_args];
|
|
||||||
if( arg == "-h" || arg == "--help")
|
|
||||||
usage();
|
|
||||||
else if( arg == "-f" )
|
|
||||||
{
|
|
||||||
if( argc < (3 + extra_args) )
|
|
||||||
usage("-f must be followed by a function name!");
|
|
||||||
function_name = argv[2 + extra_args];
|
|
||||||
parse_argv(argc, argv, extra_args + 2);
|
|
||||||
}
|
|
||||||
else if( arg.substr(0, 2) == "--" )
|
|
||||||
{
|
|
||||||
Double_options::iterator opt_it =
|
|
||||||
double_options.find(arg.substr(2, arg.length()-2));
|
|
||||||
if( opt_it != double_options.end() )
|
|
||||||
{
|
|
||||||
if( argc < (3 + extra_args) )
|
|
||||||
usage((arg + " must be followed by a double!").c_str());
|
|
||||||
std::stringstream s;
|
|
||||||
double val;
|
|
||||||
s << argv[extra_args + 2];
|
|
||||||
s >> val;
|
|
||||||
if( !s )
|
|
||||||
usage(("Bad double after " + arg + "!").c_str());
|
|
||||||
opt_it->second = val;
|
|
||||||
parse_argv(argc, argv, extra_args + 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
String_options::iterator opt_it =
|
|
||||||
string_options.find(arg.substr(2, arg.length()-2));
|
|
||||||
if( opt_it != string_options.end() )
|
|
||||||
{
|
|
||||||
if( argc < (3 + extra_args) )
|
|
||||||
usage((arg + " must be followed by a string!").c_str());
|
|
||||||
std::string s = argv[extra_args + 2];
|
|
||||||
opt_it->second = s;
|
|
||||||
parse_argv(argc, argv, extra_args + 2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
usage(("Invalid option " + arg).c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
filename = argv[1+extra_args];
|
|
||||||
parse_argv(argc, argv, extra_args + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
struct Get_cell_label {
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template <typename Cell_handle>
|
|
||||||
int
|
|
||||||
get(Get_cell_label,
|
|
||||||
Cell_handle)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class Vertex_map>
|
|
||||||
struct Facet_index_property_map {
|
|
||||||
Vertex_map vmap;
|
|
||||||
public:
|
|
||||||
Facet_index_property_map(const Vertex_map& vmap)
|
|
||||||
: vmap(vmap)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
const Vertex_map& vertex_map() const
|
|
||||||
{
|
|
||||||
return vmap;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename Vertex_map, typename Face_handle>
|
|
||||||
int get(Facet_index_property_map<Vertex_map> fmap, Face_handle fh)
|
|
||||||
{
|
|
||||||
int surface_index = 0;
|
|
||||||
for (int i=0; i<4; i++)
|
|
||||||
if (i != fh->second)
|
|
||||||
surface_index = get(fmap.vertex_map(), fh->first->vertex(i));
|
|
||||||
return surface_index;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Vertex_index_pmap {
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename Vertex_handle>
|
|
||||||
int get(Vertex_index_pmap, Vertex_handle vh)
|
|
||||||
{
|
|
||||||
return vh->point().element_index();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // end anonymous namespace
|
|
||||||
|
|
||||||
/////////////// Main function ///////////////
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
argv0 = argv[0];
|
|
||||||
|
|
||||||
usage_ptr = &usage;
|
|
||||||
|
|
||||||
init_parameters();
|
|
||||||
|
|
||||||
parse_argv(argc, argv);
|
|
||||||
|
|
||||||
if( function_name == "" )
|
|
||||||
usage("Empty input file name");
|
|
||||||
|
|
||||||
std::ifstream surface_ifs(function_name.c_str());
|
|
||||||
Surface surface(surface_ifs);
|
|
||||||
surface_ifs.close();
|
|
||||||
|
|
||||||
std::cerr << "Surface bounding box: " << surface.bbox() << "\n";
|
|
||||||
|
|
||||||
// 2D-complex in 3D-Delaunay triangulation
|
|
||||||
Tr tr;
|
|
||||||
C2t3 c2t3(tr);
|
|
||||||
|
|
||||||
CGAL::Timer timer;
|
|
||||||
|
|
||||||
bool need_delete = false;
|
|
||||||
std::ostream* out = 0;
|
|
||||||
|
|
||||||
// Create the volume_mesh_traits by hand, to pass it
|
|
||||||
// Point_surface_indices_visitor(1), that is a visitor for oracles that
|
|
||||||
// sets surface_index() to a given integer.
|
|
||||||
Volume_mesh_traits volume_mesh_traits;
|
|
||||||
// Volume_mesh_traits volume_mesh_traits(Volume_mesher_traits_visitor(1));
|
|
||||||
|
|
||||||
// Initial point sample
|
|
||||||
std::string read_initial_points = get_string_option("read_initial_points");
|
|
||||||
if( read_initial_points != "")
|
|
||||||
{
|
|
||||||
std::ifstream in( read_initial_points.c_str() );
|
|
||||||
int n;
|
|
||||||
in >> n;
|
|
||||||
CGAL_assertion(in);
|
|
||||||
while( !in.eof() )
|
|
||||||
{
|
|
||||||
Point_3 p;
|
|
||||||
if(in >> p)
|
|
||||||
{
|
|
||||||
tr.insert(p);
|
|
||||||
--n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CGAL_assertion( n == 0 );
|
|
||||||
double_options["number_of_initial_points"] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const int number_of_initial_points =
|
|
||||||
static_cast<int>(get_double_option("number_of_initial_points"));
|
|
||||||
|
|
||||||
std::vector<Point_3> initial_point_sample;
|
|
||||||
initial_point_sample.reserve(number_of_initial_points);
|
|
||||||
|
|
||||||
Initial_points get_initial_points =
|
|
||||||
volume_mesh_traits.construct_initial_points_object();
|
|
||||||
|
|
||||||
get_initial_points(surface,
|
|
||||||
std::back_inserter(initial_point_sample),
|
|
||||||
number_of_initial_points);
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("dump_of_initial_points"),
|
|
||||||
"Writing initial points to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
*out << initial_point_sample.size() << "\n";
|
|
||||||
for(std::vector<Point_3>::const_iterator it =
|
|
||||||
initial_point_sample.begin();
|
|
||||||
it != initial_point_sample.end();
|
|
||||||
++it)
|
|
||||||
*out << *it <<"\n";
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
tr.insert (initial_point_sample.begin(), initial_point_sample.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Meshing criteria
|
|
||||||
CGAL::Surface_mesher::Curvature_size_criterion<Tr>
|
|
||||||
curvature_size_criterion (get_double_option("distance_bound"));
|
|
||||||
CGAL::Surface_mesher::Uniform_size_criterion<Tr>
|
|
||||||
uniform_size_criterion (get_double_option("radius_bound"));
|
|
||||||
CGAL::Surface_mesher::Aspect_ratio_criterion<Tr>
|
|
||||||
aspect_ratio_criterion (get_double_option("angle_bound"));
|
|
||||||
CGAL::Surface_mesher::Vertices_on_the_same_psc_element_criterion<Tr, Surface>
|
|
||||||
vertices_on_the_same_psc_element_criterion(surface);
|
|
||||||
|
|
||||||
std::vector<Criterion*> criterion_vector;
|
|
||||||
criterion_vector.push_back(&aspect_ratio_criterion);
|
|
||||||
criterion_vector.push_back(&uniform_size_criterion);
|
|
||||||
criterion_vector.push_back(&curvature_size_criterion);
|
|
||||||
// criterion_vector.push_back(&vertices_on_the_same_psc_element_criterion);
|
|
||||||
Criteria criteria (criterion_vector);
|
|
||||||
|
|
||||||
Edges_criteria edges_criteria(get_double_option("edges_radius_bound"),
|
|
||||||
get_double_option("edges_distance_bound"),
|
|
||||||
surface,
|
|
||||||
true);
|
|
||||||
|
|
||||||
Tets_criteria tets_criteria(get_double_option("tets_aspect_ratio_bound"),
|
|
||||||
get_double_option("tets_radius_bound"));
|
|
||||||
|
|
||||||
std::cerr << "\nInitial number of points: " << tr.number_of_vertices()
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
// Surface meshing
|
|
||||||
|
|
||||||
Mesher mesher (c2t3, surface, edges_criteria,
|
|
||||||
criteria, tets_criteria, volume_mesh_traits);
|
|
||||||
timer.start();
|
|
||||||
mesher.refine_surface();
|
|
||||||
timer.stop();
|
|
||||||
std::cerr << "\nNumber of points after refine_surface(): "
|
|
||||||
<< tr.number_of_vertices() << std::endl
|
|
||||||
<< "Elapsed time: " << timer.time() << std::endl;
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("initial_surface_off"),
|
|
||||||
"Writing initial surface off to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_surface_facets_to_off(*out, c2t3);
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
timer.start();
|
|
||||||
mesher.refine_mesh();
|
|
||||||
timer.stop();
|
|
||||||
|
|
||||||
std::cout.flush();
|
|
||||||
|
|
||||||
std::cerr << "\nFinal number of points: " << tr.number_of_vertices()
|
|
||||||
<< std::endl
|
|
||||||
<< "Total time: " << timer.time() << std::endl;
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(filename,
|
|
||||||
"Writing medit mesh before exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_to_medit(*out, mesher.complex_2_in_triangulation_3(),
|
|
||||||
Vertex_index_pmap(),
|
|
||||||
Facet_index_property_map<Vertex_index_pmap>(Vertex_index_pmap()),
|
|
||||||
Get_cell_label());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("cgal_mesh_before_exudation"),
|
|
||||||
"Writing cgal mesh before exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::set_binary_mode(*out);
|
|
||||||
CGAL::Mesh_3::output_mesh(*out, mesher.complex_2_in_triangulation_3());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
CGAL::Mesh_3::Slivers_exuder<C2t3> exuder(tr);
|
|
||||||
exuder.pump_vertices(get_double_option("pumping_bound"));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("cgal_mesh_after_filename"),
|
|
||||||
"Writing cgal mesh after exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::set_binary_mode(*out);
|
|
||||||
CGAL::Mesh_3::output_mesh(*out, mesher.complex_2_in_triangulation_3());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("mesh_after_filename"),
|
|
||||||
"Writing medit mesh after exudation to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_to_medit(*out, mesher.complex_2_in_triangulation_3(),
|
|
||||||
Vertex_index_pmap(),
|
|
||||||
Facet_index_property_map<Vertex_index_pmap>(Vertex_index_pmap()),
|
|
||||||
Get_cell_label());
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("surface_off"),
|
|
||||||
"Writing finale surface off to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_surface_facets_to_off(*out, c2t3);
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
// std::string dump_final_surface_filename = get_string_option("surface_ghs");
|
|
||||||
// if( dump_final_surface_filename != "" )
|
|
||||||
// {
|
|
||||||
// std::ofstream dump_points((dump_final_surface_filename +
|
|
||||||
// ".points").c_str());
|
|
||||||
// std::ofstream dump_faces((dump_final_surface_filename +
|
|
||||||
// ".faces").c_str());
|
|
||||||
// if( dump_points && dump_faces ) {
|
|
||||||
// std::cerr << "Writing final surface to ghs file "
|
|
||||||
// << dump_final_surface_filename << "..." << std::endl;
|
|
||||||
// output_surface_facets_to_ghs(dump_points, dump_faces, tr);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// usage(("Error: cannot create " +
|
|
||||||
// dump_final_surface_filename).c_str());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
#ifdef CGAL_MESH_3_USE_REGULAR
|
|
||||||
tie(out, need_delete) =
|
|
||||||
open_file_for_writing(get_string_option("slivers_off"),
|
|
||||||
"Writing slivers off to ");
|
|
||||||
if( out )
|
|
||||||
{
|
|
||||||
CGAL::output_slivers_to_off(*out, tr, get_double_option("sliver_test"));
|
|
||||||
if(need_delete)
|
|
||||||
delete out;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::cerr << " done\n";
|
|
||||||
|
|
||||||
#ifdef CGAL_SURFACE_MESHER_TEST_OPTIONS
|
|
||||||
check_all_options_have_been_used();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec ./implicit_surfaces_mesher_3 \
|
|
||||||
\
|
|
||||||
-f chair \
|
|
||||||
\
|
|
||||||
--radius_bound 0.1 \
|
|
||||||
\
|
|
||||||
--tets_aspect_ratio_bound 3 \
|
|
||||||
--tets_size_bound 0.1 \
|
|
||||||
\
|
|
||||||
--number_of_initial_points 50 \
|
|
||||||
\
|
|
||||||
--read_initial_points ./dump_of_initial_points_chair \
|
|
||||||
--initial_surface_off chair-surface-initiale.off \
|
|
||||||
--mesh_after_filename chair-after.mesh chair.mesh \
|
|
||||||
\
|
|
||||||
chair.mesh \
|
|
||||||
\
|
|
||||||
--pumping_bound 0.5
|
|
||||||
\
|
|
||||||
--slivers_off chair-slivers.off \
|
|
||||||
|
|
||||||
# if --read_initial_points is used, --number_of_initial_points is useless
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec ./implicit_surfaces_mesher_3 \
|
|
||||||
\
|
|
||||||
--inrimage ../../../Surface_mesher/examples/Surface_mesher/ImageIO/data/skull_2.9.inr.gz \
|
|
||||||
--iso_value 2.9 \
|
|
||||||
\
|
|
||||||
--center_x 122 \
|
|
||||||
--center_y 102 \
|
|
||||||
--center_z 117 \
|
|
||||||
--enclosing_sphere_radius 500 \
|
|
||||||
\
|
|
||||||
--radius_bound 5.2 \
|
|
||||||
\
|
|
||||||
--tets_aspect_ratio_bound 2 \
|
|
||||||
--tets_size_bound 5 \
|
|
||||||
\
|
|
||||||
--number_of_initial_points 50 \
|
|
||||||
\
|
|
||||||
--read_initial_points dump_of_initial_points_of_skull \
|
|
||||||
\
|
|
||||||
--initial_surface_off skull-surface-initiale.off \
|
|
||||||
--surface_off skull-surface-after.off \
|
|
||||||
\
|
|
||||||
skull.mesh \
|
|
||||||
--cgal_mesh_before_exudation skull.cgal \
|
|
||||||
\
|
|
||||||
--pumping_bound 0.5 \
|
|
||||||
\
|
|
||||||
--mesh_after_filename skull-after.mesh \
|
|
||||||
--slivers_off skull-slivers.off \
|
|
||||||
|
|
||||||
# if --read_initial_points is used, --number_of_initial_points is useless
|
|
||||||
|
|
||||||
# Si on met
|
|
||||||
# --radius_bound 10. \
|
|
||||||
# --distance_bound 10. \
|
|
||||||
# alors on obtient une surface non manifold.
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec ./implicit_surfaces_mesher_3 \
|
|
||||||
\
|
|
||||||
-f tanglecube \
|
|
||||||
\
|
|
||||||
--center_x 1.5 \
|
|
||||||
--center_y 1.5 \
|
|
||||||
--center_z 1.5 \
|
|
||||||
--enclosing_sphere_radius 8 \
|
|
||||||
--precision 0.000001 \
|
|
||||||
--radius_bound 0.1 \
|
|
||||||
--angle_bound 30 \
|
|
||||||
--tets_radius_bound 0.1 \
|
|
||||||
\
|
|
||||||
--tets_aspect_ratio_bound 2 \
|
|
||||||
\
|
|
||||||
--slivers_off tangle-slivers.off \
|
|
||||||
--initial_surface_off tangle-surface-initiale.off \
|
|
||||||
--mesh_after_filename tangle-after.mesh \
|
|
||||||
\
|
|
||||||
tangle.mesh \
|
|
||||||
\
|
|
||||||
--number_of_initial_points 50 \
|
|
||||||
\
|
|
||||||
--read_initial_points ./dump_of_initial_points_of_tangle ${1+"$@"}
|
|
||||||
|
|
||||||
# if --read_initial_points is used, --number_of_initial_points is useless
|
|
||||||
|
|
@ -1,213 +0,0 @@
|
||||||
H1 {
|
|
||||||
text-align: center;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
H2 {
|
|
||||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
|
||||||
}
|
|
||||||
CAPTION { font-weight: bold }
|
|
||||||
DIV.qindex {
|
|
||||||
width: 100%;
|
|
||||||
background-color: #eeeeff;
|
|
||||||
border: 1px solid #B0B0B0;
|
|
||||||
text-align: center;
|
|
||||||
margin: 2px;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
A.qindex {
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1A419D;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
A.qindex:visited {
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1A419D
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
A.qindex:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: #ddddff;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
A.qindexHL {
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
background-color: #6666cc;
|
|
||||||
color: #ffffff;
|
|
||||||
padding: 2 6px;
|
|
||||||
border: 1px double #9295C2;
|
|
||||||
}
|
|
||||||
A.qindexHL:hover {
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: #6666cc;
|
|
||||||
color: #ffffff;
|
|
||||||
padding: 2px 6px;
|
|
||||||
}
|
|
||||||
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
|
|
||||||
A.el { text-decoration: none; font-weight: bold }
|
|
||||||
A.elRef { font-weight: bold }
|
|
||||||
A.code { text-decoration: none; font-weight: normal; color: #1A419D}
|
|
||||||
A.codeRef { font-weight: normal; color: #1A419D}
|
|
||||||
A:hover { text-decoration: none; background-color: #f2f2ff }
|
|
||||||
DL.el { margin-left: -1cm }
|
|
||||||
PRE.fragment {
|
|
||||||
border: 1px solid #CCCCCC;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
margin-top: 4px;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
margin-left: 2px;
|
|
||||||
margin-right: 8px;
|
|
||||||
padding-left: 6px;
|
|
||||||
padding-right: 6px;
|
|
||||||
padding-top: 4px;
|
|
||||||
padding-bottom: 4px;
|
|
||||||
}
|
|
||||||
DIV.fragment {
|
|
||||||
border: 1px solid #CCCCCC;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
padding: 6px;
|
|
||||||
}
|
|
||||||
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
|
|
||||||
TD.md { background-color: #F4F4FB; font-weight: bold; }
|
|
||||||
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
|
|
||||||
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
|
|
||||||
DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }
|
|
||||||
DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }
|
|
||||||
BODY {
|
|
||||||
background: white;
|
|
||||||
background-image:url(http://www.cs.uu.nl/CGAL/images/cgal-bg2.gif);
|
|
||||||
color: black;
|
|
||||||
margin-right: 20px;
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
TD.indexkey {
|
|
||||||
background-color: #eeeeff;
|
|
||||||
font-weight: bold;
|
|
||||||
padding-right : 10px;
|
|
||||||
padding-top : 2px;
|
|
||||||
padding-left : 10px;
|
|
||||||
padding-bottom : 2px;
|
|
||||||
margin-left : 0px;
|
|
||||||
margin-right : 0px;
|
|
||||||
margin-top : 2px;
|
|
||||||
margin-bottom : 2px;
|
|
||||||
border: 1px solid #CCCCCC;
|
|
||||||
}
|
|
||||||
TD.indexvalue {
|
|
||||||
background-color: #eeeeff;
|
|
||||||
font-style: italic;
|
|
||||||
padding-right : 10px;
|
|
||||||
padding-top : 2px;
|
|
||||||
padding-left : 10px;
|
|
||||||
padding-bottom : 2px;
|
|
||||||
margin-left : 0px;
|
|
||||||
margin-right : 0px;
|
|
||||||
margin-top : 2px;
|
|
||||||
margin-bottom : 2px;
|
|
||||||
border: 1px solid #CCCCCC;
|
|
||||||
}
|
|
||||||
TR.memlist {
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
}
|
|
||||||
P.formulaDsp { text-align: center; }
|
|
||||||
IMG.formulaDsp { }
|
|
||||||
IMG.formulaInl { vertical-align: middle; }
|
|
||||||
SPAN.keyword { color: #008000 }
|
|
||||||
SPAN.keywordtype { color: #604020 }
|
|
||||||
SPAN.keywordflow { color: #e08000 }
|
|
||||||
SPAN.comment { color: #800000 }
|
|
||||||
SPAN.preprocessor { color: #806020 }
|
|
||||||
SPAN.stringliteral { color: #002080 }
|
|
||||||
SPAN.charliteral { color: #008080 }
|
|
||||||
.mdTable {
|
|
||||||
border: 1px solid #868686;
|
|
||||||
background-color: #F4F4FB;
|
|
||||||
}
|
|
||||||
.mdRow {
|
|
||||||
padding: 8px 10px;
|
|
||||||
}
|
|
||||||
.mdescLeft {
|
|
||||||
font-size: smaller;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
background-color: #FAFAFA;
|
|
||||||
padding-left: 8px;
|
|
||||||
border-top: 1px none #E0E0E0;
|
|
||||||
border-right: 1px none #E0E0E0;
|
|
||||||
border-bottom: 1px none #E0E0E0;
|
|
||||||
border-left: 1px none #E0E0E0;
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
.mdescRight {
|
|
||||||
font-size: smaller;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-style: italic;
|
|
||||||
background-color: #FAFAFA;
|
|
||||||
padding-left: 4px;
|
|
||||||
border-top: 1px none #E0E0E0;
|
|
||||||
border-right: 1px none #E0E0E0;
|
|
||||||
border-bottom: 1px none #E0E0E0;
|
|
||||||
border-left: 1px none #E0E0E0;
|
|
||||||
margin: 0px;
|
|
||||||
padding-bottom: 0px;
|
|
||||||
padding-right: 8px;
|
|
||||||
}
|
|
||||||
.memItemLeft {
|
|
||||||
padding: 1px 0px 0px 8px;
|
|
||||||
margin: 4px;
|
|
||||||
border-top-width: 1px;
|
|
||||||
border-right-width: 1px;
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
border-left-width: 1px;
|
|
||||||
border-top-style: solid;
|
|
||||||
border-top-color: #E0E0E0;
|
|
||||||
border-right-color: #E0E0E0;
|
|
||||||
border-bottom-color: #E0E0E0;
|
|
||||||
border-left-color: #E0E0E0;
|
|
||||||
border-right-style: none;
|
|
||||||
border-bottom-style: none;
|
|
||||||
border-left-style: none;
|
|
||||||
background-color: #FAFAFA;
|
|
||||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
.memItemRight {
|
|
||||||
padding: 1px 0px 0px 8px;
|
|
||||||
margin: 4px;
|
|
||||||
border-top-width: 1px;
|
|
||||||
border-right-width: 1px;
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
border-left-width: 1px;
|
|
||||||
border-top-style: solid;
|
|
||||||
border-top-color: #E0E0E0;
|
|
||||||
border-right-color: #E0E0E0;
|
|
||||||
border-bottom-color: #E0E0E0;
|
|
||||||
border-left-color: #E0E0E0;
|
|
||||||
border-right-style: none;
|
|
||||||
border-bottom-style: none;
|
|
||||||
border-left-style: none;
|
|
||||||
background-color: #FAFAFA;
|
|
||||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
.search { color: #003399;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
FORM.search {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
INPUT.search { font-size: 75%;
|
|
||||||
color: #000080;
|
|
||||||
font-weight: normal;
|
|
||||||
background-color: #eeeeff;
|
|
||||||
}
|
|
||||||
TD.tiny { font-size: 75%;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #252E78;
|
|
||||||
}
|
|
||||||
a:visited {
|
|
||||||
color: #3D2185;
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
*.cin are "standard in" files for ./combined_spheres
|
|
||||||
Use them with:
|
|
||||||
./combined_spheres < FILE.cin
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
50 100 150 200 300
|
|
||||||
10 5 30 15 60
|
|
||||||
bounds
|
|
||||||
|
|
@ -1,440 +0,0 @@
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
|
|
||||||
#include <CGAL/Robust_circumcenter_traits_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
|
||||||
|
|
||||||
// IO.h must be included before vertex and cell bases.
|
|
||||||
#include <CGAL/Mesh_3/IO.h>
|
|
||||||
|
|
||||||
#include <CGAL/make_surface_mesh.h>
|
|
||||||
#include <CGAL/Multi_surface_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Volume_mesher_cell_base_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_filtered_traits_3.h>
|
|
||||||
#include <CGAL/Implicit_surfaces_mesher_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Surface_mesher/Standard_criteria.h>
|
|
||||||
#include <CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/Slivers_exuder.h>
|
|
||||||
|
|
||||||
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
|
|
||||||
#include <CGAL/IO/File_medit.h>
|
|
||||||
|
|
||||||
#include <CGAL/Surface_mesher/Sphere_oracle_3.h>
|
|
||||||
#include <CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_criteria_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Point_traits.h>
|
|
||||||
#include <CGAL/Weighted_point_with_surface_index_geom_traits.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
struct K2 : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
typedef CGAL::Robust_circumcenter_traits_3<K2> K;
|
|
||||||
// struct K : public CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt {};
|
|
||||||
typedef CGAL::Regular_triangulation_filtered_traits_3<K> Regular_traits;
|
|
||||||
typedef CGAL::Weighted_point_with_surface_index_geom_traits<Regular_traits> My_traits;
|
|
||||||
// Multi_surface_traits<Regular_traits> ?
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_vertex_base_3<My_traits> Vb;
|
|
||||||
typedef CGAL::Regular_triangulation_cell_base_3<My_traits> Cb1;
|
|
||||||
typedef CGAL::Surface_mesh_cell_base_3<My_traits, Cb1> Cb2;
|
|
||||||
typedef CGAL::Volume_mesher_cell_base_3<My_traits, Cb2> Cb;
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
|
|
||||||
typedef CGAL::Regular_triangulation_3<My_traits, Tds> Tr;
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
|
|
||||||
|
|
||||||
typedef My_traits::Point_3 Point_3;
|
|
||||||
typedef My_traits::Sphere_3 Sphere_3;
|
|
||||||
typedef My_traits::FT FT;
|
|
||||||
|
|
||||||
using CGAL::Surface_mesher::Refine_criterion;
|
|
||||||
using CGAL::Surface_mesher::Standard_criteria;
|
|
||||||
using CGAL::Surface_mesher::Point_surface_indices_visitor;
|
|
||||||
typedef Refine_criterion<Tr> Criterion;
|
|
||||||
// changer le nom du Refine_criterion en Criterion_virtual_base
|
|
||||||
typedef Standard_criteria <Criterion> Multi_criterion;
|
|
||||||
// changer son nom en Multi_criterion, ou Combined_criterion
|
|
||||||
|
|
||||||
typedef Point_surface_indices_visitor Set_indices;
|
|
||||||
|
|
||||||
struct Point_with_surface_index_creator
|
|
||||||
{
|
|
||||||
typedef FT argument_type;
|
|
||||||
typedef FT argument1_type;
|
|
||||||
typedef FT argument2_type;
|
|
||||||
typedef FT argument3_type;
|
|
||||||
typedef My_traits::Point result_type;
|
|
||||||
typedef CGAL::Arity_tag<3> Arity;
|
|
||||||
|
|
||||||
result_type operator()(const FT& x, const FT& y, const FT& z) const
|
|
||||||
{
|
|
||||||
return result_type(result_type::Point(x, y, z));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesher::Sphere_oracle_3<
|
|
||||||
My_traits,
|
|
||||||
Point_with_surface_index_creator,
|
|
||||||
Set_indices> Single_oracle;
|
|
||||||
|
|
||||||
using CGAL::Surface_mesher::Combining_oracle;
|
|
||||||
|
|
||||||
typedef Combining_oracle<Single_oracle, Single_oracle> Oracle_2;
|
|
||||||
typedef Combining_oracle<Oracle_2, Single_oracle> Oracle_3;
|
|
||||||
typedef Combining_oracle<Oracle_3, Single_oracle> Oracle_4;
|
|
||||||
typedef Combining_oracle<Oracle_4, Single_oracle> Oracle_5;
|
|
||||||
typedef Oracle_5 Oracle;
|
|
||||||
|
|
||||||
/*** A size criterion for multi surfaces ***/
|
|
||||||
class Uniform_size_multi_surface_criterion : public Criterion {
|
|
||||||
public:
|
|
||||||
typedef Criterion::Quality Quality;
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<double> squared_sphere_radii;
|
|
||||||
|
|
||||||
typedef Tr::Facet Facet;
|
|
||||||
typedef Tr::Vertex_handle Vertex_handle;
|
|
||||||
typedef Tr::Cell_handle Cell_handle;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Uniform_size_multi_surface_criterion(const std::vector<double> sphere_radii)
|
|
||||||
{
|
|
||||||
std::vector<double>::size_type size = sphere_radii.size();
|
|
||||||
|
|
||||||
squared_sphere_radii.resize(size);
|
|
||||||
|
|
||||||
for(std::vector<double>::size_type i = 0; i < size; ++i)
|
|
||||||
{
|
|
||||||
squared_sphere_radii[i] = sphere_radii[i] * sphere_radii[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_bad (const Facet& f, Quality& q) const {
|
|
||||||
const Cell_handle& ch = f.first;
|
|
||||||
const int i = f.second;
|
|
||||||
const Vertex_handle& v1 = ch->vertex((i+1)&3);
|
|
||||||
const Vertex_handle& v2 = ch->vertex((i+2)&3);
|
|
||||||
const Vertex_handle& v3 = ch->vertex((i+3)&3);
|
|
||||||
|
|
||||||
const int& number = v1->point().surface_index();
|
|
||||||
if ( number == 0 ||
|
|
||||||
(v2->point().surface_index() != number) ||
|
|
||||||
(v3->point().surface_index() != number ) )
|
|
||||||
{
|
|
||||||
q = Quality(0);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if(squared_sphere_radii[number] == 0.)
|
|
||||||
{
|
|
||||||
q = Quality(0);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const Point_3& p1 = v1->point();
|
|
||||||
|
|
||||||
q = squared_sphere_radii[number] /
|
|
||||||
CGAL::squared_distance(p1,
|
|
||||||
f.first->get_facet_surface_center(f.second));
|
|
||||||
return q < 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}; // end Uniform_size_multi_surface_criterion
|
|
||||||
|
|
||||||
/*** criteria for Mesh_3 ***/
|
|
||||||
typedef CGAL::Mesh_criteria_3<Tr> Tets_criteria;
|
|
||||||
|
|
||||||
class Special_tets_criteria
|
|
||||||
{
|
|
||||||
std::vector<double> squared_sphere_radii;
|
|
||||||
std::vector<double> squared_radius_bounds;
|
|
||||||
double squared_radius_edge_bound;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Special_tets_criteria(const std::vector<double> sphere_radii,
|
|
||||||
const std::vector<double> radius_bounds,
|
|
||||||
const double radius_edge_bound = 2)
|
|
||||||
: squared_sphere_radii(5),
|
|
||||||
squared_radius_bounds(5),
|
|
||||||
squared_radius_edge_bound(radius_edge_bound * radius_edge_bound)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < 5; ++i)
|
|
||||||
{
|
|
||||||
squared_sphere_radii[i] = sphere_radii[i] * sphere_radii[i];
|
|
||||||
squared_radius_bounds[i] = radius_bounds[i] * radius_bounds[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef Tr::Cell_handle Cell_handle;
|
|
||||||
typedef Tets_criteria::Quality Quality;
|
|
||||||
|
|
||||||
class Is_bad {
|
|
||||||
protected:
|
|
||||||
std::vector<double> squared_sphere_radii;
|
|
||||||
std::vector<double> squared_radius_bounds;
|
|
||||||
double squared_radius_edge_bound;
|
|
||||||
public:
|
|
||||||
typedef Tr::Point Point_3;
|
|
||||||
|
|
||||||
Is_bad(const std::vector<double> squared_sphere_radii_,
|
|
||||||
const std::vector<double> squared_radius_bounds_,
|
|
||||||
const double squared_radius_edge_bound_)
|
|
||||||
: squared_sphere_radii(5),
|
|
||||||
squared_radius_bounds(5),
|
|
||||||
squared_radius_edge_bound(squared_radius_edge_bound_)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < 5; ++i)
|
|
||||||
{
|
|
||||||
squared_sphere_radii[i] = squared_sphere_radii_[i];
|
|
||||||
squared_radius_bounds[i] = squared_radius_bounds_[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator()(const Cell_handle& c,
|
|
||||||
Quality& qual) const
|
|
||||||
{
|
|
||||||
const Point_3& p = c->vertex(0)->point();
|
|
||||||
const Point_3& q = c->vertex(1)->point();
|
|
||||||
const Point_3& r = c->vertex(2)->point();
|
|
||||||
const Point_3& s = c->vertex(3)->point();
|
|
||||||
|
|
||||||
typedef Tr::Geom_traits Geom_traits;
|
|
||||||
typedef Geom_traits::Compute_squared_radius_3 Radius;
|
|
||||||
typedef Geom_traits::Compute_squared_distance_3 Distance;
|
|
||||||
typedef Geom_traits::Construct_circumcenter_3 Circumcenter;
|
|
||||||
typedef Geom_traits::FT FT;
|
|
||||||
|
|
||||||
Radius radius = Geom_traits().compute_squared_radius_3_object();
|
|
||||||
Distance distance = Geom_traits().compute_squared_distance_3_object();
|
|
||||||
Circumcenter circumcenter =
|
|
||||||
Geom_traits().construct_circumcenter_3_object();
|
|
||||||
|
|
||||||
const double sq_distance_from_origin =
|
|
||||||
CGAL::to_double(distance(CGAL::ORIGIN, circumcenter(p, q, r, s)));
|
|
||||||
|
|
||||||
double current_squared_radius_bound = 0;
|
|
||||||
|
|
||||||
if(sq_distance_from_origin < squared_sphere_radii[0] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[0];
|
|
||||||
}
|
|
||||||
else if(sq_distance_from_origin < squared_sphere_radii[1] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[1];
|
|
||||||
}
|
|
||||||
else if(sq_distance_from_origin < squared_sphere_radii[2] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[2];
|
|
||||||
}
|
|
||||||
else if(sq_distance_from_origin < squared_sphere_radii[3] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[3];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
const double sq_radius = CGAL::to_double(radius(p, q, r, s));
|
|
||||||
|
|
||||||
if( current_squared_radius_bound != 0)
|
|
||||||
{
|
|
||||||
qual.second = sq_radius / current_squared_radius_bound;
|
|
||||||
// normalized by size bound to deal
|
|
||||||
// with size field
|
|
||||||
if( qual.sq_size() > 1 )
|
|
||||||
{
|
|
||||||
qual.first = 1; // (do not compute aspect)
|
|
||||||
#ifdef CGAL_MESH_3_DEBUG_CRITERIA
|
|
||||||
std::cerr << "bad tetrahedron: squared radius=" << sq_radius << "\n";
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
qual.second = 1;
|
|
||||||
if( squared_radius_edge_bound == 0 )
|
|
||||||
{
|
|
||||||
qual = Quality(0,1);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
double min_sq_length = CGAL::to_double(distance(p, q));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(p, r)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(p, s)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(q, r)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(q, s)));
|
|
||||||
min_sq_length = CGAL::min(min_sq_length,
|
|
||||||
CGAL::to_double(distance(r, s)));
|
|
||||||
|
|
||||||
qual.first = sq_radius / min_sq_length;
|
|
||||||
#ifdef CGAL_MESH_3_DEBUG_CRITERIA
|
|
||||||
if( qual.first > squared_radius_edge_bound )
|
|
||||||
std::cerr << "bad tetrahedron: radius-edge ratio = "
|
|
||||||
<< CGAL::sqrt(qual.first)
|
|
||||||
<< "\n";
|
|
||||||
#endif
|
|
||||||
return (qual.first > squared_radius_edge_bound);
|
|
||||||
}
|
|
||||||
|
|
||||||
}; // end Is_bad
|
|
||||||
|
|
||||||
|
|
||||||
Is_bad is_bad_object() const
|
|
||||||
{ return Is_bad(squared_sphere_radii, squared_radius_bounds,
|
|
||||||
squared_radius_edge_bound); }
|
|
||||||
|
|
||||||
}; // end Special_tets_criteria
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
int main(int, char**)
|
|
||||||
{
|
|
||||||
/*** Spheres radiuss ***/
|
|
||||||
FT r1; // 93 milimeters
|
|
||||||
FT r2;
|
|
||||||
FT r3;
|
|
||||||
FT r4;
|
|
||||||
FT r5;
|
|
||||||
std::vector<double> size_bounds(6);
|
|
||||||
std::vector<double> radii(5);
|
|
||||||
std::vector<double> facets_size_bounds(6);
|
|
||||||
|
|
||||||
std::cout << "Input r1, r2, r3, r4, r5:" << std::endl;
|
|
||||||
std::cin >> r1 >> r2 >> r3 >> r4 >> r5;
|
|
||||||
std::cout << "Input the corresponding 5 size bounds:" << std::endl;
|
|
||||||
std::cin >> size_bounds[0]
|
|
||||||
>> size_bounds[1]
|
|
||||||
>> size_bounds[2]
|
|
||||||
>> size_bounds[3]
|
|
||||||
>> size_bounds[4];
|
|
||||||
|
|
||||||
size_bounds[5] = std::numeric_limits<double>::infinity(); // trick
|
|
||||||
|
|
||||||
if(!std::cin)
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
|
|
||||||
radii[0] = CGAL::to_double(r1);
|
|
||||||
radii[1] = CGAL::to_double(r2);
|
|
||||||
radii[2] = CGAL::to_double(r3);
|
|
||||||
radii[3] = CGAL::to_double(r4);
|
|
||||||
radii[4] = CGAL::to_double(r5);
|
|
||||||
|
|
||||||
for(int i = 1; i < 6; ++i)
|
|
||||||
facets_size_bounds[i] = std::min(size_bounds[i-1], size_bounds[i]);
|
|
||||||
facets_size_bounds[0] = 0;
|
|
||||||
|
|
||||||
const int number_of_initial_points = 20;
|
|
||||||
|
|
||||||
const double facets_aspect_ratio_bound = 30; // degres
|
|
||||||
const double tets_radius_edge_bound = 2.5; // B
|
|
||||||
|
|
||||||
Sphere_3 sphere1(CGAL::ORIGIN, r1*r1);
|
|
||||||
Sphere_3 sphere2(CGAL::ORIGIN, r2*r2);
|
|
||||||
Sphere_3 sphere3(CGAL::ORIGIN, r3*r3);
|
|
||||||
Sphere_3 sphere4(CGAL::ORIGIN, r4*r4);
|
|
||||||
Sphere_3 sphere5(CGAL::ORIGIN, r5*r5);
|
|
||||||
|
|
||||||
// const Sphere_3 bounding_sphere(CGAL::ORIGIN,
|
|
||||||
// bounding_sphere_radius*bounding_sphere_radius);
|
|
||||||
|
|
||||||
// Implicit_sphere sphere1(Sphere(r1), bounding_sphere, precision);
|
|
||||||
// Implicit_sphere sphere2(Sphere(r2), bounding_sphere, precision);
|
|
||||||
// Implicit_sphere sphere3(Sphere(r3), bounding_sphere, precision);
|
|
||||||
// Implicit_sphere sphere4(Sphere(r4), bounding_sphere, precision);
|
|
||||||
// Implicit_sphere sphere5(Sphere(r5), bounding_sphere, precision);
|
|
||||||
|
|
||||||
typedef CGAL::Multi_surface_3<Sphere_3, Sphere_3> Surface_2;
|
|
||||||
typedef CGAL::Multi_surface_3<Surface_2, Sphere_3> Surface_3;
|
|
||||||
typedef CGAL::Multi_surface_3<Surface_3, Sphere_3> Surface_4;
|
|
||||||
typedef CGAL::Multi_surface_3<Surface_4, Sphere_3> Surface_5;
|
|
||||||
typedef Surface_5 Surface;
|
|
||||||
|
|
||||||
// typedef CGAL::Multi_surface_3<Implicit_sphere, Implicit_sphere> Surface_2;
|
|
||||||
// typedef CGAL::Multi_surface_3<Surface_2, Implicit_sphere> Surface_3;
|
|
||||||
// typedef CGAL::Multi_surface_3<Surface_3, Implicit_sphere> Surface_4;
|
|
||||||
// typedef CGAL::Multi_surface_3<Surface_4, Implicit_sphere> Surface_5;
|
|
||||||
// typedef Surface_5 Surface;
|
|
||||||
|
|
||||||
Surface_2 surface_2(sphere1, sphere2);
|
|
||||||
Surface_3 surface_3(surface_2, sphere3);
|
|
||||||
Surface_4 surface_4(surface_3, sphere4);
|
|
||||||
Surface surface(surface_4, sphere5);
|
|
||||||
|
|
||||||
Tr tr;
|
|
||||||
C2t3 c2t3(tr);
|
|
||||||
|
|
||||||
// Single_oracle
|
|
||||||
// single_oracle_1 (sphere1,
|
|
||||||
// K::Point_3(CGAL::ORIGIN), // center of the bounding sphere
|
|
||||||
// bounding_sphere_radius, // its radius (in mm)
|
|
||||||
// precision,
|
|
||||||
// use_bipolar_oracle, // bipolar oracle
|
|
||||||
// false, // debug off
|
|
||||||
// Set_indices(1));
|
|
||||||
Single_oracle single_oracle_1(Set_indices(1));
|
|
||||||
Single_oracle single_oracle_2(Set_indices(2));
|
|
||||||
Single_oracle single_oracle_3(Set_indices(3));
|
|
||||||
Single_oracle single_oracle_4(Set_indices(4));
|
|
||||||
Single_oracle single_oracle_5(Set_indices(5));
|
|
||||||
|
|
||||||
Oracle_2 oracle_2(single_oracle_1, single_oracle_2);
|
|
||||||
Oracle_3 oracle_3(oracle_2, single_oracle_3);
|
|
||||||
Oracle_4 oracle_4(oracle_3, single_oracle_4);
|
|
||||||
Oracle_5 oracle(oracle_4, single_oracle_5);
|
|
||||||
|
|
||||||
CGAL::Surface_mesher::Aspect_ratio_criterion<Tr>
|
|
||||||
aspect_ratio_criterion (facets_aspect_ratio_bound);
|
|
||||||
Uniform_size_multi_surface_criterion
|
|
||||||
uniform_size_multi_surface_criterion(facets_size_bounds);
|
|
||||||
|
|
||||||
std::vector<Criterion*> criterion_vector;
|
|
||||||
criterion_vector.push_back(&uniform_size_multi_surface_criterion);
|
|
||||||
criterion_vector.push_back(&aspect_ratio_criterion);
|
|
||||||
Multi_criterion multi_criterion (criterion_vector);
|
|
||||||
|
|
||||||
Special_tets_criteria tets_criteria(radii,
|
|
||||||
size_bounds,
|
|
||||||
tets_radius_edge_bound);
|
|
||||||
|
|
||||||
typedef CGAL::Implicit_surfaces_mesher_3<C2t3,
|
|
||||||
Surface,
|
|
||||||
Multi_criterion,
|
|
||||||
Special_tets_criteria,
|
|
||||||
Oracle> Mesher;
|
|
||||||
|
|
||||||
oracle.construct_initial_points_object()(surface,
|
|
||||||
CGAL::inserter(tr),
|
|
||||||
number_of_initial_points);
|
|
||||||
|
|
||||||
Mesher mesher (c2t3, surface, multi_criterion, tets_criteria, oracle);
|
|
||||||
mesher.refine_mesh();
|
|
||||||
|
|
||||||
CGAL::Mesh_3::Slivers_exuder<C2t3> exuder(tr);
|
|
||||||
exuder.pump_vertices(0.2);
|
|
||||||
|
|
||||||
std::string filename;
|
|
||||||
std::cout << "Ouput file name (without extension):" << std::endl;
|
|
||||||
std::cin >> filename;
|
|
||||||
|
|
||||||
std::ofstream out((filename+".mesh").c_str());
|
|
||||||
CGAL::output_to_medit(out, mesher.complex_2_in_triangulation_3());
|
|
||||||
out.close();
|
|
||||||
|
|
||||||
std::ofstream out_cgal((filename+".cgal").c_str());
|
|
||||||
|
|
||||||
CGAL::Mesh_3::output_mesh(out_cgal,
|
|
||||||
mesher.complex_2_in_triangulation_3());
|
|
||||||
}
|
|
||||||
|
|
@ -1,461 +0,0 @@
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
|
|
||||||
#include <CGAL/Robust_circumcenter_traits_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
|
||||||
|
|
||||||
// IO.h must be included before vertex and cell bases.
|
|
||||||
#include <CGAL/Mesh_3/IO.h>
|
|
||||||
|
|
||||||
#include <CGAL/make_surface_mesh.h>
|
|
||||||
#include <CGAL/Implicit_surface_3.h>
|
|
||||||
#include <CGAL/Multi_surface_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Volume_mesher_cell_base_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
|
|
||||||
#include <CGAL/Regular_triangulation_filtered_traits_3.h>
|
|
||||||
#include <CGAL/Implicit_surfaces_mesher_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Surface_mesher/Standard_criteria.h>
|
|
||||||
#include <CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_3/Slivers_exuder.h>
|
|
||||||
|
|
||||||
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
|
|
||||||
#include <CGAL/IO/File_medit.h>
|
|
||||||
|
|
||||||
// #include <CGAL/Surface_mesher/Sphere_oracle_3.h>
|
|
||||||
#include <CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h>
|
|
||||||
|
|
||||||
#include <CGAL/Mesh_criteria_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Point_traits.h>
|
|
||||||
#include <CGAL/Weighted_point_with_surface_index_geom_traits.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
struct K2 : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
|
||||||
typedef CGAL::Robust_circumcenter_traits_3<K2> K;
|
|
||||||
// struct K : public CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt {};
|
|
||||||
typedef CGAL::Regular_triangulation_filtered_traits_3<K> Regular_traits;
|
|
||||||
typedef CGAL::Weighted_point_with_surface_index_geom_traits<Regular_traits> My_traits;
|
|
||||||
// Multi_surface_traits<Regular_traits> ?
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_vertex_base_3<My_traits> Vb;
|
|
||||||
typedef CGAL::Regular_triangulation_cell_base_3<My_traits> Cb1;
|
|
||||||
typedef CGAL::Surface_mesh_cell_base_3<My_traits, Cb1> Cb2;
|
|
||||||
typedef CGAL::Volume_mesher_cell_base_3<My_traits, Cb2> Cb;
|
|
||||||
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
|
|
||||||
typedef CGAL::Regular_triangulation_3<My_traits, Tds> Tr;
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
|
|
||||||
|
|
||||||
typedef My_traits::Point_3 Point_3;
|
|
||||||
typedef My_traits::Sphere_3 Sphere_3;
|
|
||||||
typedef My_traits::FT FT;
|
|
||||||
|
|
||||||
using CGAL::Surface_mesher::Refine_criterion;
|
|
||||||
using CGAL::Surface_mesher::Standard_criteria;
|
|
||||||
using CGAL::Surface_mesher::Point_surface_indices_visitor;
|
|
||||||
typedef Refine_criterion<Tr> Criterion;
|
|
||||||
// changer le nom du Refine_criterion en Criterion_virtual_base
|
|
||||||
typedef Standard_criteria <Criterion> Multi_criterion;
|
|
||||||
// changer son nom en Multi_criterion, ou Combined_criterion
|
|
||||||
|
|
||||||
typedef Point_surface_indices_visitor Set_indices;
|
|
||||||
|
|
||||||
class Sphere {
|
|
||||||
private:
|
|
||||||
const FT r;
|
|
||||||
public:
|
|
||||||
Sphere(FT rayon) : r(rayon) {}
|
|
||||||
|
|
||||||
FT operator()(const Point_3& p) const
|
|
||||||
{
|
|
||||||
const FT& x = p.x();
|
|
||||||
const FT& y = p.y();
|
|
||||||
const FT& z = p.z();
|
|
||||||
return x*x+y*y+z*z-r*r;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Point_with_surface_index_creator
|
|
||||||
{
|
|
||||||
typedef FT argument_type;
|
|
||||||
typedef FT argument1_type;
|
|
||||||
typedef FT argument2_type;
|
|
||||||
typedef FT argument3_type;
|
|
||||||
typedef My_traits::Point result_type;
|
|
||||||
//typedef CGAL::Arity_tag<3> Arity;
|
|
||||||
|
|
||||||
result_type operator()(const FT& x, const FT& y, const FT& z) const
|
|
||||||
{
|
|
||||||
return result_type(result_type::Point(x, y, z));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef CGAL::Implicit_surface_3<My_traits, Sphere> Implicit_sphere;
|
|
||||||
|
|
||||||
typedef CGAL::Surface_mesher::Implicit_surface_oracle_3<
|
|
||||||
My_traits,
|
|
||||||
Implicit_sphere,
|
|
||||||
Point_with_surface_index_creator,
|
|
||||||
Set_indices> Single_oracle;
|
|
||||||
|
|
||||||
// typedef CGAL::Surface_mesher::Sphere_oracle_3<
|
|
||||||
// My_traits,
|
|
||||||
// Point_with_surface_index_creator,
|
|
||||||
// Set_indices> Single_oracle;
|
|
||||||
|
|
||||||
using CGAL::Surface_mesher::Combining_oracle;
|
|
||||||
|
|
||||||
typedef Combining_oracle<Single_oracle, Single_oracle> Oracle_2;
|
|
||||||
typedef Combining_oracle<Oracle_2, Single_oracle> Oracle_3;
|
|
||||||
typedef Combining_oracle<Oracle_3, Single_oracle> Oracle_4;
|
|
||||||
typedef Combining_oracle<Oracle_4, Single_oracle> Oracle_5;
|
|
||||||
typedef Oracle_5 Oracle;
|
|
||||||
|
|
||||||
/*** A size criterion for multi surfaces ***/
|
|
||||||
class Uniform_size_multi_surface_criterion : public Criterion {
|
|
||||||
public:
|
|
||||||
typedef Criterion::Quality Quality;
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::vector<double> squared_sphere_radii;
|
|
||||||
|
|
||||||
typedef Tr::Facet Facet;
|
|
||||||
typedef Tr::Vertex_handle Vertex_handle;
|
|
||||||
typedef Tr::Cell_handle Cell_handle;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Uniform_size_multi_surface_criterion(const std::vector<double> sphere_radii)
|
|
||||||
{
|
|
||||||
std::vector<double>::size_type size = sphere_radii.size();
|
|
||||||
|
|
||||||
squared_sphere_radii.resize(size);
|
|
||||||
|
|
||||||
for(std::vector<double>::size_type i = 0; i < size; ++i)
|
|
||||||
{
|
|
||||||
squared_sphere_radii[i] = sphere_radii[i] * sphere_radii[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_bad (const Facet& f, Quality& q) const {
|
|
||||||
const Cell_handle& ch = f.first;
|
|
||||||
const int i = f.second;
|
|
||||||
const Vertex_handle& v1 = ch->vertex((i+1)&3);
|
|
||||||
const Vertex_handle& v2 = ch->vertex((i+2)&3);
|
|
||||||
const Vertex_handle& v3 = ch->vertex((i+3)&3);
|
|
||||||
|
|
||||||
const int& number = v1->point().surface_index();
|
|
||||||
if ( number == 0 ||
|
|
||||||
(v2->point().surface_index() != number) ||
|
|
||||||
(v3->point().surface_index() != number ) )
|
|
||||||
{
|
|
||||||
q = Quality(0);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if(squared_sphere_radii[number] == 0.)
|
|
||||||
{
|
|
||||||
q = Quality(0);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const Point_3& p1 = v1->point();
|
|
||||||
|
|
||||||
q = squared_sphere_radii[number] /
|
|
||||||
CGAL::squared_distance(p1,
|
|
||||||
f.first->get_facet_surface_center(f.second));
|
|
||||||
return q < 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}; // end Uniform_size_multi_surface_criterion
|
|
||||||
|
|
||||||
/*** criteria for Mesh_3 ***/
|
|
||||||
typedef CGAL::Mesh_criteria_3<Tr> Tets_criteria;
|
|
||||||
|
|
||||||
class Special_tets_criteria
|
|
||||||
{
|
|
||||||
std::vector<double> squared_sphere_radii;
|
|
||||||
std::vector<double> squared_radius_bounds;
|
|
||||||
double squared_radius_edge_bound;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Special_tets_criteria(const std::vector<double> sphere_radii,
|
|
||||||
const std::vector<double> radius_bounds,
|
|
||||||
const double radius_edge_bound = 2)
|
|
||||||
: squared_sphere_radii(5),
|
|
||||||
squared_radius_bounds(5),
|
|
||||||
squared_radius_edge_bound(radius_edge_bound * radius_edge_bound)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < 5; ++i)
|
|
||||||
{
|
|
||||||
squared_sphere_radii[i] = sphere_radii[i] * sphere_radii[i];
|
|
||||||
squared_radius_bounds[i] = radius_bounds[i] * radius_bounds[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef Tr::Cell_handle Cell_handle;
|
|
||||||
typedef Tets_criteria::Quality Quality;
|
|
||||||
|
|
||||||
class Is_bad {
|
|
||||||
protected:
|
|
||||||
std::vector<double> squared_sphere_radii;
|
|
||||||
std::vector<double> squared_radius_bounds;
|
|
||||||
double squared_radius_edge_bound;
|
|
||||||
public:
|
|
||||||
typedef Tr::Point Point_3;
|
|
||||||
|
|
||||||
Is_bad(const std::vector<double> squared_sphere_radii_,
|
|
||||||
const std::vector<double> squared_radius_bounds_,
|
|
||||||
const double squared_radius_edge_bound_)
|
|
||||||
: squared_sphere_radii(5),
|
|
||||||
squared_radius_bounds(5),
|
|
||||||
squared_radius_edge_bound(squared_radius_edge_bound_)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < 5; ++i)
|
|
||||||
{
|
|
||||||
squared_sphere_radii[i] = squared_sphere_radii_[i];
|
|
||||||
squared_radius_bounds[i] = squared_radius_bounds_[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator()(const Cell_handle& c,
|
|
||||||
Quality& qual) const
|
|
||||||
{
|
|
||||||
const Point_3& p = c->vertex(0)->point();
|
|
||||||
const Point_3& q = c->vertex(1)->point();
|
|
||||||
const Point_3& r = c->vertex(2)->point();
|
|
||||||
const Point_3& s = c->vertex(3)->point();
|
|
||||||
|
|
||||||
typedef Tr::Geom_traits Geom_traits;
|
|
||||||
typedef Geom_traits::Compute_squared_radius_3 Radius;
|
|
||||||
typedef Geom_traits::Compute_squared_distance_3 Distance;
|
|
||||||
typedef Geom_traits::Construct_circumcenter_3 Circumcenter;
|
|
||||||
typedef Geom_traits::FT FT;
|
|
||||||
|
|
||||||
Radius radius = Geom_traits().compute_squared_radius_3_object();
|
|
||||||
Distance distance = Geom_traits().compute_squared_distance_3_object();
|
|
||||||
Circumcenter circumcenter =
|
|
||||||
Geom_traits().construct_circumcenter_3_object();
|
|
||||||
|
|
||||||
const double sq_distance_from_origin =
|
|
||||||
CGAL::to_double(distance(CGAL::ORIGIN, circumcenter(p, q, r, s)));
|
|
||||||
|
|
||||||
double current_squared_radius_bound = 0;
|
|
||||||
|
|
||||||
if(sq_distance_from_origin < squared_sphere_radii[0] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[0];
|
|
||||||
}
|
|
||||||
else if(sq_distance_from_origin < squared_sphere_radii[1] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[1];
|
|
||||||
}
|
|
||||||
else if(sq_distance_from_origin < squared_sphere_radii[2] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[2];
|
|
||||||
}
|
|
||||||
else if(sq_distance_from_origin < squared_sphere_radii[3] )
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[3];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
current_squared_radius_bound = squared_radius_bounds[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
const double sq_radius = CGAL::to_double(radius(p, q, r, s));
|
|
||||||
|
|
||||||
if( current_squared_radius_bound != 0)
|
|
||||||
{
|
|
||||||
qual.second = sq_radius / current_squared_radius_bound;
|
|
||||||
// normalized by size bound to deal
|
|
||||||
// with size field
|
|
||||||
if( qual.sq_size() > 1 )
|
|
||||||
{
|
|
||||||
qual.first = 1; // (do not compute aspect)
|
|
||||||
#ifdef CGAL_MESH_3_DEBUG_CRITERIA
|
|
||||||
std::cerr << "bad tetrahedron: squared radius=" << sq_radius << "\n";
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
qual.second = 1;
|
|
||||||
if( squared_radius_edge_bound == 0 )
|
|
||||||
{
|
|
||||||
qual = Quality(0,1);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
double min_sq_length = CGAL::to_double(distance(p, q));
|
|
||||||
min_sq_length = (CGAL::min)(min_sq_length,
|
|
||||||
CGAL::to_double(distance(p, r)));
|
|
||||||
min_sq_length = (CGAL::min)(min_sq_length,
|
|
||||||
CGAL::to_double(distance(p, s)));
|
|
||||||
min_sq_length = (CGAL::min)(min_sq_length,
|
|
||||||
CGAL::to_double(distance(q, r)));
|
|
||||||
min_sq_length = (CGAL::min)(min_sq_length,
|
|
||||||
CGAL::to_double(distance(q, s)));
|
|
||||||
min_sq_length = (CGAL::min)(min_sq_length,
|
|
||||||
CGAL::to_double(distance(r, s)));
|
|
||||||
|
|
||||||
qual.first = sq_radius / min_sq_length;
|
|
||||||
#ifdef CGAL_MESH_3_DEBUG_CRITERIA
|
|
||||||
if( qual.first > squared_radius_edge_bound )
|
|
||||||
std::cerr << "bad tetrahedron: radius-edge ratio = "
|
|
||||||
<< CGAL::sqrt(qual.first)
|
|
||||||
<< "\n";
|
|
||||||
#endif
|
|
||||||
return (qual.first > squared_radius_edge_bound);
|
|
||||||
}
|
|
||||||
|
|
||||||
}; // end Is_bad
|
|
||||||
|
|
||||||
|
|
||||||
Is_bad is_bad_object() const
|
|
||||||
{ return Is_bad(squared_sphere_radii, squared_radius_bounds,
|
|
||||||
squared_radius_edge_bound); }
|
|
||||||
|
|
||||||
}; // end Special_tets_criteria
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
int main(int, char**)
|
|
||||||
{
|
|
||||||
/*** Spheres radiuss ***/
|
|
||||||
FT r1; // 93 milimeters
|
|
||||||
FT r2;
|
|
||||||
FT r3;
|
|
||||||
FT r4;
|
|
||||||
FT r5;
|
|
||||||
std::vector<double> size_bounds(6);
|
|
||||||
std::vector<double> radii(5);
|
|
||||||
std::vector<double> facets_size_bounds(6);
|
|
||||||
|
|
||||||
std::cout << "Input r1, r2, r3, r4, r5:" << std::endl;
|
|
||||||
std::cin >> r1 >> r2 >> r3 >> r4 >> r5;
|
|
||||||
std::cout << "Input the corresponding 5 size bounds:" << std::endl;
|
|
||||||
std::cin >> size_bounds[0]
|
|
||||||
>> size_bounds[1]
|
|
||||||
>> size_bounds[2]
|
|
||||||
>> size_bounds[3]
|
|
||||||
>> size_bounds[4];
|
|
||||||
|
|
||||||
size_bounds[5] = std::numeric_limits<double>::infinity(); // trick
|
|
||||||
|
|
||||||
if(!std::cin)
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
|
|
||||||
radii[0] = CGAL::to_double(r1);
|
|
||||||
radii[1] = CGAL::to_double(r2);
|
|
||||||
radii[2] = CGAL::to_double(r3);
|
|
||||||
radii[3] = CGAL::to_double(r4);
|
|
||||||
radii[4] = CGAL::to_double(r5);
|
|
||||||
|
|
||||||
for(int i = 1; i < 6; ++i)
|
|
||||||
facets_size_bounds[i] = (std::min)(size_bounds[i-1], size_bounds[i]);
|
|
||||||
facets_size_bounds[0] = 0;
|
|
||||||
|
|
||||||
const FT precision = 0.001;
|
|
||||||
const int number_of_initial_points = 20;
|
|
||||||
const FT bounding_sphere_radius = 2*r5;
|
|
||||||
|
|
||||||
const double facets_aspect_ratio_bound = 0; // degres
|
|
||||||
const double tets_radius_edge_bound = 2.5;
|
|
||||||
|
|
||||||
// Sphere_3 sphere1(CGAL::ORIGIN, r1*r1);
|
|
||||||
// Sphere_3 sphere2(CGAL::ORIGIN, r2*r2);
|
|
||||||
// Sphere_3 sphere3(CGAL::ORIGIN, r3*r3);
|
|
||||||
// Sphere_3 sphere4(CGAL::ORIGIN, r4*r4);
|
|
||||||
// Sphere_3 sphere5(CGAL::ORIGIN, r5*r5);
|
|
||||||
|
|
||||||
const Sphere_3 bounding_sphere(CGAL::ORIGIN,
|
|
||||||
bounding_sphere_radius*bounding_sphere_radius);
|
|
||||||
|
|
||||||
Implicit_sphere sphere1(Sphere(r1), bounding_sphere, precision);
|
|
||||||
Implicit_sphere sphere2(Sphere(r2), bounding_sphere, precision);
|
|
||||||
Implicit_sphere sphere3(Sphere(r3), bounding_sphere, precision);
|
|
||||||
Implicit_sphere sphere4(Sphere(r4), bounding_sphere, precision);
|
|
||||||
Implicit_sphere sphere5(Sphere(r5), bounding_sphere, precision);
|
|
||||||
|
|
||||||
typedef CGAL::Multi_surface_3<Implicit_sphere, Implicit_sphere> Surface_2;
|
|
||||||
typedef CGAL::Multi_surface_3<Surface_2, Implicit_sphere> Surface_3;
|
|
||||||
typedef CGAL::Multi_surface_3<Surface_3, Implicit_sphere> Surface_4;
|
|
||||||
typedef CGAL::Multi_surface_3<Surface_4, Implicit_sphere> Surface_5;
|
|
||||||
typedef Surface_5 Surface;
|
|
||||||
|
|
||||||
Surface_2 surface_2(sphere1, sphere2);
|
|
||||||
Surface_3 surface_3(surface_2, sphere3);
|
|
||||||
Surface_4 surface_4(surface_3, sphere4);
|
|
||||||
Surface surface(surface_4, sphere5);
|
|
||||||
|
|
||||||
Tr tr;
|
|
||||||
C2t3 c2t3(tr);
|
|
||||||
|
|
||||||
// Single_oracle
|
|
||||||
// single_oracle_1 (sphere1,
|
|
||||||
// K::Point_3(CGAL::ORIGIN), // center of the bounding sphere
|
|
||||||
// bounding_sphere_radius, // its radius (in mm)
|
|
||||||
// precision,
|
|
||||||
// use_bipolar_oracle, // bipolar oracle
|
|
||||||
// false, // debug off
|
|
||||||
// Set_indices(1));
|
|
||||||
Single_oracle single_oracle_1(Set_indices(1));
|
|
||||||
Single_oracle single_oracle_2(Set_indices(2));
|
|
||||||
Single_oracle single_oracle_3(Set_indices(3));
|
|
||||||
Single_oracle single_oracle_4(Set_indices(4));
|
|
||||||
Single_oracle single_oracle_5(Set_indices(5));
|
|
||||||
|
|
||||||
Oracle_2 oracle_2(single_oracle_1, single_oracle_2);
|
|
||||||
Oracle_3 oracle_3(oracle_2, single_oracle_3);
|
|
||||||
Oracle_4 oracle_4(oracle_3, single_oracle_4);
|
|
||||||
Oracle_5 oracle(oracle_4, single_oracle_5);
|
|
||||||
|
|
||||||
CGAL::Surface_mesher::Aspect_ratio_criterion<Tr>
|
|
||||||
aspect_ratio_criterion (facets_aspect_ratio_bound);
|
|
||||||
Uniform_size_multi_surface_criterion
|
|
||||||
uniform_size_multi_surface_criterion(facets_size_bounds);
|
|
||||||
|
|
||||||
std::vector<Criterion*> criterion_vector;
|
|
||||||
criterion_vector.push_back(&uniform_size_multi_surface_criterion);
|
|
||||||
criterion_vector.push_back(&aspect_ratio_criterion);
|
|
||||||
Multi_criterion multi_criterion (criterion_vector);
|
|
||||||
|
|
||||||
Special_tets_criteria tets_criteria(radii,
|
|
||||||
size_bounds,
|
|
||||||
tets_radius_edge_bound);
|
|
||||||
|
|
||||||
typedef CGAL::Implicit_surfaces_mesher_3<C2t3,
|
|
||||||
Surface,
|
|
||||||
Multi_criterion,
|
|
||||||
Special_tets_criteria,
|
|
||||||
Oracle> Mesher;
|
|
||||||
|
|
||||||
oracle.construct_initial_points_object()(surface,
|
|
||||||
CGAL::inserter(tr),
|
|
||||||
number_of_initial_points);
|
|
||||||
|
|
||||||
Mesher mesher (c2t3, surface, multi_criterion, tets_criteria, oracle);
|
|
||||||
mesher.refine_mesh();
|
|
||||||
|
|
||||||
CGAL::Mesh_3::Slivers_exuder<C2t3> exuder(tr);
|
|
||||||
exuder.pump_vertices(0.2);
|
|
||||||
|
|
||||||
std::string filename;
|
|
||||||
std::cout << "Ouput file name (without extension):" << std::endl;
|
|
||||||
std::cin >> filename;
|
|
||||||
|
|
||||||
std::ofstream out((filename+".mesh").c_str());
|
|
||||||
CGAL::output_to_medit(out, mesher.complex_2_in_triangulation_3());
|
|
||||||
out.close();
|
|
||||||
|
|
||||||
std::ofstream out_cgal((filename+".cgal").c_str());
|
|
||||||
|
|
||||||
CGAL::Mesh_3::output_mesh(out_cgal,
|
|
||||||
mesher.complex_2_in_triangulation_3());
|
|
||||||
std::cerr << "ok\n";
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
50 70 90 110 270
|
|
||||||
30 30 30 30 30
|
|
||||||
easy
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
50 100 150 200 400
|
|
||||||
0 0 0 0 0
|
|
||||||
no_bound
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
93 94 97 100 267
|
|
||||||
5 1 3 3 30
|
|
||||||
sl_coarse_bounds
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
93 94 97 100 267
|
|
||||||
2 1 1.5 1.5 15
|
|
||||||
sl_fine_bounds
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
93 94 97 100 267
|
|
||||||
30 30 30 30 30
|
|
||||||
sl_without_bounds
|
|
||||||
|
|
@ -1,122 +0,0 @@
|
||||||
/*
|
|
||||||
This test file tests <CGAL/Mesh_3/IO.h>, in ascii and binary mode.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <CGAL/Volume_mesher_default_triangulation_3.h>
|
|
||||||
|
|
||||||
// c2t3
|
|
||||||
#include <CGAL/Complex_2_in_triangulation_3.h>
|
|
||||||
|
|
||||||
#include <iostream> // std::cerr
|
|
||||||
#include <algorithm> // std::distance
|
|
||||||
|
|
||||||
#include <fstream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
|
||||||
|
|
||||||
// default triangulation
|
|
||||||
typedef CGAL::Volume_mesher_default_triangulation_3 Tr;
|
|
||||||
|
|
||||||
// Kernel
|
|
||||||
typedef CGAL::Kernel_traits<Tr::Point>::Kernel K;
|
|
||||||
|
|
||||||
// c2t3
|
|
||||||
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
|
|
||||||
|
|
||||||
enum Mode { ASCII, BINARY};
|
|
||||||
|
|
||||||
const std::string filename = "test_io_methods.out";
|
|
||||||
|
|
||||||
bool test(Mode mode)
|
|
||||||
{
|
|
||||||
Tr tr;
|
|
||||||
C2t3 c2t3(tr);
|
|
||||||
|
|
||||||
boost::array<K::Point_3, 4> points;
|
|
||||||
|
|
||||||
points[0]=K::Point_3(0, 0, 0);
|
|
||||||
points[1]=K::Point_3(1, 0, 0);
|
|
||||||
points[2]=K::Point_3(0, 1, 0);
|
|
||||||
points[3]=K::Point_3(0, 0, 1);
|
|
||||||
|
|
||||||
std::vector<Tr::Vertex_handle> v(points.size());
|
|
||||||
typedef std::vector<Tr::Vertex_handle>::size_type size_type;
|
|
||||||
|
|
||||||
for(size_type i = 0; i < points.size(); ++i)
|
|
||||||
v[i] = tr.insert(points[i]);
|
|
||||||
|
|
||||||
// Set 2 triangles in the complex
|
|
||||||
// So it will be 2 facets, and 5 edges in the complex
|
|
||||||
for(int i = 0; i < 2; ++i)
|
|
||||||
{
|
|
||||||
Tr::Cell_handle cell;
|
|
||||||
int i1, i2, i3;
|
|
||||||
tr.is_facet(v[i+1], v[(i+2)&3], v[(i+3)&3],
|
|
||||||
cell,
|
|
||||||
i1, i2, i3);
|
|
||||||
c2t3.set_in_complex(Tr::Facet(cell, 6 - i1 - i2 - i3));
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string filename2 = filename;
|
|
||||||
if(mode == BINARY)
|
|
||||||
filename2+=".binary";
|
|
||||||
|
|
||||||
std::ofstream out(filename2.c_str());
|
|
||||||
|
|
||||||
if(mode == BINARY)
|
|
||||||
CGAL::set_binary_mode(out);
|
|
||||||
|
|
||||||
CGAL::Mesh_3::output_mesh(out, c2t3);
|
|
||||||
|
|
||||||
out.close();
|
|
||||||
|
|
||||||
std::ifstream in(filename2.c_str());
|
|
||||||
CGAL::Mesh_3::input_mesh(in, c2t3,
|
|
||||||
true, // "true" means debugging on
|
|
||||||
&std::cerr);
|
|
||||||
|
|
||||||
Tr::size_type number_of_edges = std::distance(c2t3.edges_begin(),
|
|
||||||
c2t3.edges_end());
|
|
||||||
|
|
||||||
Tr::size_type number_of_facets = std::distance(c2t3.facets_begin(),
|
|
||||||
c2t3.facets_end());
|
|
||||||
|
|
||||||
Tr::size_type number_of_boundary_edges =
|
|
||||||
std::distance(c2t3.boundary_edges_begin(),
|
|
||||||
c2t3.boundary_edges_end());
|
|
||||||
|
|
||||||
std::cerr << "Number of edges: " << number_of_edges
|
|
||||||
<< "\nNumber of facets: " << number_of_facets
|
|
||||||
<< "\nNumber of boundary edges: " << number_of_boundary_edges
|
|
||||||
<< "\n";
|
|
||||||
|
|
||||||
std::cerr << "checking points coordinates... ";
|
|
||||||
bool check = true;
|
|
||||||
for(size_type i = 0; i < points.size(); ++i)
|
|
||||||
{
|
|
||||||
Tr::Vertex_handle dummy_v;
|
|
||||||
check = check && tr.is_vertex(points[i], dummy_v);
|
|
||||||
}
|
|
||||||
if(check)
|
|
||||||
std::cerr << "ok\n";
|
|
||||||
else
|
|
||||||
std::cerr << "error\n";
|
|
||||||
|
|
||||||
// Excepted results:
|
|
||||||
return
|
|
||||||
check &&
|
|
||||||
( number_of_boundary_edges == 4 ) &&
|
|
||||||
( number_of_edges == 5 ) &&
|
|
||||||
( number_of_facets == 2 );
|
|
||||||
} // end test
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
std::cerr << "testing ASCII mode...\n";
|
|
||||||
bool result = test(ASCII);
|
|
||||||
std::cerr << "\ntesting BINARY mode...\n";
|
|
||||||
result = result && test(BINARY);
|
|
||||||
|
|
||||||
return (result ? EXIT_SUCCESS : EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
50 100 150 200 300
|
|
||||||
30 30 30 30 30
|
|
||||||
uniform_bound
|
|
||||||
Loading…
Reference in New Issue