Copy Mesh_2, Mesh_3 and Surface_mesher, from the branch
"cannot_wait_for_CGAL-3.2" to the trunk.
My idea: the branch is the real working version, and I want it to be joined
back to the trunk:
__________________________ cannot_wait_for_CGAL-3.2 branch
/ \
/ \
-------------------------------------------- trunk
S M
The modification of the trunk between the splitting point S and the merging
point M has already been merged into "cannot_wait_for_CGAL-3.2".
The trunk versions of these three packages have been removed already.
|
|
@ -978,6 +978,30 @@ Matrix_search/doc_tex/Optimisation_ref/MatrixSearch_totmon2.gif -text svneol=uns
|
|||
Matrix_search/doc_tex/Optimisation_ref/MatrixSearch_totmon3.gif -text svneol=unset#unset
|
||||
Matrix_search/doc_tex/Optimisation_ref/MatrixSearch_totmon4.gif -text svneol=unset#unset
|
||||
Matrix_search/doc_tex/Optimisation_ref/MatrixSearch_totmon5.gif -text svneol=unset#unset
|
||||
Mesh_2/bench/data/square-deforme.poly -text
|
||||
Mesh_2/bench/data/square.poly -text
|
||||
Mesh_2/demo/Mesh_2/data/clusters.poly -text
|
||||
Mesh_2/demo/Mesh_2/data/fish.poly -text
|
||||
Mesh_2/demo/Mesh_2/data/trivial.poly -text
|
||||
Mesh_2/doc_tex/Mesh_2/domain-mesh.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain-mesh.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain-seeds-mesh.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain-seeds-mesh.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain-seeds.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain-seeds.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/domain.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/example-conform-Delaunay.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/example-conform-Delaunay.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/example-conform-Gabriel.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/example-conform-Gabriel.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/example-conform.eps -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2/example-conform.png -text svneol=unset#unset
|
||||
Mesh_2/doc_tex/Mesh_2_ref/part_of_a_cluster.eps -text
|
||||
Mesh_2/doc_tex/Mesh_2_ref/part_of_a_cluster.gif -text svneol=unset#unset
|
||||
Mesh_2/test/Mesh_2/fish-and-rectangle.poly -text
|
||||
Mesh_2/test/Mesh_2/fish.edg -text
|
||||
Mesh_2/test/Mesh_2/fish.poly -text
|
||||
Min_sphere_of_spheres_d/test_extensive/stability/maple/balls-on-boundary-2.mws -text
|
||||
Min_sphere_of_spheres_d/test_extensive/stability/maple/balls-on-boundary-3.mws -text
|
||||
Min_sphere_of_spheres_d/web/figs/heuristic/excess.eps -text
|
||||
|
|
|
|||
|
|
@ -8,6 +8,71 @@ Maintenance/rpm/SOURCES/Manual_tools
|
|||
Maintenance/rpm/SOURCES/Manual_tools-*.tar.gz
|
||||
Maintenance/rpm/SRPMS/*
|
||||
Maintenance/rpm/my_makefile
|
||||
Mesh_2/bench/bench
|
||||
Mesh_2/bench/semantic.cache
|
||||
Mesh_2/demo/Mesh_2/*.core
|
||||
Mesh_2/demo/Mesh_2/*.moc
|
||||
Mesh_2/demo/Mesh_2/conform
|
||||
Mesh_2/demo/Mesh_2/depends
|
||||
Mesh_2/demo/Mesh_2/filename.edg
|
||||
Mesh_2/demo/Mesh_2/last_input.edg
|
||||
Mesh_2/demo/Mesh_2/mesh
|
||||
Mesh_2/demo/Mesh_2/mesh_demo
|
||||
Mesh_2/demo/Mesh_2/semantic.cache
|
||||
Mesh_2/doc_html
|
||||
Mesh_2/doc_pdf
|
||||
Mesh_2/doc_ps
|
||||
Mesh_2/doc_tex/**.aux
|
||||
Mesh_2/doc_tex/*.blg
|
||||
Mesh_2/doc_tex/*.cb
|
||||
Mesh_2/doc_tex/*.cgallog
|
||||
Mesh_2/doc_tex/*.hlg
|
||||
Mesh_2/doc_tex/*.ilg
|
||||
Mesh_2/doc_tex/*.log
|
||||
Mesh_2/doc_tex/*.out
|
||||
Mesh_2/doc_tex/*.pdflg
|
||||
Mesh_2/doc_tex/*.ref
|
||||
Mesh_2/doc_tex/*.tmp
|
||||
Mesh_2/doc_tex/*.tmp.*
|
||||
Mesh_2/doc_tex/Mesh_2/*.aux
|
||||
Mesh_2/doc_tex/Mesh_2/*.core
|
||||
Mesh_2/doc_tex/Mesh_2/*.dvi
|
||||
Mesh_2/doc_tex/Mesh_2/*.hax
|
||||
Mesh_2/doc_tex/Mesh_2/*.idx
|
||||
Mesh_2/doc_tex/Mesh_2/*.log
|
||||
Mesh_2/doc_tex/Mesh_2/*.mtc*
|
||||
Mesh_2/doc_tex/Mesh_2/*.pdf
|
||||
Mesh_2/doc_tex/Mesh_2/*.ps
|
||||
Mesh_2/doc_tex/Mesh_2/_region*
|
||||
Mesh_2/doc_tex/Mesh_2/semantic.cache
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.aux
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.core
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.dvi
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.hax
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.idx
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.log
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.mtc*
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.pdf
|
||||
Mesh_2/doc_tex/Mesh_2_ref/*.ps
|
||||
Mesh_2/doc_tex/Mesh_2_ref/_region*
|
||||
Mesh_2/doc_tex/Mesh_2_ref/semantic.cache
|
||||
Mesh_2/doxygen
|
||||
Mesh_2/examples/Mesh_2/*.core
|
||||
Mesh_2/examples/Mesh_2/conform
|
||||
Mesh_2/examples/Mesh_2/conforming
|
||||
Mesh_2/examples/Mesh_2/mesh
|
||||
Mesh_2/examples/Mesh_2/mesh_class
|
||||
Mesh_2/examples/Mesh_2/mesh_global
|
||||
Mesh_2/examples/Mesh_2/mesh_with_seeds
|
||||
Mesh_2/examples/Mesh_2/my_makefile
|
||||
Mesh_2/examples/Mesh_2/semantic.cache
|
||||
Mesh_2/include/CGAL/semantic.cache
|
||||
Mesh_2/test/Mesh_2/*.core
|
||||
Mesh_2/test/Mesh_2/semantic.cache
|
||||
Mesh_2/test/Mesh_2/test_conforming
|
||||
Mesh_2/test/Mesh_2/test_double_map
|
||||
Mesh_2/test/Mesh_2/test_filtred_container
|
||||
Mesh_2/test/Mesh_2/test_meshing
|
||||
Min_annulus_d/*.aux
|
||||
Min_annulus_d/*.bbl
|
||||
Min_annulus_d/*.blg
|
||||
|
|
|
|||
|
|
@ -0,0 +1,220 @@
|
|||
# Doxyfile 1.3.8
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = Mesh_2
|
||||
PROJECT_NUMBER = 1.1alpha1
|
||||
OUTPUT_DIRECTORY = doxygen/
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
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
|
||||
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 = YES
|
||||
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
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = include
|
||||
FILE_PATTERNS = *.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = include/boost \
|
||||
include/CGAL/Delaunay_mesh_2.h \
|
||||
include/CGAL/Conforming_Delaunay_triangulation_2.h
|
||||
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
|
||||
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 = NO
|
||||
USE_PDFLATEX = NO
|
||||
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
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = "CGAL_USE_GMP CGAL_USE_QT" \
|
||||
"CGAL_BEGIN_NAMESPACE=namespace CGAL {" \
|
||||
CGAL_END_NAMESPACE=} \
|
||||
CGAL_USE_BOOST
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
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
|
||||
UML_LOOK = YES
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
.PHONY: all run test run-test demo examples clean update diff dep
|
||||
|
||||
|
||||
all: run-test examples demo
|
||||
|
||||
dep:
|
||||
$(MAKE) -C demo/Mesh_2 dep
|
||||
$(MAKE) -C examples/Surface_mesher dep
|
||||
|
||||
run-test:
|
||||
${MAKE} -C examples/Mesh_2 run
|
||||
${MAKE} -C test/Mesh_2 run
|
||||
|
||||
test:
|
||||
${MAKE} -C test/Mesh_2
|
||||
|
||||
examples:
|
||||
${MAKE} -C examples/Mesh_2
|
||||
|
||||
demo:
|
||||
${MAKE} -C demo/Mesh_2
|
||||
|
||||
run: all
|
||||
demo/Mesh_2/mesh_demo
|
||||
|
||||
doc:
|
||||
${MAKE} -C doc_tex
|
||||
|
||||
ps:
|
||||
${MAKE} -C doc_tex ps
|
||||
|
||||
doxygen:
|
||||
doxygen
|
||||
|
||||
# clean all object files
|
||||
clean:
|
||||
${MAKE} -C demo/Mesh_2 -f makefile clean
|
||||
${MAKE} -C test/Mesh_2 clean
|
||||
${MAKE} -C examples/Mesh_2 clean
|
||||
|
||||
dist-clean: clean
|
||||
find . -name '.#*' -exec rm \{\} \;
|
||||
find . -name '*~' -exec rm \{\} \;
|
||||
rm -rf doxygen
|
||||
|
||||
dist: dist-clean
|
||||
tar czfv /tmp/Mesh_2.tar.gz . --exclude=CVS --exclude=TODO \
|
||||
--exclude=wrapper.tex --exclude=dont_submit --exclude-from=dont_submit
|
||||
|
||||
# make update: update the working directory
|
||||
update:
|
||||
@svn -q update
|
||||
|
||||
# make diff: diff between the cvs repository and the working copy
|
||||
diff:
|
||||
@svn diff | less
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version = '1.0'?>
|
||||
<kdevelop>
|
||||
<general>
|
||||
<author>Laurent Rineau</author>
|
||||
<email>Laurent.Rineau@ens.fr</email>
|
||||
<version>$VERSION$</version>
|
||||
<projectmanagement>KDevCustomProject</projectmanagement>
|
||||
<primarylanguage>C++</primarylanguage>
|
||||
<ignoreparts>
|
||||
<part>KDevClearCase</part>
|
||||
<part>KDevPerforce</part>
|
||||
</ignoreparts>
|
||||
<projectdirectory>.</projectdirectory>
|
||||
<absoluteprojectpath>false</absoluteprojectpath>
|
||||
<description/>
|
||||
<secondaryLanguages/>
|
||||
</general>
|
||||
<kdevcustomproject>
|
||||
<run>
|
||||
<mainprogram/>
|
||||
<directoryradio>build</directoryradio>
|
||||
<customdirectory>/</customdirectory>
|
||||
<programargs/>
|
||||
<terminal>false</terminal>
|
||||
<autocompile>true</autocompile>
|
||||
<envvars/>
|
||||
</run>
|
||||
<build>
|
||||
<buildtool>make</buildtool>
|
||||
<builddir>demo/Mesh_2</builddir>
|
||||
</build>
|
||||
<make>
|
||||
<abortonerror>false</abortonerror>
|
||||
<numberofjobs>1</numberofjobs>
|
||||
<dontact>false</dontact>
|
||||
<makebin/>
|
||||
<selectedenvironment>with_boost</selectedenvironment>
|
||||
<environments>
|
||||
<default>
|
||||
<envvar value=" " name="DEBUG_OPT" />
|
||||
</default>
|
||||
<with_boost>
|
||||
<envvar value=" " name="DEBUG_OPT" />
|
||||
<envvar value="-DCGAL_USE_BOOST" name="OTHER_CXXFLAGS" />
|
||||
</with_boost>
|
||||
</environments>
|
||||
</make>
|
||||
</kdevcustomproject>
|
||||
<kdevdebugger>
|
||||
<general>
|
||||
<dbgshell/>
|
||||
<programargs/>
|
||||
<gdbpath/>
|
||||
<configGdbScript/>
|
||||
<runShellScript/>
|
||||
<runGdbScript/>
|
||||
<breakonloadinglibs>true</breakonloadinglibs>
|
||||
<separatetty>false</separatetty>
|
||||
<floatingtoolbar>false</floatingtoolbar>
|
||||
</general>
|
||||
<display>
|
||||
<staticmembers>false</staticmembers>
|
||||
<demanglenames>true</demanglenames>
|
||||
</display>
|
||||
</kdevdebugger>
|
||||
<kdevdoctreeview>
|
||||
<ignoretocs>
|
||||
<toc>ada</toc>
|
||||
<toc>ada_bugs_gcc</toc>
|
||||
<toc>bash</toc>
|
||||
<toc>bash_bugs</toc>
|
||||
<toc>clanlib</toc>
|
||||
<toc>fortran_bugs_gcc</toc>
|
||||
<toc>gnome1</toc>
|
||||
<toc>gnustep</toc>
|
||||
<toc>gtk</toc>
|
||||
<toc>gtk_bugs</toc>
|
||||
<toc>haskell</toc>
|
||||
<toc>haskell_bugs_ghc</toc>
|
||||
<toc>java_bugs_gcc</toc>
|
||||
<toc>java_bugs_sun</toc>
|
||||
<toc>kde2book</toc>
|
||||
<toc>libstdc++</toc>
|
||||
<toc>opengl</toc>
|
||||
<toc>pascal_bugs_fp</toc>
|
||||
<toc>php</toc>
|
||||
<toc>php_bugs</toc>
|
||||
<toc>perl</toc>
|
||||
<toc>perl_bugs</toc>
|
||||
<toc>python</toc>
|
||||
<toc>python_bugs</toc>
|
||||
<toc>qt-kdev3</toc>
|
||||
<toc>ruby</toc>
|
||||
<toc>ruby_bugs</toc>
|
||||
<toc>sdl</toc>
|
||||
<toc>stl</toc>
|
||||
<toc>sw</toc>
|
||||
<toc>w3c-dom-level2-html</toc>
|
||||
<toc>w3c-svg</toc>
|
||||
<toc>w3c-uaag10</toc>
|
||||
<toc>wxwidgets_bugs</toc>
|
||||
<toc>c++_bugs_gcc</toc>
|
||||
<toc>libc</toc>
|
||||
<toc>kdev3api</toc>
|
||||
</ignoretocs>
|
||||
<ignoreqt_xml>
|
||||
<toc>Guide to the Qt Translation Tools</toc>
|
||||
<toc>Qt Assistant Manual</toc>
|
||||
<toc>Qt Designer Manual</toc>
|
||||
<toc>Qt Reference Documentation</toc>
|
||||
<toc>qmake User Guide</toc>
|
||||
</ignoreqt_xml>
|
||||
<ignoredoxygen>
|
||||
<toc>KDE Libraries (Doxygen)</toc>
|
||||
</ignoredoxygen>
|
||||
<projectdoc>
|
||||
<userdocDir>doc_html</userdocDir>
|
||||
<apidocDir>doxygen/html/</apidocDir>
|
||||
</projectdoc>
|
||||
<ignorekdocs/>
|
||||
<ignoredevhelp/>
|
||||
</kdevdoctreeview>
|
||||
<kdevfilecreate>
|
||||
<filetypes/>
|
||||
<useglobaltypes>
|
||||
<type ext="cpp" />
|
||||
<type ext="h" />
|
||||
</useglobaltypes>
|
||||
</kdevfilecreate>
|
||||
<cppsupportpart>
|
||||
<filetemplates>
|
||||
<interfacesuffix>.h</interfacesuffix>
|
||||
<implementationsuffix>.C</implementationsuffix>
|
||||
</filetemplates>
|
||||
</cppsupportpart>
|
||||
<kdevcppsupport>
|
||||
<codecompletion>
|
||||
<includeGlobalFunctions>true</includeGlobalFunctions>
|
||||
<includeTypes>true</includeTypes>
|
||||
<includeEnums>true</includeEnums>
|
||||
<includeTypedefs>true</includeTypedefs>
|
||||
<automaticCodeCompletion>true</automaticCodeCompletion>
|
||||
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||
<codeCompletionDelay>250</codeCompletionDelay>
|
||||
<argumentsHintDelay>400</argumentsHintDelay>
|
||||
<headerCompletionDelay>250</headerCompletionDelay>
|
||||
</codecompletion>
|
||||
<references/>
|
||||
</kdevcppsupport>
|
||||
<kdevfileview>
|
||||
<groups>
|
||||
<group pattern="include/CGAL/*.h" name="headers" />
|
||||
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||
<hidenonlocation>false</hidenonlocation>
|
||||
</groups>
|
||||
<tree>
|
||||
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
|
||||
<showvcsfields>false</showvcsfields>
|
||||
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||
</tree>
|
||||
</kdevfileview>
|
||||
<kdevcvsservice>
|
||||
<recursivewhenupdate>true</recursivewhenupdate>
|
||||
<prunedirswhenupdate>true</prunedirswhenupdate>
|
||||
<createdirswhenupdate>true</createdirswhenupdate>
|
||||
<recursivewhencommitremove>true</recursivewhencommitremove>
|
||||
<revertoptions>-C</revertoptions>
|
||||
</kdevcvsservice>
|
||||
</kdevelop>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# KDevelop Custom Project File List
|
||||
demo/Mesh_2/conform.C
|
||||
demo/Mesh_2/icons.C
|
||||
demo/Mesh_2/icons.h
|
||||
demo/Mesh_2/mesh.C
|
||||
demo/Mesh_2/mesh_demo.C
|
||||
demo/Mesh_2/Qt_layer_show_circles.h
|
||||
demo/Mesh_2/Qt_layer_show_points.h
|
||||
demo/Mesh_2/Qt_layer_show_triangulation_constraints.h
|
||||
demo/Mesh_2/Qt_layer_show_triangulation.h
|
||||
demo/Mesh_2/Show_clusters.h
|
||||
examples/Mesh_2/conform.C
|
||||
examples/Mesh_2/conforming.C
|
||||
examples/Mesh_2/mesh_class.C
|
||||
examples/Mesh_2/mesh_global.C
|
||||
examples/Mesh_2/mesh_with_seeds.C
|
||||
include/CGAL/Conforming_Delaunay_triangulation_2.h
|
||||
include/CGAL/Conforming_Delaunay_triangulation_traits_2.h
|
||||
include/CGAL/Delaunay_mesh_2.h
|
||||
include/CGAL/Delaunay_mesh_area_traits_2.h
|
||||
include/CGAL/Delaunay_mesh_face_base_2.h
|
||||
include/CGAL/Delaunay_mesh_local_size_traits_2.h
|
||||
include/CGAL/Delaunay_mesh_size_traits_2.h
|
||||
include/CGAL/Delaunay_mesh_traits_2.h
|
||||
include/CGAL/Double_map.h
|
||||
include/CGAL/Filter_circulator.h
|
||||
include/CGAL/Filtered_container.h
|
||||
test/Mesh_2/test_filtred_container.C
|
||||
utils/Mesh_2/polygon2poly.C
|
||||
bench/bench.C
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
2d meshing package
|
||||
Ruppert meshing algorithm
|
||||
developped by Laurent Rineau
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
- Rewrite get_cluster. [done]
|
||||
- Use Compute_area_2 with three points instead of a triangle. [done]
|
||||
|
||||
- Implement a method to split all clusters at the beginnning.
|
||||
|
||||
- Histograms in the demo
|
||||
|
||||
- do not use default constructor of Geom_traits
|
||||
|
||||
- Rewrite Double_map.h [!]
|
||||
|
||||
- draw() called twice in mesh_demo [!]
|
||||
|
||||
Before CGAL-3.1:
|
||||
|
||||
- Update the hierachy if CDT is a CT_plus_2. [DELAYED]
|
||||
- [doc] concept CDT.
|
||||
- [doc] pictures [DONE]
|
||||
- [doc] document Compute_area_2 in a concept. It is used in
|
||||
Delaunay_mesh_criteria_2.
|
||||
- Fix clusters bug: the algorithm should ignore the Shewchuck rule when
|
||||
inserting point in a *big* triangle. [DONE]
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
# Created by the script cgal_create_makefile
|
||||
# This is the makefile for compiling a CGAL application.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# include platform specific settings
|
||||
#---------------------------------------------------------------------#
|
||||
# Choose the right include file from the <cgalroot>/make directory.
|
||||
|
||||
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
|
||||
include $(CGAL_MAKEFILE)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compiler flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
PROF_LD_FLAGS=-pg
|
||||
PROF_CXX_FLAGS=-pg
|
||||
|
||||
CXXFLAGS = -I../include \
|
||||
$(CGAL_CXXFLAGS) \
|
||||
$(LONG_NAME_PROBLEM_CXXFLAGS) \
|
||||
-DCGAL_IA_DONT_STOP_CONSTANT_PROPAGATION \
|
||||
-DCGAL_KERNEL_MEDIUM_INLINE=inline \
|
||||
-DCGAL_KERNEL_LARGE_INLINE=inline \
|
||||
-fprofile-arcs \
|
||||
-DNDEBUG \
|
||||
-mcpu=pentiumpro -march=pentiumpro \
|
||||
-DCGAL_NO_CONCEPT_CHECKING \
|
||||
$(DEBUG_OPT)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# linker flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
LIBPATH = \
|
||||
$(CGAL_LIBPATH)
|
||||
|
||||
LDFLAGS = $(CGAL_LDFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# target entries
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
all: \
|
||||
bench$(EXE_EXT)
|
||||
|
||||
bench$(EXE_EXT): bench$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)bench bench$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
bench-pg$(OBJ_EXT): bench.C
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(EXE_OPT)bench-pg$(OBJ_EXT) $(OBJ_OPT) $< $(PROF_CXX_FLAGS)
|
||||
|
||||
bench-pg$(EXE_EXT): bench-pg$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)bench-pg bench-pg$(OBJ_EXT) $(LDFLAGS) $(PROF_LD_FLAGS)
|
||||
|
||||
bench-pg.clean:
|
||||
rm -f bench-pg$(EXE_OPT) bench-pg$(OBJ_OPT)
|
||||
|
||||
clean: \
|
||||
bench.clean bench-pg.clean
|
||||
rm -f *.bb *.da *.bbg
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# suffix rules
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
.C$(OBJ_EXT):
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
#include <CGAL/basic.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include <CGAL/Timer.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Filtered_kernel.h>
|
||||
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
|
||||
#include <CGAL/Delaunay_mesher_2.h>
|
||||
#include <CGAL/Delaunay_mesh_face_base_2.h>
|
||||
#include <CGAL/Delaunay_mesh_area_criteria_2.h>
|
||||
|
||||
#include <CGAL/IO/File_poly.h>
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> K1;
|
||||
typedef CGAL::Filtered_kernel<K1> K2;
|
||||
|
||||
#ifdef USE_FILTRED
|
||||
struct K: public K2 {};
|
||||
#else
|
||||
struct K : public K1 {};
|
||||
#endif
|
||||
|
||||
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
|
||||
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> Tr;
|
||||
typedef CGAL::Delaunay_mesh_area_criteria_2<Tr> Mesh_criteria;
|
||||
|
||||
typedef CGAL::Delaunay_mesher_2<Tr, Mesh_criteria> Mesher;
|
||||
|
||||
typedef K::Point_2 Point;
|
||||
|
||||
void usage(char** argv)
|
||||
{
|
||||
std::cerr << "Usage: " << std::endl
|
||||
<< argv[0] << " [-Q] [-a area] input.poly" << std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int arg_count = 1;
|
||||
bool terminal_output = true;
|
||||
|
||||
Tr tr;
|
||||
|
||||
Mesher mesher(tr);
|
||||
|
||||
Mesh_criteria criteria;
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
while(argv[arg_count][0] == '-' && argv[arg_count] != "--")
|
||||
{
|
||||
if(std::string(argv[arg_count]) == "-Q")
|
||||
terminal_output = false;
|
||||
else if(std::string(argv[arg_count]) == "-a")
|
||||
{
|
||||
double area_bound;
|
||||
if( (argc > arg_count+1) &&
|
||||
std::istringstream(argv[arg_count+1]) >> area_bound )
|
||||
{
|
||||
criteria.set_area_bound(area_bound);
|
||||
++arg_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "The area " << argv[arg_count+1]
|
||||
<< " is not a double." << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Unknown option " << argv[arg_count] << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
++arg_count;
|
||||
}
|
||||
if(argv[arg_count] == "--")
|
||||
++arg_count;
|
||||
|
||||
if(argc < arg_count+1 || argc > arg_count+2)
|
||||
{
|
||||
usage(argv);
|
||||
return 1;
|
||||
};
|
||||
std::ifstream input(argv[arg_count]);
|
||||
if(input)
|
||||
{
|
||||
CGAL::Timer t;
|
||||
t.start();
|
||||
CGAL::read_triangle_poly_file(tr, input);
|
||||
t.stop();
|
||||
if(terminal_output)
|
||||
std::cout << "Delaunay time: " << t.time() << std::endl;
|
||||
|
||||
mesher.set_criteria(criteria);
|
||||
|
||||
t.reset(); t.start();
|
||||
mesher.refine_mesh();
|
||||
t.stop();
|
||||
if(terminal_output)
|
||||
std::cout << "Meshing time: " << t.time() << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Bad file: " << argv[arg_count] << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(argc==arg_count+1)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ofstream output(argv[arg_count+1]);
|
||||
CGAL::write_triangle_poly_file(tr, output);
|
||||
}
|
||||
if(terminal_output)
|
||||
std::cout
|
||||
<< "Mesh points: " << tr.number_of_vertices() << std::endl
|
||||
<< "Mesh triangles: " << tr.number_of_faces () << std::endl;
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# Shewchuk Triangle .poly file, produced by the CGAL::Mesh_2 package
|
||||
# Neither attributes nor boundary markers are used.
|
||||
4 2 0 0
|
||||
|
||||
1 2.2 -2.4
|
||||
2 2 2
|
||||
3 -2 2
|
||||
4 -2 -2
|
||||
|
||||
4 0
|
||||
1 2 3
|
||||
2 2 1
|
||||
3 4 1
|
||||
4 4 3
|
||||
|
||||
0
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# Shewchuk Triangle .poly file, produced by the CGAL::Mesh_2 package
|
||||
# Neither attributes nor boundary markers are used.
|
||||
4 2 0 0
|
||||
|
||||
1 2 -2
|
||||
2 2 2
|
||||
3 -2 2
|
||||
4 -2 -2
|
||||
|
||||
4 0
|
||||
1 2 3
|
||||
2 2 1
|
||||
3 4 1
|
||||
4 4 3
|
||||
|
||||
0
|
||||
|
|
@ -0,0 +1,310 @@
|
|||
6 June 2006 Laurent Rineau
|
||||
- merge trunk modifications into the branch "cannot_wait_for_CGAL-3.2"
|
||||
I will copy the branch into the trunk.
|
||||
|
||||
Here are the changes:
|
||||
20 April 2006 Laurent Rineau
|
||||
- small changes in the user manual:
|
||||
- change captions location
|
||||
- fix typos and bad english
|
||||
(thanks to Pierre Alliez)
|
||||
- fix a typo in doc_tex/Mesh_2_ref/Delaunay_mesh_*criteria_2.tex :
|
||||
(1/2B instead of 1/4B^2)
|
||||
|
||||
13 April 2006 Laurent Rineau
|
||||
- added test_conforming and test_meshing in test/ with test files.
|
||||
- rename test/Mesh_2/makefile to GNUmakefile, not submitted:
|
||||
makefiles in the testsuite are generated.
|
||||
- fix a BUG in Mesher_level: one_step() and try_to_insert_one_point(), in
|
||||
Null_mesher_level must return false! This fix solves the "follow under
|
||||
mouse" bug of mesh_demo.C!
|
||||
- change some DEBUG macro names to:
|
||||
CGAL_MESH_2_DEBUG_BAD_FACES
|
||||
CGAL_MESH_2_DEBUG_CLUSTERS
|
||||
CGAL_MESH_2_DEBUG_CONFLICTS_ZONE
|
||||
CGAL_MESH_2_DEBUG_DRAW
|
||||
CGAL_MESH_2_DEBUG_INSERTIONS
|
||||
CGAL_MESH_2_VERBOSE
|
||||
to please CGAL developer manual.
|
||||
- add a seed in fish.poly
|
||||
|
||||
30 April 2006 Laurent Rineau
|
||||
(fix only in the branch "cannot_wait_for_CGAL-3.2")
|
||||
- Fix for a bug leading to a crash, if the mesh criteria are too strong.
|
||||
The algorithm will now inter into an infinite loop, instead of crashing
|
||||
Delaunay_triangulation_2. It seems safer in a way.
|
||||
- CGAL-3.2 is too close: it will be submitted to CGAL-3.2.1 only.
|
||||
|
||||
20 March 2006 Laurent Rineau
|
||||
- fix a desynch between the doc and code: is_marked->is_in_domain, in the
|
||||
face base type
|
||||
|
||||
26 Febraury 2006 Laurent Rineau
|
||||
- Move the internal header
|
||||
include/CGAL/Mesh_3/Triangulation_mesher_level_traits_3.h to Mesh_2.
|
||||
|
||||
|
||||
16 November 2005 Laurent Rineau
|
||||
- added copy constructor and operator= in CGAL::Double_map
|
||||
- check them in test/Mesh_2/test_double_map.C
|
||||
|
||||
9 May 2005 Laurent Rineau
|
||||
- new (and last) optimization (for the moment) of Double_map
|
||||
- added a test for Double_map!
|
||||
- include/CGAL/Mesher_level.h splitted into:
|
||||
include/CGAL/Mesher_level.h
|
||||
include/CGAL/Mesher_level_default_implementations.h
|
||||
include/CGAL/Mesher_level_visitors.h
|
||||
- new class Combine_mesh_visitor in include/CGAL/Mesher_level_visitors.h
|
||||
- fixed a stupid bug introduced 09-Feb-2005 in
|
||||
include/CGAL/Mesh_2/Refine_edges_with_clusters.h
|
||||
|
||||
|
||||
23 March 2005 Laurent Rineau
|
||||
- conflicts_zone_impl requirements have changed
|
||||
|
||||
8 March 2005 Laurent Rineau
|
||||
- new Double_map.h
|
||||
|
||||
28 February 2005 Laurent Rineau
|
||||
- Added macro CGAL_MESH_2_DEBUG_DRAW and Debug_layer.h in mesh_demo, to debug
|
||||
calls to widget->redraw(). Not activated by default.
|
||||
|
||||
8 February 2005 Laurent Rineau
|
||||
- CHANGES to Mesher_level:
|
||||
- enum Mesher_level_conflict_status instead of std::map<bool, bool>.
|
||||
- new template parameters for Mesher_level
|
||||
- new Mesher_level function names:
|
||||
- Tr& triangulation_ref_impl()
|
||||
- Vertex_handle insert_impl(p, z)
|
||||
- Zone conflicts_zone_impl(p)
|
||||
- void scan_triangulation_impl()
|
||||
- bool no_longer_element_to_refine_impl()
|
||||
- Element get_next_element_impl()
|
||||
- void pop_next_element_impl()
|
||||
- Point refinement_point_impl(e)
|
||||
- void before_conflicts_impl(e, p)
|
||||
- Mesher_level_conflict_status private_test_point_conflict_impl(p, zone)
|
||||
- Mesher_level_conflict_status
|
||||
test_point_conflict_from_superior_impl(p, zone)
|
||||
- void before_insertion_impl(e, p, zone)
|
||||
- void after_insertion_impl(vh)
|
||||
- void after_no_insertion_impl(e, p, zone)
|
||||
- new class in Mesher_level.h for default implementations:
|
||||
- class Triangulation_ref_impl
|
||||
- No_private_test_point_conflict
|
||||
- No_test_point_conflict_from_superior
|
||||
- No_test_point_conflict :
|
||||
- No_before_insertion
|
||||
- No_after_insertion
|
||||
- No_after_no_insertion
|
||||
- No_before_after_insertion
|
||||
|
||||
18 January 2005 Laurent Rineau
|
||||
- new Qt_widget_style_editor implementation
|
||||
- demoicon.xpm in the demo
|
||||
- remove some cerr outputs
|
||||
|
||||
11 December 2004 Laurent Rineau
|
||||
- new dialog in mesh_demo, to set up layer properties
|
||||
- fix documentation
|
||||
- NEW: pictures in the documentation
|
||||
|
||||
17 November 2004 Laurent Rineau
|
||||
- fix for g++-3.4
|
||||
- fix Delaunay_mesh_area_2 which was broken
|
||||
- fix warnings in demo/Mesh_2/ layers
|
||||
|
||||
16 November 2004 Laurent Rineau
|
||||
- fix documentation
|
||||
- enum Face_badness { NOT_BAD, BAD, IMPERATIVELY_BAD }; and modified
|
||||
specifications for MeshingCriteria_2, to refines too small faces near
|
||||
clusters.
|
||||
|
||||
22 October 2004 Laurent Rineau
|
||||
- fix two typo bugs in the testsuite
|
||||
|
||||
21 October 2004 Laurent Rineau
|
||||
- Yet another killed bug!! :-) The minimum sine of triangle was badly
|
||||
computed.
|
||||
- Refine_faces forgot to scan for bad faces the star of the new vertex.
|
||||
|
||||
20 October 2004 Laurent Rineau
|
||||
- fixed details in Delaunay_mesh_size_criteria_2.h
|
||||
and marked todo and warning
|
||||
|
||||
19 October 2004 Laurent Rineau
|
||||
- Revert changes from 2004/10/17. Refine_edges_for_refine_faces no
|
||||
longer exists. The conflicts zone of a point is calculated by using
|
||||
propagate_conflicts(), from the CDT. For that, Refine_edges uses a
|
||||
special Triangulation_mesher_level_traits_2.
|
||||
- Special_zone is now useless.
|
||||
- That's it: the bug is over!!
|
||||
- Mesh_level no wants a function get_triangulation_traits() that
|
||||
returns a reference to the Triangulation_mesher_level_traits. THAT
|
||||
BREAKS COMPATIBILTY with previous codes.
|
||||
- The special traits class
|
||||
Refine_edges_triangulation_mesher_level_traits_2 has a function to
|
||||
set the current edge. This function is used to pass the edge to it,
|
||||
so that get_conflicts_zone() can work.
|
||||
|
||||
18 October 2004 Laurent Rineau
|
||||
- Conforming_Delaunay_triangulation_maker_2 renamed to
|
||||
Triangulation_conformer_2.
|
||||
- Update of the documentation. Thanks to Michel Hoffman for his review of
|
||||
the specifications
|
||||
|
||||
17 October 2004 Laurent Rineau
|
||||
- Attempt to fix remaining bug: the list of faces modified by the insertion
|
||||
of a point on a segment is not the conflicts zone of the
|
||||
point. remove_constrained_edge() and insert_constraint() flip some faces. I
|
||||
have added a class Refine_edges_for_refine_faces that handles a special
|
||||
member special_zone (bad name) which is a set of
|
||||
faces. do_before_conflict() and do_after_insertion() deal with functions
|
||||
remove_constrained_edge() and insert_contraint() and fill the set
|
||||
special_zone. The visitor Refine_edges_visitor uses this set to remove
|
||||
those faces from bad_faces in after_insertion() (before the two
|
||||
sub-segments are added back by Refine_edges::do_after_insertion().
|
||||
- However, this attempt fails! Seems that adding back the two
|
||||
subconstraints intersects some other constrained edges already in the
|
||||
triangulation.
|
||||
|
||||
12 October 2004 Laurent Rineau
|
||||
- Added parents and names to every layers, so that Qt releases the memory.
|
||||
- Added debugging functions in Delaunay_mesher_2, and new debugging
|
||||
layers and buttons tools into demo/Mesh_2/mesh_demo. These functions are
|
||||
not documented.
|
||||
- CGAL::Mesh_2::Refine_edges now has Tr::Edge has Element type. It
|
||||
decreases number of calls to Tr::is_edge().
|
||||
- Removed debugging outputs to std::cerr.
|
||||
- The step by step demo now display the edge of the face that will be refined.
|
||||
- Modified Mesh_2::Clusters::get_cluster and Mesh_2::Clusters::update_clusters
|
||||
to fix a bug in debugging functions (can we call that a "meta-bug"?).
|
||||
- Added a function check_bad_faces() in Refine_faces. For the moment, it
|
||||
checks that no bad face has three collinear vertices. It is used in a
|
||||
CGAL_expensive_assertion.
|
||||
|
||||
6 October 2004 Laurent Rineau
|
||||
- Patch for gcc-3.4
|
||||
|
||||
29 September 2004 Laurent Rineau
|
||||
- New code
|
||||
- New layers in mesh_demo
|
||||
|
||||
30 August 2004 Laurent Rineau
|
||||
- New specifications.
|
||||
|
||||
17 August 2004 Laurent Rineau
|
||||
- Use namespace CGAL instead of CGAL_NAMESPACE_BEGIN/END.
|
||||
- Insertion in an edge now reinstert the two sub-constraints, instead of
|
||||
using insert with Locate_type==EDGE.
|
||||
- Boost iterators have changed.
|
||||
|
||||
09 August 2004 Andreas Fabri
|
||||
Removed semicolons after closing parenthesis of functions, as they make problems for SunProCC
|
||||
|
||||
22 July 2004 Laurent Rineau
|
||||
- patch a bug in Delaunay_mesh_2<Tr>: virtual_insert_in_the_edge was
|
||||
forcing the insertion of a point on a EDGE.
|
||||
|
||||
4 July 2004 Andreas Fabri
|
||||
- In Delaunay_mesh_2: Removed const& on an object in a stack that gets popped before it gets used
|
||||
|
||||
1 July 2004 Laurent Rineau
|
||||
- Added Extras in Delaunay_mesh_2<Tr, Extras> too.
|
||||
|
||||
28 June 2004 Laurent Rineau
|
||||
- Move mark_facets functions from Delaunay_mesh_2 to
|
||||
Conforming_Delaunay_triangulation_2.
|
||||
- Added a sort of hooks, through a template parameter "Extras", in
|
||||
Conforming_Delaunay_triangulation_2<Tr, Extras>. There is a default
|
||||
template argument that does nothing.
|
||||
These hooks help doing actions when points are inserted. Used in the
|
||||
package Mesh_3.
|
||||
|
||||
17 May 2004 Menelaos Karavelas
|
||||
- replaced Point by Point_2 in the demo in order to resolve clash with
|
||||
the Mac version of Qt
|
||||
|
||||
6 May 2000 Laurent Rineau
|
||||
- workaround for CC-5.xx, in include/CGAL/Delaunay_mesh_2.h
|
||||
|
||||
3 April 2004 Sylvain Pion
|
||||
- Regenerate demo/example makefiles to remove debug options,
|
||||
which makes PGCC pass.
|
||||
|
||||
Version 1.0.2 (10 February 2004) [rursu]
|
||||
- Updated headers in examples
|
||||
|
||||
version 1.0.1 (2003/12/07) [Laurent]
|
||||
--------------------------
|
||||
Submit the documentation too.
|
||||
|
||||
version 1.0.0 (2003/12/07) [Laurent]
|
||||
--------------------------
|
||||
o Bix Conforming_Delaunay_triangulation_2 where a typename was missing.
|
||||
o bench/bench.C now compile again.
|
||||
o I think this version can be named 1.0.0 now.
|
||||
|
||||
version 0.9.5 (2003/11/28) [Laurent]
|
||||
--------------------------
|
||||
o Fix the deprecated use of RIGHTTURN in conforming.
|
||||
|
||||
version 0.9.4 (2003/11/5) [Laurent]
|
||||
--------------------------
|
||||
o submitted to the testsuite
|
||||
|
||||
version 0.9.4 (2003/10/9) [af]
|
||||
--------------------------
|
||||
o Bug fix in Is_locally_conforming_Gabriel and in Is_locally_conforming_Delaunay
|
||||
o Removed redundant tests
|
||||
|
||||
version 0.9.4
|
||||
--------------------------
|
||||
o All names have changed.
|
||||
o new concepts ConformingDelaunayTriangulationTraits_2 and
|
||||
ConformingDelaunayTriangulationTraits_2
|
||||
o New internals and interface for Delaunay_mesh_2 and
|
||||
Conforming_Delaunay_triangulation_2
|
||||
o updated documentation
|
||||
o various changes in examples/ and demo/
|
||||
|
||||
version 0.9.3 (2003/05/10)
|
||||
--------------------------
|
||||
o internal release
|
||||
o split of the code into Mesh_2 and Conform_2
|
||||
o the demo mesh_demo can now displays clusters
|
||||
o updated documentation (which is not really sync with the code)
|
||||
o the interface of the demo has been improved
|
||||
|
||||
version 0.9.2 (2003/03/12)
|
||||
--------------------------
|
||||
o added a bench sub-directory
|
||||
o fixed some gcc-3.2.1 compilation errors
|
||||
o changes in the demo:
|
||||
- added a panel next to the widget, that shows currently the number of points
|
||||
- added a step actions'toolbar, improved with new buttons
|
||||
- fix some bugs
|
||||
o changes in the example:
|
||||
- added some "Triangle-like" options
|
||||
o changes in Mesh_2.h:
|
||||
- fix compilation errors with gcc-3.2.1
|
||||
- fix compilation errors when the number type is not double
|
||||
- the bound on size is no longer a squared distance
|
||||
|
||||
version 0.9.1 (2002/08/26)
|
||||
--------------------------
|
||||
o some code cleaning
|
||||
o some bug fixes in the demo
|
||||
o changes from Andreas Fabri, so that it works with VC++, and BCC:
|
||||
- Added many const&
|
||||
- insert(Point, Point) -> insert_constraint to make it work
|
||||
with the Triangulation_hierarchy
|
||||
- Added some typename
|
||||
- std::queue only works with std::list not with std::deque on VC++6
|
||||
o added this file
|
||||
o move Double_map.h in this package to remove dependency to Mesh_3
|
||||
|
||||
version 0.9 (2002/07/?)
|
||||
-----------------------
|
||||
first release
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright (c) 2005 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef CGAL_DEBUG_LAYER_H
|
||||
#define CGAL_DEBUG_LAYER_H
|
||||
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
class Debug_layer : public Qt_widget_layer
|
||||
{
|
||||
std::ostream& stream;
|
||||
|
||||
public:
|
||||
|
||||
Debug_layer(std::ostream& s = std::cerr) : stream(s)
|
||||
{
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
stream << "redraw()" << std::endl;
|
||||
}
|
||||
}; // end class Debug_layer
|
||||
|
||||
} // end namespace CGAL
|
||||
|
||||
#endif // CGAL_DEBUG_LAYER_H
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
include makefile
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
#
|
||||
# dependencies
|
||||
#
|
||||
# if you want deps, create a file my_makefile that contains
|
||||
# -include depends
|
||||
#
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
-include my_makefile
|
||||
|
||||
dep:
|
||||
rm depends; $(MAKE) depends
|
||||
|
||||
.PHONY: dep
|
||||
|
||||
|
||||
depends: *.C
|
||||
cat /dev/null > depends
|
||||
for f in *.C; do \
|
||||
echo >> depends; \
|
||||
echo >> depends; \
|
||||
echo "$${f%.C}$(OBJ_EXT): \\" >> depends; \
|
||||
$(CGAL_CXX) $(CXXFLAGS) -M -MG $$f \
|
||||
| grep '\.\./\.\..*/include/CGAL' >> depends; \
|
||||
done
|
||||
test -f depends
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef CGAL_QT_LAYER_SHOW_CIRCLES_H
|
||||
#define CGAL_QT_LAYER_SHOW_CIRCLES_H
|
||||
|
||||
#include <CGAL/Circle_2.h>
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
#include <CGAL/Triangulation_2.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <qobject.h>
|
||||
#include <qcolor.h>
|
||||
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
// T::Geom_traits has to be a CGAL kernel!
|
||||
template <class T>
|
||||
class Qt_layer_show_circles : public Qt_widget_layer {
|
||||
public:
|
||||
typedef typename T::Point Point;
|
||||
typedef typename T::Segment Segment;
|
||||
typedef typename T::Finite_faces_iterator Finite_faces_iterator;
|
||||
typedef typename T::Locate_type Locate_type;
|
||||
typedef typename T::Face_handle Face_handle;
|
||||
typedef typename T::Geom_traits GT;
|
||||
typedef typename GT::Circle_2 Circle;
|
||||
typedef typename GT::FT FT;
|
||||
|
||||
Qt_layer_show_circles(T* t,
|
||||
CGAL::Color c = CGAL::GRAY,
|
||||
int linewidth = 1,
|
||||
CGAL::Color fill_color = CGAL::WHITE,
|
||||
bool filled = false,
|
||||
QObject* parent = 0, const char* name = 0) :
|
||||
Qt_widget_layer(parent, name),
|
||||
tr(t), do_erase(false), color(c), width(linewidth),
|
||||
fillcolor(fill_color), fill(filled) {};
|
||||
|
||||
void draw()
|
||||
{
|
||||
Qt_widget_layer::draw();
|
||||
do_erase = false;
|
||||
};
|
||||
|
||||
void mousePressEvent(QMouseEvent* e)
|
||||
{
|
||||
if (tr->dimension()<1) return;
|
||||
FT
|
||||
x=static_cast<FT>(widget->x_real(e->x())),
|
||||
y=static_cast<FT>(widget->y_real(e->y()));
|
||||
|
||||
Point p(x,y);
|
||||
|
||||
int li;
|
||||
Locate_type lt;
|
||||
Face_handle fh = tr->locate(p,lt,li);
|
||||
if(lt == T::FACE)
|
||||
draw_circle(fh);
|
||||
};
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
if (tr->dimension()<1) return;
|
||||
FT
|
||||
x=static_cast<FT>(widget->x_real(e->x())),
|
||||
y=static_cast<FT>(widget->y_real(e->y()));
|
||||
|
||||
Point p(x,y);
|
||||
|
||||
int li;
|
||||
Locate_type lt;
|
||||
Face_handle fh = tr->locate(p,lt,li);
|
||||
if(lt == T::FACE)
|
||||
{
|
||||
if(fh!=old_face)
|
||||
{
|
||||
widget->lock();
|
||||
|
||||
if(do_erase) draw_circle(old_face);
|
||||
draw_circle(fh);
|
||||
old_face=fh;
|
||||
|
||||
widget->unlock();
|
||||
do_erase=true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(do_erase)
|
||||
draw_circle(old_face);
|
||||
do_erase=false;
|
||||
}
|
||||
};
|
||||
|
||||
void leaveEvent(QEvent* e)
|
||||
{
|
||||
Qt_widget_layer::leaveEvent(e);
|
||||
if (tr->dimension()<1) return;
|
||||
if(do_erase)
|
||||
draw_circle(old_face);
|
||||
};
|
||||
|
||||
private:
|
||||
void draw_circle(const Face_handle& fh) const
|
||||
{
|
||||
RasterOp oldRaster = widget->rasterOp();
|
||||
QColor oldcolor = widget->color();
|
||||
QColor oldFillColor = widget->fillColor();
|
||||
int oldwidth = widget->lineWidth();
|
||||
bool oldFilled = widget->isFilled();
|
||||
|
||||
*widget << color;
|
||||
*widget << LineWidth(width) << FillColor(fillcolor);
|
||||
widget->setFilled(fill);
|
||||
widget->get_painter().setRasterOp(NotROP);
|
||||
|
||||
Point v=((*fh).vertex(0))->point();
|
||||
Point c=tr->circumcenter(fh);
|
||||
|
||||
*widget << Circle(c,squared_distance(v,c));
|
||||
widget->setColor(oldcolor);
|
||||
widget->setLineWidth(oldwidth);
|
||||
widget->setFillColor(oldFillColor);
|
||||
widget->setFilled(oldFilled);
|
||||
widget->setRasterOp(oldRaster);
|
||||
widget->do_paint();
|
||||
}
|
||||
|
||||
T* tr;
|
||||
Face_handle old_face;
|
||||
bool do_erase;
|
||||
|
||||
CGAL::Color color;
|
||||
int width;
|
||||
CGAL::Color fillcolor;
|
||||
bool fill;
|
||||
};//end class
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_QT_LAYER_SHOW_CIRCLES_H
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef CGAL_QT_LAYER_SHOW_TRIANGULATION_H
|
||||
#define CGAL_QT_LAYER_SHOW_TRIANGULATION_H
|
||||
|
||||
#include "Qt_widget_styled_layer.h"
|
||||
#include <CGAL/IO/Qt_widget_Triangulation_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class T>
|
||||
class Qt_layer_show_triangulation : public Qt_widget_styled_layer
|
||||
{
|
||||
public:
|
||||
|
||||
Qt_layer_show_triangulation(T *t,
|
||||
CGAL::Color lc = CGAL::BLUE,
|
||||
int linewidth = 1,
|
||||
QObject* parent = 0, const char* name = 0)
|
||||
: Qt_widget_styled_layer(0, parent, name),
|
||||
tr(t)
|
||||
{
|
||||
color="Color";
|
||||
width="Line width";
|
||||
|
||||
setColor(QColor(lc.red(), lc.green(), lc.blue()));
|
||||
setLineWidth(linewidth);
|
||||
};
|
||||
|
||||
void setColor(QColor c)
|
||||
{ style()->setColor(color, c); }
|
||||
|
||||
void setLineWidth(int line_width)
|
||||
{ style()->setInt(width, line_width); }
|
||||
|
||||
void draw()
|
||||
{
|
||||
QColor old_color = widget->color();
|
||||
int old_width = widget->lineWidth();
|
||||
|
||||
widget->setColor(style()->getColor(color));
|
||||
widget->setLineWidth(style()->getInt(width));
|
||||
|
||||
*widget << *tr;
|
||||
|
||||
widget->setLineWidth(old_width);
|
||||
widget->setColor(old_color);
|
||||
};
|
||||
|
||||
private:
|
||||
T *tr;
|
||||
QString color;
|
||||
QString width;
|
||||
};//end class
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_QT_LAYER_SHOW_TRIANGULATION_H
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef CGAL_QT_LAYER_SHOW_TRIANGULATION_CONSTRAINTS_H
|
||||
#define CGAL_QT_LAYER_SHOW_TRIANGULATION_CONSTRAINTS_H
|
||||
|
||||
#include "Qt_widget_styled_layer.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class T>
|
||||
class Qt_layer_show_triangulation_constraints
|
||||
: public Qt_widget_styled_layer
|
||||
{
|
||||
public:
|
||||
|
||||
Qt_layer_show_triangulation_constraints(T *t,
|
||||
CGAL::Color lc = CGAL::RED,
|
||||
int linewidth = 1,
|
||||
QObject* parent = 0,
|
||||
const char* name = 0)
|
||||
: Qt_widget_styled_layer(0, parent, name), tr(t)
|
||||
{
|
||||
color="Color";
|
||||
width="Line width";
|
||||
|
||||
setColor(QColor(lc.red(), lc.green(), lc.blue()));
|
||||
setLineWidth(linewidth);
|
||||
};
|
||||
|
||||
void setColor(QColor c)
|
||||
{ style()->setColor(color, c); }
|
||||
|
||||
void setLineWidth(int line_width)
|
||||
{ style()->setInt(width, line_width); }
|
||||
|
||||
void draw()
|
||||
{
|
||||
widget->lock();
|
||||
|
||||
QColor old_color = widget->color();
|
||||
int old_width = widget->lineWidth();
|
||||
|
||||
widget->setColor(style()->getColor(color));
|
||||
widget->setLineWidth(style()->getInt(width));
|
||||
|
||||
for(typename T::Edge_iterator it=tr->edges_begin();
|
||||
it!=tr->edges_end();
|
||||
it++)
|
||||
if(tr->is_constrained(*it))
|
||||
*widget << tr->segment(*it);
|
||||
|
||||
widget->setLineWidth(old_width);
|
||||
widget->setColor(old_color);
|
||||
widget->unlock();
|
||||
};
|
||||
|
||||
private:
|
||||
T *tr;
|
||||
QString color;
|
||||
QString width;
|
||||
};//end class
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // CGAL_QT_LAYER_SHOW_TRIANGULATION_CONSTRAINTS_H
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H
|
||||
#define CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H
|
||||
|
||||
#include <qcolor.h>
|
||||
#include <qcolordialog.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qscrollview.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
class Color_selector : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Color_selector(QColor c = Qt::black,
|
||||
QWidget* parent = 0, const char* name = 0)
|
||||
: QPushButton(parent, name)
|
||||
{
|
||||
setColor(c);
|
||||
connect(this, SIGNAL(clicked()),
|
||||
this, SLOT(color_dialog()) );
|
||||
}
|
||||
|
||||
virtual ~Color_selector() {};
|
||||
|
||||
QColor value() const
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void setColor(QColor c)
|
||||
{
|
||||
color = c;
|
||||
|
||||
QPixmap pix(24,20);
|
||||
pix.fill(c);
|
||||
setPixmap(pix);
|
||||
|
||||
emit newColor(c);
|
||||
}
|
||||
|
||||
signals:
|
||||
void newColor(QColor);
|
||||
|
||||
private slots:
|
||||
void color_dialog()
|
||||
{
|
||||
QColor c = QColorDialog::getColor(value());
|
||||
if( c.isValid() )
|
||||
setColor(c);
|
||||
}
|
||||
|
||||
private:
|
||||
QColor color;
|
||||
};
|
||||
|
||||
class Int_selector : public QSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Int_selector(int i, QWidget *parent = 0, const char *name = 0)
|
||||
: QSpinBox(-INT_MAX, INT_MAX, 1, parent, name)
|
||||
{
|
||||
setValue(i);
|
||||
}
|
||||
|
||||
virtual ~Int_selector() {};
|
||||
};
|
||||
|
||||
class Bool_selector : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Bool_selector(bool b_, QWidget *parent = 0, const char *name = 0)
|
||||
: QComboBox(false, parent, name)
|
||||
{
|
||||
insertItem("False");
|
||||
insertItem("True");
|
||||
|
||||
if(b_)
|
||||
setCurrentItem(1);
|
||||
else
|
||||
setCurrentItem(0);
|
||||
}
|
||||
|
||||
virtual ~Bool_selector() {};
|
||||
|
||||
bool value() const
|
||||
{
|
||||
return currentItem() == 1;
|
||||
}
|
||||
};
|
||||
|
||||
class Point_style_selector : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef ::CGAL::PointStyle PointStyle;
|
||||
Point_style_selector(PointStyle s,
|
||||
QWidget *parent = 0, const char *name = 0)
|
||||
: QComboBox(false, parent, name)
|
||||
{
|
||||
insertItem("Pixel");
|
||||
insertItem("Cross");
|
||||
insertItem("Plus");
|
||||
insertItem("Circle");
|
||||
insertItem("Disc");
|
||||
insertItem("Rect");
|
||||
insertItem("Box");
|
||||
|
||||
setCurrentItem(static_cast<int>(s));
|
||||
}
|
||||
|
||||
virtual ~Point_style_selector() {};
|
||||
|
||||
PointStyle value() const
|
||||
{
|
||||
return PointStyle(currentItem());
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
#ifdef CGAL_USE_QT
|
||||
|
||||
#include "Qt_widget_style_editor.h"
|
||||
#include "Qt_widget_style_editor-aux.h"
|
||||
|
||||
#include <qcolor.h>
|
||||
#include <qlabel.h>
|
||||
#include <qvbox.h>
|
||||
#include <qhbox.h>
|
||||
#include <qlayout.h>
|
||||
#include <qgrid.h>
|
||||
#include <qvariant.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
Qt_widget_style_editor::Qt_widget_style_editor(Style* style,
|
||||
QWidget *parent,
|
||||
const char *name)
|
||||
: QFrame(parent, name), style(style)
|
||||
{
|
||||
typedef Style::const_iterator iterator;
|
||||
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->addColSpacing(1,5);
|
||||
|
||||
const int labels_col = 0; // column number of labels
|
||||
const int selectors_col = 2; // column number of selectors
|
||||
|
||||
int row = 0;
|
||||
for(iterator it=style->begin();
|
||||
it != style->end();
|
||||
++it)
|
||||
{
|
||||
QLabel* label = new QLabel( it.key(), this);
|
||||
layout->addWidget(label, row, labels_col);
|
||||
|
||||
QWidget* selector = 0;
|
||||
switch( it.data().type() ) {
|
||||
case QVariant::Color:
|
||||
selector = new Color_selector(it.data().toColor(), this);
|
||||
connect(selector, SIGNAL(newColor(QColor)),
|
||||
this, SLOT(map(QColor)));
|
||||
break;
|
||||
case QVariant::Int:
|
||||
selector = new Int_selector(it.data().toInt(), this);
|
||||
connect(selector, SIGNAL(valueChanged(int)),
|
||||
this, SLOT(map(int)));
|
||||
break;
|
||||
case QVariant::Bool:
|
||||
selector = new Bool_selector(it.data().toBool(),
|
||||
this);
|
||||
connect(selector, SIGNAL(toggled(bool)),
|
||||
this, SLOT(map(bool)));
|
||||
break;
|
||||
case QVariant::UInt:
|
||||
selector =
|
||||
new Point_style_selector(PointStyle(it.data().toUInt()),
|
||||
this);
|
||||
connect(selector, SIGNAL(activated(int)),
|
||||
this, SLOT(pointstyle(int)));
|
||||
break;
|
||||
default:
|
||||
CGAL_assertion(false);
|
||||
break;
|
||||
}
|
||||
|
||||
mapper[selector]=it.key();
|
||||
|
||||
layout->addWidget(selector, row, selectors_col);
|
||||
|
||||
++row;
|
||||
}
|
||||
}
|
||||
|
||||
void Qt_widget_style_editor::map(QColor c)
|
||||
{
|
||||
const QObject* s = sender();
|
||||
if( mapper.contains(s) )
|
||||
style->setColor(mapper[s], c);
|
||||
emit styleChanged();
|
||||
}
|
||||
|
||||
void Qt_widget_style_editor::map(int i)
|
||||
{
|
||||
const QObject* s = sender();
|
||||
if( mapper.contains(s) )
|
||||
style->setInt(mapper[s], i);
|
||||
emit styleChanged();
|
||||
}
|
||||
|
||||
void Qt_widget_style_editor::map(bool b)
|
||||
{
|
||||
const QObject* s = sender();
|
||||
if( mapper.contains(s) )
|
||||
style->setBool(mapper[s], b);
|
||||
emit styleChanged();
|
||||
}
|
||||
|
||||
} // end namespace CGAL
|
||||
|
||||
// moc_source_file: Qt_widget_style_editor.h
|
||||
#include "Qt_widget_style_editor.moc"
|
||||
|
||||
// moc_source_file: Qt_widget_style_editor-aux.h
|
||||
#include "Qt_widget_style_editor-aux.moc"
|
||||
|
||||
#endif // CGAL_USE_QT
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef QT_WIDGET_STYLE_EDITOR_H
|
||||
#define QT_WIDGET_STYLE_EDITOR_H
|
||||
|
||||
#include <qframe.h>
|
||||
#include "Qt_widget_styled_layer.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
class Qt_widget_style_editor : public QFrame {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
typedef Qt_widget_styled_layer::Style Style;
|
||||
|
||||
Qt_widget_style_editor(Style* style,
|
||||
QWidget *parent = 0 , const char *name = 0);
|
||||
|
||||
virtual ~Qt_widget_style_editor() {}
|
||||
|
||||
signals:
|
||||
void styleChanged();
|
||||
|
||||
private slots:
|
||||
void map(QColor);
|
||||
void map(int);
|
||||
void map(bool);
|
||||
|
||||
private:
|
||||
Style* style;
|
||||
QMap<const QObject*, QString> mapper;
|
||||
}; // end of class Qt_widget_style_editor
|
||||
|
||||
} // end namespace CGAL
|
||||
|
||||
#endif // QT_WIDGET_STYLE_EDITOR_H
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
#ifdef CGAL_USE_QT
|
||||
|
||||
#include "Qt_widget_styled_layer.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
Qt_widget_styled_layer::Qt_widget_styled_layer(
|
||||
Qt_widget_styled_layer::Style* style,
|
||||
QObject * parent,
|
||||
const char * name)
|
||||
: Qt_widget_layer(parent, name),
|
||||
style_(style), private_style(false)
|
||||
{
|
||||
if( style == 0 )
|
||||
{
|
||||
this->style_ = new Style();
|
||||
private_style = true;
|
||||
}
|
||||
}
|
||||
|
||||
Qt_widget_styled_layer::~Qt_widget_styled_layer()
|
||||
{
|
||||
if( private_style )
|
||||
delete style_;
|
||||
}
|
||||
|
||||
void Qt_widget_styled_layer::setStyle(Qt_widget_styled_layer::Style* s)
|
||||
{
|
||||
if( private_style )
|
||||
delete style_;
|
||||
private_style = false;
|
||||
style_ = s;
|
||||
}
|
||||
|
||||
void Qt_widget_style::setBool(QString name, bool b)
|
||||
{
|
||||
map[name] = b;
|
||||
}
|
||||
|
||||
void Qt_widget_style::setInt(QString name, int i)
|
||||
{
|
||||
map[name] = i;
|
||||
}
|
||||
|
||||
void Qt_widget_style::setColor(QString name, QColor c)
|
||||
{
|
||||
map[name] = c;
|
||||
}
|
||||
|
||||
void Qt_widget_style::setPointStyle(QString name, PointStyle s)
|
||||
{
|
||||
map[name] = static_cast<uint>(s);
|
||||
map[name].cast(QVariant::UInt);
|
||||
}
|
||||
|
||||
bool Qt_widget_style::getBool(QString name)
|
||||
{
|
||||
if( ! map.contains(name) )
|
||||
return false;
|
||||
else
|
||||
{
|
||||
CGAL_assertion( map[name].type() == QVariant::Bool );
|
||||
return map[name].asBool();
|
||||
}
|
||||
}
|
||||
|
||||
int Qt_widget_style::getInt(QString name)
|
||||
{
|
||||
if( ! map.contains(name) )
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
CGAL_assertion( map[name].type() == QVariant::Int );
|
||||
return map[name].asInt();
|
||||
}
|
||||
}
|
||||
|
||||
QColor Qt_widget_style::getColor(QString name)
|
||||
{
|
||||
if( ! map.contains(name) )
|
||||
return QColor();
|
||||
else
|
||||
{
|
||||
CGAL_assertion( map[name].type() == QVariant::Color );
|
||||
return map[name].asColor();
|
||||
}
|
||||
}
|
||||
|
||||
::CGAL::PointStyle Qt_widget_style::getPointStyle(QString name)
|
||||
{
|
||||
if( ! map.contains(name) )
|
||||
return PointStyle();
|
||||
else
|
||||
{
|
||||
CGAL_assertion( map[name].type() == QVariant::UInt );
|
||||
return PointStyle(map[name].asUInt());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
// moc_source_file: Qt_widget_styled_layer.h
|
||||
#include "Qt_widget_styled_layer.moc"
|
||||
|
||||
#endif // CGAL_USE_QT
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef QT_WIDGET_STYLED_LAYER_H
|
||||
#define QT_WIDGET_STYLED_LAYER_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qstring.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
#include <CGAL/function_objects.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
class Qt_widget_style : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
typedef QMap<QString,QVariant> Map;
|
||||
public:
|
||||
|
||||
typedef Map::const_iterator const_iterator;
|
||||
typedef Map::size_type size_type;
|
||||
|
||||
Qt_widget_style()
|
||||
: map() {};
|
||||
|
||||
public slots:
|
||||
void setBool(QString name, bool b);
|
||||
void setInt(QString name, int i);
|
||||
void setColor(QString name, QColor c);
|
||||
void setPointStyle(QString name, PointStyle s);
|
||||
|
||||
public:
|
||||
bool getBool(QString name);
|
||||
int getInt(QString name);
|
||||
QColor getColor(QString name);
|
||||
PointStyle getPointStyle(QString name);
|
||||
|
||||
const_iterator begin() const
|
||||
{
|
||||
return map.begin();
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
{
|
||||
return map.end();
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
{
|
||||
return map.size();
|
||||
}
|
||||
|
||||
private:
|
||||
Map map;
|
||||
};
|
||||
|
||||
class Qt_widget_styled_layer : public Qt_widget_layer {
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef Qt_widget_style Style;
|
||||
|
||||
Qt_widget_styled_layer(Style* style = 0,
|
||||
QObject * parent=0, const char * name=0);
|
||||
|
||||
~Qt_widget_styled_layer();
|
||||
|
||||
void setStyle(Style* style);
|
||||
Style * style() { return style_; }
|
||||
private:
|
||||
Style* style_;
|
||||
bool private_style;
|
||||
};
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // QT_WIDGET_STYLED_LAYER_H
|
||||
|
|
@ -0,0 +1,213 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef MESH_2_SHOW_CLUSTERS_H
|
||||
#define MESH_2_SHOW_CLUSTERS_H
|
||||
|
||||
#include <CGAL/IO/Qt_widget.h>
|
||||
#include <CGAL/IO/Qt_widget_layer.h>
|
||||
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
class Show_clusters_aux : public CGAL::Qt_widget_layer
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
virtual void reinit_clusters() {}
|
||||
|
||||
public slots:
|
||||
void reinitClusters()
|
||||
{
|
||||
reinit_clusters();
|
||||
}
|
||||
public:
|
||||
Show_clusters_aux(QObject* parent, const char* name)
|
||||
: Qt_widget_layer(parent, name)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <class Mesher>
|
||||
class Show_clusters : public Show_clusters_aux
|
||||
{
|
||||
public:
|
||||
typedef typename Mesher::Triangulation Tr;
|
||||
typedef typename Tr::Point Point;
|
||||
typedef typename Tr::Geom_traits Geom_traits;
|
||||
typedef CGAL::Delaunay_triangulation_2<Geom_traits> DT;
|
||||
typedef typename DT::Finite_vertices_iterator Vertices_iterator;
|
||||
typedef typename DT::Vertex_handle DT_vertex_handle;
|
||||
typedef typename Tr::Segment Segment;
|
||||
typedef typename Tr::Face_handle Face_handle;
|
||||
typedef typename Tr::Vertex_handle Vertex_handle;
|
||||
typedef typename Tr::Geom_traits::FT FT;
|
||||
typedef typename Mesher::Clusters Clusters;
|
||||
typedef typename Clusters::Cluster Cluster;
|
||||
typedef typename Clusters::Cluster_vertices_iterator CVIt;
|
||||
typedef typename Clusters::Vertices_in_cluster_iterator ViCIt;
|
||||
typedef typename Clusters::const_iterator Clusters_const_iterator;
|
||||
typedef std::list<Point> List_of_points;
|
||||
typedef typename List_of_points::const_iterator Point_iterator;
|
||||
|
||||
Show_clusters(Mesher* m,
|
||||
CGAL::Color color_ = CGAL::GREEN,
|
||||
int pointsize = 3,
|
||||
CGAL::PointStyle pointstyle = CGAL::DISC,
|
||||
CGAL::Color lc = CGAL::RED,
|
||||
CGAL::Color reduced_line_color_ = CGAL::BLUE,
|
||||
int linewidth = 2,
|
||||
QObject* parent = 0, const char* name = 0)
|
||||
: Show_clusters_aux(parent, name),
|
||||
mesher(m), dt(), color(color_),
|
||||
size(pointsize), style(pointstyle), line_color(lc),
|
||||
reduced_line_color(reduced_line_color_),
|
||||
width(linewidth)
|
||||
{
|
||||
reinit_clusters();
|
||||
}
|
||||
|
||||
void activating()
|
||||
{
|
||||
reinit_clusters();
|
||||
}
|
||||
|
||||
void change_mesher(Mesher* m)
|
||||
{
|
||||
mesher = m;
|
||||
reinit_clusters();
|
||||
}
|
||||
|
||||
void reinit_clusters()
|
||||
{
|
||||
if(!is_active()) return;
|
||||
|
||||
dt.clear();
|
||||
|
||||
if( mesher != 0 )
|
||||
for(CVIt it = mesher->clusters().clusters_vertices_begin();
|
||||
it != mesher->clusters().clusters_vertices_end();
|
||||
++it)
|
||||
dt.push_back( (*it)->point() );
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
widget->lock();
|
||||
|
||||
QColor oldColor = widget->color();
|
||||
int oldPointSize = widget->pointSize();
|
||||
CGAL::PointStyle oldStyle = widget->pointStyle();
|
||||
|
||||
*widget << color << CGAL::PointStyle(style)
|
||||
<< CGAL::PointSize(size);
|
||||
|
||||
for(Vertices_iterator it = dt.finite_vertices_begin();
|
||||
it != dt.finite_vertices_end();
|
||||
++it)
|
||||
*widget << it->point();
|
||||
|
||||
widget->setPointStyle(oldStyle);
|
||||
widget->setPointSize(oldPointSize);
|
||||
widget->setColor(oldColor);
|
||||
|
||||
widget->unlock();
|
||||
oldPixmap = widget->get_pixmap();
|
||||
}
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
if( mesher == 0 ) return;
|
||||
|
||||
FT x, y;
|
||||
widget->x_real(e->x(), x);
|
||||
widget->y_real(e->y(), y);
|
||||
Point p(x, y);
|
||||
|
||||
DT_vertex_handle v = dt.nearest_vertex(p);
|
||||
|
||||
if(v == NULL) return;
|
||||
if(v == oldVertex) return;
|
||||
|
||||
oldVertex = v;
|
||||
|
||||
QColor oldColor = widget->color();
|
||||
int oldWidth = widget->lineWidth();
|
||||
|
||||
widget->lock();
|
||||
|
||||
widget->get_painter().drawPixmap(0, 0, oldPixmap);
|
||||
|
||||
*widget << CGAL::LineWidth(width);
|
||||
|
||||
typename Tr::Locate_type lt;
|
||||
int i;
|
||||
Face_handle fh = mesher->triangulation().locate(v->point(), lt, i);
|
||||
CGAL_assertion( lt == Tr::VERTEX );
|
||||
|
||||
Vertex_handle v2 = fh->vertex(i);
|
||||
|
||||
int n = mesher->clusters().number_of_clusters_at_vertex(v2);
|
||||
|
||||
for(int j = 0; j < n; ++j)
|
||||
{
|
||||
std::pair<ViCIt,ViCIt> seq =
|
||||
mesher->clusters().vertices_in_cluster_sequence(v2, j);
|
||||
Cluster c;
|
||||
Clusters_const_iterator dummy_c_it;
|
||||
mesher->clusters().get_cluster(v2, *(seq.first), c, dummy_c_it);
|
||||
if( c.is_reduced() )
|
||||
*widget << reduced_line_color;
|
||||
else
|
||||
*widget << line_color;
|
||||
for(ViCIt it = seq.first;
|
||||
it != seq.second;
|
||||
++it)
|
||||
*widget << Segment(v2->point(), (*it)->point());
|
||||
}
|
||||
|
||||
widget->setLineWidth(oldWidth);
|
||||
widget->setColor(oldColor);
|
||||
|
||||
widget->unlock();
|
||||
}
|
||||
|
||||
void leaveEvent(QEvent *)
|
||||
{
|
||||
widget->get_painter().drawPixmap(0, 0, oldPixmap);
|
||||
widget->update();
|
||||
}
|
||||
|
||||
private:
|
||||
Mesher* mesher;
|
||||
DT dt;
|
||||
DT_vertex_handle oldVertex;
|
||||
QPixmap oldPixmap;
|
||||
bool should_restore_pixmap;
|
||||
CGAL::Color color;
|
||||
int size;
|
||||
CGAL::PointStyle style;
|
||||
CGAL::Color line_color;
|
||||
CGAL::Color reduced_line_color;
|
||||
int width;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
#ifdef CGAL_USE_QT
|
||||
|
||||
#include "Show_points.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
Show_points_base::Show_points_base(Color c,
|
||||
int pointsize,
|
||||
PointStyle pointstyle,
|
||||
QObject * parent,
|
||||
const char * name)
|
||||
: Qt_widget_styled_layer(0, parent, name)
|
||||
{
|
||||
color=tr("Color");
|
||||
size=tr("Point size");
|
||||
style_name=tr("Point style");
|
||||
|
||||
setColor(QColor(c.red(), c.green(), c.blue()));
|
||||
setPointSize(pointsize);
|
||||
setPointStyle(pointstyle);
|
||||
}
|
||||
|
||||
Show_points_base::Show_points_base(Style* style,
|
||||
QString points_color_name,
|
||||
QString points_size_name,
|
||||
QString points_style_name,
|
||||
QObject * parent,
|
||||
const char * name)
|
||||
: Qt_widget_styled_layer(style, parent, name),
|
||||
color(points_color_name),
|
||||
size(points_size_name),
|
||||
style_name(points_style_name)
|
||||
{}
|
||||
|
||||
void Show_points_base::setColor(QColor c)
|
||||
{ style()->setColor(color, c); }
|
||||
|
||||
void Show_points_base::setPointSize(int pointsize)
|
||||
{ style()->setInt(size, pointsize); }
|
||||
|
||||
void Show_points_base::setPointStyle(PointStyle pointstyle)
|
||||
{ style()->setInt(style_name, static_cast<int>(pointstyle)); }
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
// moc_source_file: Show_points.h
|
||||
#include "Show_points.moc"
|
||||
|
||||
#endif // CGAL_USE_QT
|
||||
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef SHOW_POINTS_H
|
||||
#define SHOW_POINTS_H
|
||||
|
||||
#include <qmap.h>
|
||||
#include <qstring.h>
|
||||
#include <qvariant.h>
|
||||
#include <qcolor.h>
|
||||
|
||||
#include "Qt_widget_styled_layer.h"
|
||||
#include <CGAL/function_objects.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
class Show_points_base: public Qt_widget_styled_layer {
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef Qt_widget_styled_layer::Style Style;
|
||||
|
||||
Show_points_base(Color c,
|
||||
int pointsize,
|
||||
PointStyle pointstyle,
|
||||
QObject * parent=0, const char * name=0);
|
||||
|
||||
Show_points_base(Style* style,
|
||||
QString points_color_name,
|
||||
QString points_size_name,
|
||||
QString points_style_name,
|
||||
QObject * parent=0, const char * name=0);
|
||||
|
||||
public slots:
|
||||
void setColor(QColor);
|
||||
void setPointSize(int);
|
||||
void setPointStyle(PointStyle);
|
||||
|
||||
protected:
|
||||
QString color;
|
||||
QString size;
|
||||
QString style_name;
|
||||
}; // end Show_points_base
|
||||
|
||||
template <class C, class It,
|
||||
class Transform = Identity<typename It::value_type> >
|
||||
class Show_points : public Show_points_base {
|
||||
public:
|
||||
typedef Qt_widget_styled_layer::Style Style;
|
||||
|
||||
typedef It iterator;
|
||||
typedef iterator (C::* iterator_function)() const;
|
||||
|
||||
Show_points(C *container,
|
||||
iterator_function begin,
|
||||
iterator_function end,
|
||||
Color c = CGAL::GREEN,
|
||||
int pointsize = 3,
|
||||
PointStyle pointstyle = CGAL::DISC,
|
||||
QObject * parent=0, const char * name=0)
|
||||
: Show_points_base(c, pointsize, pointstyle,
|
||||
parent, name),
|
||||
cont(container), _begin(begin), _end(end) {};
|
||||
|
||||
Show_points(C *container,
|
||||
iterator_function begin,
|
||||
iterator_function end,
|
||||
Style* style,
|
||||
QString points_color_name,
|
||||
QString points_size_name,
|
||||
QString points_style_name,
|
||||
QObject * parent=0, const char * name=0)
|
||||
: Show_points_base(style,
|
||||
points_color_name,
|
||||
points_size_name,
|
||||
points_style_name,
|
||||
parent, name),
|
||||
cont(container), _begin(begin), _end(end) {};
|
||||
|
||||
void draw()
|
||||
{
|
||||
widget->lock();
|
||||
{
|
||||
QColor old_color = widget->color();
|
||||
int old_size = widget->pointSize();
|
||||
PointStyle old_point_style = widget->pointStyle();
|
||||
|
||||
widget->setColor(style()->getColor(color));
|
||||
widget->setPointSize(style()->getInt(size));
|
||||
widget->setPointStyle(static_cast<CGAL::PointStyle>(style()->
|
||||
getInt(style_name)));
|
||||
|
||||
for(iterator it = (cont->*_begin)();
|
||||
it!=(cont->*_end)();
|
||||
++it)
|
||||
*widget << Transform()(*it);
|
||||
|
||||
widget->setColor(old_color);
|
||||
widget->setPointSize(old_size);
|
||||
widget->setPointStyle(old_point_style);
|
||||
}
|
||||
widget->unlock();
|
||||
};
|
||||
|
||||
private:
|
||||
C *cont;
|
||||
iterator_function _begin;
|
||||
iterator_function _end;
|
||||
};//end class
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // SHOW_POINTS_H
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef SHOW_SEGMENTS_H
|
||||
#define SHOW_SEGMENTS_H
|
||||
|
||||
#include "Show_segments_base.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class C, class It,
|
||||
class Transform = Identity<typename It::value_type> >
|
||||
class Show_segments : public Show_segments_base {
|
||||
public:
|
||||
typedef Qt_widget_styled_layer::Style Style;
|
||||
|
||||
typedef It iterator;
|
||||
typedef iterator (C::* iterator_function)() const;
|
||||
|
||||
Show_segments(C *container,
|
||||
iterator_function begin,
|
||||
iterator_function end,
|
||||
Color c=CGAL::GREEN,
|
||||
int linewidth=3,
|
||||
QObject* parent = 0, const char* name = 0)
|
||||
: Show_segments_base(c, linewidth,
|
||||
parent, name),
|
||||
cont(container), _begin(begin), _end(end) {};
|
||||
|
||||
Show_segments(C *container,
|
||||
iterator_function begin,
|
||||
iterator_function end,
|
||||
Style* style,
|
||||
QString line_color_name,
|
||||
QString line_width_name,
|
||||
QObject* parent = 0, const char* name = 0)
|
||||
: Show_segments_base(style, line_color_name, line_width_name,
|
||||
parent, name),
|
||||
cont(container), _begin(begin), _end(end) {};
|
||||
|
||||
void set_container(C* container)
|
||||
{
|
||||
cont = container;
|
||||
}
|
||||
|
||||
void draw()
|
||||
{
|
||||
if( cont != 0 )
|
||||
{
|
||||
widget->lock();
|
||||
{
|
||||
QColor old_color = widget->color();
|
||||
int old_width = widget->lineWidth();
|
||||
|
||||
widget->setColor(style()->getColor(color));
|
||||
widget->setLineWidth(style()->getInt(width));
|
||||
|
||||
for(iterator it = (cont->*_begin)();
|
||||
it!=(cont->*_end)();
|
||||
++it)
|
||||
{
|
||||
*widget << Transform()(*it);
|
||||
}
|
||||
|
||||
widget->setColor(old_color);
|
||||
widget->setLineWidth(old_width);
|
||||
}
|
||||
widget->unlock();
|
||||
}
|
||||
};
|
||||
|
||||
private:
|
||||
C *cont;
|
||||
iterator_function _begin;
|
||||
iterator_function _end;
|
||||
};//end class
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // SHOW_SEGMENTS_H
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
#ifdef CGAL_USE_QT
|
||||
|
||||
#include "Show_segments_base.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
Show_segments_base::Show_segments_base(Color c,
|
||||
int linewidth,
|
||||
QObject* parent,
|
||||
const char* name)
|
||||
: Qt_widget_styled_layer(0, parent, name)
|
||||
{
|
||||
color=tr("Color");
|
||||
width=tr("Line width");
|
||||
|
||||
setColor(QColor(c.red(), c.green(), c.blue()));
|
||||
setLineWidth(linewidth);
|
||||
}
|
||||
|
||||
Show_segments_base::Show_segments_base(Style* style,
|
||||
QString line_color_name,
|
||||
QString line_width_name,
|
||||
QObject* parent,
|
||||
const char* name)
|
||||
: Qt_widget_styled_layer(style, parent, name),
|
||||
color(line_color_name),
|
||||
width(line_width_name)
|
||||
{}
|
||||
|
||||
void Show_segments_base::setColor(QColor c)
|
||||
{ style()->setColor(color, c); }
|
||||
|
||||
void Show_segments_base::setLineWidth(int line_width)
|
||||
{ style()->setInt(width, line_width); }
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
// moc_source_file: Show_segments_base.h
|
||||
#include "Show_segments_base.moc"
|
||||
|
||||
#endif // CGAL_USE_QT
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef SHOW_SEGMENTS_BASE_H
|
||||
#define SHOW_SEGMENTS_BASE_H
|
||||
|
||||
#include "Qt_widget_styled_layer.h"
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
class Show_segments_base: public Qt_widget_styled_layer {
|
||||
Q_OBJECT
|
||||
public:
|
||||
typedef Qt_widget_styled_layer::Style Style;
|
||||
|
||||
Show_segments_base(Color c,
|
||||
int linewidth,
|
||||
QObject* parent = 0, const char* name = 0);
|
||||
|
||||
Show_segments_base(Style* style,
|
||||
QString line_color_name,
|
||||
QString line_width_name,
|
||||
QObject* parent = 0, const char* name = 0);
|
||||
|
||||
public slots:
|
||||
void setColor(QColor);
|
||||
void setLineWidth(int);
|
||||
|
||||
protected:
|
||||
QString color;
|
||||
QString width;
|
||||
}; //end Show_segments_base
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
#endif // SHOW_SEGMENTS_BASE_H
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
// if QT is not installed, a message will be issued in runtime.
|
||||
#ifndef CGAL_USE_QT
|
||||
#include <iostream>
|
||||
|
||||
int main(int, char*)
|
||||
{
|
||||
|
||||
std::cout << "Sorry, this demo needs QT...";
|
||||
std::cout << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Filtered_kernel.h>
|
||||
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
|
||||
#include <CGAL/Triangulation_conformer_2.h>
|
||||
#include <CGAL/IO/File_poly.h>
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> K1;
|
||||
typedef CGAL::Filtered_kernel<K1> K2;
|
||||
struct K : public K2 {};
|
||||
|
||||
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
|
||||
typedef CGAL::Constrained_triangulation_face_base_2<K> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds1;
|
||||
|
||||
struct Tds : public Tds1 {};
|
||||
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds,
|
||||
CGAL::Exact_predicates_tag> Tr;
|
||||
|
||||
typedef K::Point_2 Point;
|
||||
|
||||
void usage(char** argv)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0]
|
||||
<< " [-Q] [-D] [-v] input.poly [output.poly]" << std::endl
|
||||
<< "Read a Shewchuk .poly file and output a conforming PSLG."
|
||||
<< std::endl
|
||||
<< " -Q Quiet" << std::endl
|
||||
<< " -D Make conforming Delaunay, instead of"
|
||||
" conforming Gabriel." << std::endl
|
||||
<< " -v Verbose" << std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int arg_count = 1;
|
||||
bool terminal_output = true;
|
||||
bool delaunay = false;
|
||||
bool verbose = false;
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
while(argv[arg_count][0] == '-' && argv[arg_count] != "--")
|
||||
{
|
||||
if(std::string(argv[arg_count]) == "-Q")
|
||||
terminal_output = false;
|
||||
else if(std::string(argv[arg_count]) == "-D")
|
||||
delaunay = true;
|
||||
else if(std::string(argv[arg_count]) == "-v")
|
||||
verbose = true;
|
||||
else
|
||||
{
|
||||
std::cerr << "Unknown option " << argv[arg_count] << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
++arg_count;
|
||||
}
|
||||
if(argv[arg_count] == "--")
|
||||
++arg_count;
|
||||
|
||||
if(argc < arg_count+1 || argc > arg_count+2)
|
||||
{
|
||||
usage(argv);
|
||||
return 1;
|
||||
};
|
||||
std::ifstream input(argv[arg_count]);
|
||||
if(input)
|
||||
{
|
||||
Tr t;
|
||||
CGAL::read_triangle_poly_file(t, input);
|
||||
if(delaunay)
|
||||
{
|
||||
if(verbose)
|
||||
std::cerr << "Make conforming Delaunay..." << std::endl;
|
||||
CGAL::make_conforming_Delaunay_2(t);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(verbose)
|
||||
std::cerr << "Make conforming Gabriel..." << std::endl;
|
||||
CGAL::make_conforming_Gabriel_2(t);
|
||||
}
|
||||
|
||||
if(argc==arg_count+1)
|
||||
{
|
||||
if(terminal_output)
|
||||
CGAL::write_triangle_poly_file(t, std::cout);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ofstream output(argv[arg_count+1]);
|
||||
CGAL::write_triangle_poly_file(t, output);
|
||||
}
|
||||
|
||||
if(terminal_output)
|
||||
std::cerr
|
||||
<< "Number of points: " << t.number_of_vertices() << std::endl
|
||||
<< "Number of triangles: " << t.number_of_faces () << std::endl;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Bad file: " << argv[arg_count] << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
#endif // CGAL_USE_QT
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/* XPM */
|
||||
const char * contraints_xpm[] = {
|
||||
"32 32 2 1",
|
||||
" c None",
|
||||
". c #FF0000",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ............. ",
|
||||
" .. .. ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . ... . ",
|
||||
" . ... .... . ",
|
||||
" . . . . . ",
|
||||
" . . . . . ",
|
||||
" . . . . . ",
|
||||
" . . . . . ",
|
||||
" .. . . . . ",
|
||||
" .. . . . . ",
|
||||
" . .. .. . ",
|
||||
" . ..... .. ... ",
|
||||
" . .... . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" ..... . ",
|
||||
" ........ .. ",
|
||||
" .... ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
26
|
||||
0 0 0.7 1
|
||||
0 0 0.7 -1
|
||||
0 0 -0.7 -1
|
||||
0 0 -0.7 1
|
||||
|
||||
0.7 1 1 0.8
|
||||
1 0.8 1 0.3
|
||||
1 0.3 0.7 0.2
|
||||
0.7 0.2 1 0
|
||||
1 0 0.7 -0.2
|
||||
0.7 -0.2 1 -0.3
|
||||
1 -0.3 0.7 -0.6
|
||||
0.7 -0.6 1 -0.8
|
||||
1 -0.8 0.7 -1
|
||||
|
||||
-0.7 1 -1 0.8
|
||||
-1 0.8 -1 0.3
|
||||
-1 0.3 -0.7 0.2
|
||||
-0.7 0.2 -1 0
|
||||
-1 0 -0.7 -0.2
|
||||
-0.7 -0.2 -1 -0.3
|
||||
-1 -0.3 -0.7 -0.6
|
||||
-0.7 -0.6 -1 -0.8
|
||||
-1 -0.8 -0.7 -1
|
||||
|
||||
|
||||
0 0 0.7 0.2
|
||||
0 0 0.7 -0.2
|
||||
0 0 -0.7 0.2
|
||||
0 0 -0.7 -0.2
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
8
|
||||
812.183 152.284 -20.3046 30.4569
|
||||
-20.3046 30.4569 662.437 365.482
|
||||
824.873 53.2995 -20.3046 30.4569
|
||||
819.797 -119.289 -20.3046 30.4569
|
||||
-116.751 -441.624 -20.3046 30.4569
|
||||
-279.188 -418.782 -20.3046 30.4569
|
||||
-784.264 109.137 -20.3046 30.4569
|
||||
-20.3046 30.4569 -710.66 225.888
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# Shewchuk Triangle .poly file, produced by the CGAL::Mesh_2 package
|
||||
# Neither attributes nor boundary markers are used.
|
||||
13 2 0 0
|
||||
|
||||
1 812.183 152.284
|
||||
2 -20.3046 30.4569
|
||||
3 662.437 365.482
|
||||
4 824.873 53.2995
|
||||
5 819.797 -119.289
|
||||
6 -116.751 -441.624
|
||||
7 -279.188 -418.782
|
||||
8 -784.264 109.137
|
||||
9 -710.66 225.888
|
||||
10 -1186.55 -643.401
|
||||
11 1227.16 -643.401
|
||||
12 1227.16 567.259
|
||||
13 -1186.55 567.259
|
||||
|
||||
12 0
|
||||
1 2 8
|
||||
2 9 2
|
||||
3 2 3
|
||||
4 1 2
|
||||
5 4 2
|
||||
6 13 10
|
||||
7 12 11
|
||||
8 5 2
|
||||
9 6 2
|
||||
10 7 2
|
||||
11 13 12
|
||||
12 10 11
|
||||
|
||||
0
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
47
|
||||
-20.3046 30.4569 -784.264 109.137
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 662.437 365.482
|
||||
812.183 152.284 -20.3046 30.4569
|
||||
824.873 53.2995 -20.3046 30.4569
|
||||
819.797 -119.289 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -116.751 -441.624
|
||||
-20.3046 30.4569 -81.2183 116.751
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -279.188 -418.782
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-710.66 225.888 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
-20.3046 30.4569 -20.3046 30.4569
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
16
|
||||
-0.25 0.0 -0.5 1.0
|
||||
-0.25 0.0 -0.5 -1.0
|
||||
-0.5 1.0 0.0 0.5
|
||||
-0.5 -1.0 0.0 -0.5
|
||||
0.0 0.5 0.5 1.0
|
||||
0.0 -0.5 0.5 -1.0
|
||||
0.5 1.0 1.0 0.0
|
||||
0.5 -1.0 1.0 0.0
|
||||
0.25 0.0 0.5 0.5
|
||||
0.25 0.0 0.5 -0.5
|
||||
0.5 0.5 0.75 0.0
|
||||
0.5 -0.5 0.75 0.0
|
||||
-0.25 0.0 -0.5 0.5
|
||||
-0.25 0.0 -0.5 -0.5
|
||||
-0.5 0.5 -0.75 0.0
|
||||
-0.5 -0.5 -0.75 0.0
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# Shewchuk Triangle .poly file, produced by the CGAL::Mesh_2 package
|
||||
# Neither attributes nor boundary markers are used.
|
||||
15 2 0 0
|
||||
|
||||
1 -0.25 0
|
||||
2 -0.5 1
|
||||
3 -0.5 -1
|
||||
4 0 0.5
|
||||
5 0 -0.5
|
||||
6 0.5 1
|
||||
7 0.5 -1
|
||||
8 1 0
|
||||
9 0.25 0
|
||||
10 0.5 0.5
|
||||
11 0.5 -0.5
|
||||
12 0.75 0
|
||||
13 -0.5 0.5
|
||||
14 -0.5 -0.5
|
||||
15 -0.75 0
|
||||
|
||||
16 0
|
||||
1 15 14
|
||||
2 5 3
|
||||
3 3 1
|
||||
4 6 4
|
||||
5 4 2
|
||||
6 12 10
|
||||
7 5 7
|
||||
8 10 9
|
||||
9 7 8
|
||||
10 8 6
|
||||
11 9 11
|
||||
12 12 11
|
||||
13 13 15
|
||||
14 14 1
|
||||
15 13 1
|
||||
16 2 1
|
||||
|
||||
1
|
||||
1 0.505223 0.0994429
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
43
|
||||
435.625 74.625 401.25 79.25
|
||||
206.5 24 159 28
|
||||
406.5 55.5 435.375 51.625
|
||||
464.25 47.75 522 40
|
||||
206.5 24 254 20
|
||||
438 24 373 20
|
||||
319 33 289 54
|
||||
377.625 59.375 348.75 63.25
|
||||
406.5 55.5 377.625 59.375
|
||||
366.875 83.875 401.25 79.25
|
||||
464.25 47.75 435.375 51.625
|
||||
332.5 88.5 298.125 93.125
|
||||
263.75 97.75 298.125 93.125
|
||||
319.875 67.125 348.75 63.25
|
||||
319.875 67.125 291 71
|
||||
190.5 60 150.75 66
|
||||
230.25 54 270 48
|
||||
431.5 294.5 487 230
|
||||
376 359 431.5 294.5
|
||||
265 252 278 221.5
|
||||
258.253 196.183 221.5 202
|
||||
291 191 258.253 196.183
|
||||
278 221.5 291 191
|
||||
186.75 207.5 221.5 202
|
||||
194.625 177.125 252.25 166.25
|
||||
309.875 155.375 252.25 166.25
|
||||
94 221 109 306
|
||||
79 136 94 221
|
||||
598 182 555 263
|
||||
555 263 512 344
|
||||
230.25 54 190.5 60
|
||||
367.5 144.5 440.942 130.64
|
||||
514.385 116.78 440.942 130.64
|
||||
366.875 83.875 332.5 88.5
|
||||
150.75 66 111 72
|
||||
309.875 155.375 367.5 144.5
|
||||
263.75 97.75 195 107
|
||||
137 188 194.625 177.125
|
||||
598 101 514.385 116.78
|
||||
542.5 165.5 598 101
|
||||
470 70 435.625 74.625
|
||||
152 213 186.75 207.5
|
||||
542.5 165.5 487 230
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
10
|
||||
371.146 65.1014 311.573 64.3007
|
||||
375.5 89.75 438 66
|
||||
313 113.5 375.5 89.75
|
||||
252 63.5 311.573 64.3007
|
||||
188 161 313 113.5
|
||||
371.146 65.1014 438 66
|
||||
420.5 170.5 321.609 166.459
|
||||
653 180 420.5 170.5
|
||||
66 61 252 63.5
|
||||
321.609 166.459 188 161
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
3
|
||||
622 53 185 145
|
||||
125 53 622 53
|
||||
710 145 185 145
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
10
|
||||
619 81 499.25 81
|
||||
259.75 81 379.5 81
|
||||
302 192 387 192
|
||||
499.25 81 379.5 81
|
||||
383 143 462 143
|
||||
383 143 304 143
|
||||
462 143 541 143
|
||||
387 192 472 192
|
||||
304 143 225 143
|
||||
140 81 259.75 81
|
||||
|
|
@ -0,0 +1,275 @@
|
|||
274
|
||||
529.987 14.0048 529.99 14.0036
|
||||
93.01 171.996 93.0133 171.995
|
||||
93.0067 171.998 93.01 171.996
|
||||
93.0067 171.998 93 172
|
||||
688.982 49.0038 688.986 49.0028
|
||||
688.995 49.0021 689 49
|
||||
93.02 171.993 93.0167 171.994
|
||||
93.0133 171.995 93.0167 171.994
|
||||
93.0182 171.996 93.0227 171.995
|
||||
93.0136 171.997 93.0091 171.998
|
||||
688.973 49.0056 688.977 49.0047
|
||||
688.975 49.0103 688.98 49.0082
|
||||
688.986 49.0028 688.991 49.0019
|
||||
688.98 49.0082 688.985 49.0062
|
||||
529.973 14.0096 529.967 14.0121
|
||||
529.965 14.0052 529.971 14.0043
|
||||
529.988 14.0017 529.982 14.0026
|
||||
529.98 14.0072 529.973 14.0096
|
||||
93.02 171.993 93.0267 171.99
|
||||
93.0091 171.998 93.0045 171.999
|
||||
688.973 49.0056 688.964 49.0075
|
||||
529.953 14.007 529.965 14.0052
|
||||
530 14 529.993 14.0024
|
||||
529.982 14.0026 529.977 14.0035
|
||||
688.961 49.0164 688.951 49.0205
|
||||
688.97 49.0123 688.961 49.0164
|
||||
529.947 14.0193 529.933 14.0241
|
||||
529.977 14.0035 529.971 14.0043
|
||||
529.96 14.0145 529.947 14.0193
|
||||
93.0333 171.988 93.04 171.986
|
||||
93.0333 171.988 93.0267 171.99
|
||||
93.0182 171.996 93.0136 171.997
|
||||
688.945 49.0113 688.927 49.015
|
||||
688.995 49.0021 688.99 49.0041
|
||||
688.982 49.0038 688.977 49.0047
|
||||
529.941 14.0087 529.93 14.0104
|
||||
529.993 14.0024 529.99 14.0036
|
||||
93.0227 171.995 93.0273 171.994
|
||||
93.0533 171.981 93.04 171.986
|
||||
93.0455 171.991 93.0364 171.992
|
||||
688.901 49.041 688.921 49.0328
|
||||
688.955 49.0094 688.945 49.0113
|
||||
688.941 49.0246 688.921 49.0328
|
||||
529.867 14.0482 529.893 14.0386
|
||||
529.953 14.007 529.941 14.0087
|
||||
529.92 14.0289 529.893 14.0386
|
||||
93.0667 171.976 93.08 171.971
|
||||
93.0667 171.976 93.0533 171.981
|
||||
93.0364 171.992 93.0273 171.994
|
||||
688.891 49.0225 688.854 49.03
|
||||
688.99 49.0041 688.985 49.0062
|
||||
688.964 49.0075 688.955 49.0094
|
||||
529.883 14.0174 529.859 14.0209
|
||||
529.987 14.0048 529.98 14.0072
|
||||
529.93 14.0104 529.906 14.0139
|
||||
93.0455 171.991 93.0546 171.989
|
||||
93.1067 171.961 93.08 171.971
|
||||
93.0909 171.981 93.0728 171.985
|
||||
688.803 49.0821 688.842 49.0657
|
||||
688.909 49.0188 688.891 49.0225
|
||||
688.882 49.0493 688.842 49.0657
|
||||
529.733 14.0964 529.787 14.0771
|
||||
529.906 14.0139 529.883 14.0174
|
||||
529.84 14.0579 529.787 14.0771
|
||||
93.1334 171.952 93.16 171.942
|
||||
93.1334 171.952 93.1067 171.961
|
||||
93.0728 171.985 93.0546 171.989
|
||||
688.782 49.045 688.709 49.0601
|
||||
688.975 49.0103 688.97 49.0123
|
||||
688.927 49.015 688.909 49.0188
|
||||
529.766 14.0348 529.719 14.0417
|
||||
529.967 14.0121 529.96 14.0145
|
||||
529.859 14.0209 529.812 14.0278
|
||||
93.0909 171.981 93.1091 171.977
|
||||
93.2134 171.923 93.16 171.942
|
||||
93.1819 171.962 93.1455 171.97
|
||||
688.606 49.1642 688.685 49.1313
|
||||
688.818 49.0375 688.782 49.045
|
||||
688.763 49.0985 688.685 49.1313
|
||||
529.467 14.1929 529.573 14.1543
|
||||
529.812 14.0278 529.766 14.0348
|
||||
529.68 14.1157 529.573 14.1543
|
||||
93.2667 171.904 93.3201 171.884
|
||||
93.2667 171.904 93.2134 171.923
|
||||
93.1455 171.97 93.1091 171.977
|
||||
688.563 49.0901 688.418 49.1201
|
||||
688.951 49.0205 688.941 49.0246
|
||||
688.854 49.03 688.818 49.0375
|
||||
529.531 14.0696 529.438 14.0835
|
||||
529.933 14.0241 529.92 14.0289
|
||||
529.719 14.0417 529.625 14.0557
|
||||
93.1819 171.962 93.2183 171.955
|
||||
93.4268 171.846 93.3201 171.884
|
||||
93.3638 171.925 93.291 171.94
|
||||
688.211 49.3284 688.369 49.2627
|
||||
688.636 49.0751 688.563 49.0901
|
||||
688.527 49.197 688.369 49.2627
|
||||
528.933 14.3857 529.146 14.3086
|
||||
529.625 14.0557 529.531 14.0696
|
||||
529.36 14.2314 529.146 14.3086
|
||||
93.5334 171.807 93.6401 171.769
|
||||
93.5334 171.807 93.4268 171.846
|
||||
93.291 171.94 93.2183 171.955
|
||||
688.127 49.1802 687.836 49.2402
|
||||
688.901 49.041 688.882 49.0493
|
||||
688.709 49.0601 688.636 49.0751
|
||||
529.062 14.1392 528.875 14.167
|
||||
529.867 14.0482 529.84 14.0579
|
||||
529.438 14.0835 529.25 14.1113
|
||||
93.3638 171.925 93.4365 171.91
|
||||
93.8535 171.691 93.6401 171.769
|
||||
93.7275 171.85 93.582 171.88
|
||||
687.423 49.6567 687.738 49.5254
|
||||
688.272 49.1501 688.127 49.1802
|
||||
688.054 49.394 687.738 49.5254
|
||||
527.866 14.7715 528.293 14.6172
|
||||
529.25 14.1113 529.062 14.1392
|
||||
528.72 14.4629 528.293 14.6172
|
||||
94.0669 171.614 94.2803 171.537
|
||||
94.0669 171.614 93.8535 171.691
|
||||
93.582 171.88 93.4365 171.91
|
||||
687.254 49.3604 686.672 49.4805
|
||||
688.803 49.0821 688.763 49.0985
|
||||
688.418 49.1201 688.272 49.1501
|
||||
528.125 14.2783 527.75 14.334
|
||||
529.733 14.0964 529.68 14.1157
|
||||
528.875 14.167 528.5 14.2227
|
||||
93.7275 171.85 93.873 171.82
|
||||
94.707 171.383 94.2803 171.537
|
||||
94.4551 171.7 94.1641 171.76
|
||||
685.846 50.3135 686.477 50.0508
|
||||
687.545 49.3003 687.254 49.3604
|
||||
687.107 49.7881 686.477 50.0508
|
||||
525.732 15.543 526.586 15.2344
|
||||
528.5 14.2227 528.125 14.2783
|
||||
527.439 14.9258 526.586 15.2344
|
||||
95.1338 171.229 95.5605 171.074
|
||||
95.1338 171.229 94.707 171.383
|
||||
94.1641 171.76 93.873 171.82
|
||||
685.508 49.7207 684.344 49.9609
|
||||
688.606 49.1642 688.527 49.197
|
||||
687.836 49.2402 687.545 49.3003
|
||||
526.25 14.5566 525.5 14.668
|
||||
529.467 14.1929 529.36 14.2314
|
||||
527.75 14.334 527 14.4453
|
||||
94.4551 171.7 94.7461 171.64
|
||||
96.4141 170.766 95.5605 171.074
|
||||
95.9102 171.399 95.3281 171.52
|
||||
682.691 51.627 683.953 51.1016
|
||||
686.09 49.6006 685.508 49.7207
|
||||
685.215 50.5762 683.953 51.1016
|
||||
521.465 17.0859 523.172 16.4688
|
||||
527 14.4453 526.25 14.5566
|
||||
524.879 15.8516 523.172 16.4688
|
||||
97.2676 170.457 98.1211 170.148
|
||||
97.2676 170.457 96.4141 170.766
|
||||
95.3281 171.52 94.7461 171.64
|
||||
682.016 50.4414 679.688 50.9219
|
||||
688.211 49.3284 688.054 49.394
|
||||
686.672 49.4805 686.09 49.6006
|
||||
522.5 15.1133 521 15.3359
|
||||
528.933 14.3857 528.72 14.4629
|
||||
525.5 14.668 524 14.8906
|
||||
95.9102 171.399 96.4922 171.279
|
||||
99.8281 169.531 98.1211 170.148
|
||||
98.8203 170.799 97.6562 171.039
|
||||
676.383 54.2539 678.906 53.2031
|
||||
683.18 50.2012 682.016 50.4414
|
||||
681.43 52.1523 678.906 53.2031
|
||||
512.93 20.1719 516.344 18.9375
|
||||
524 14.8906 522.5 15.1133
|
||||
519.758 17.7031 516.344 18.9375
|
||||
101.535 168.914 103.242 168.297
|
||||
101.535 168.914 99.8281 169.531
|
||||
97.6562 171.039 96.4922 171.279
|
||||
675.031 51.8828 670.375 52.8438
|
||||
687.423 49.6567 687.107 49.7881
|
||||
684.344 49.9609 683.18 50.2012
|
||||
515 16.2266 512 16.6719
|
||||
527.866 14.7715 527.439 14.9258
|
||||
521 15.3359 518 15.7812
|
||||
98.8203 170.799 99.9844 170.559
|
||||
106.656 167.062 103.242 168.297
|
||||
104.641 169.598 102.312 170.078
|
||||
663.766 59.5078 668.812 57.4062
|
||||
677.359 51.4023 675.031 51.8828
|
||||
673.859 55.3047 668.812 57.4062
|
||||
495.859 26.3438 502.688 23.875
|
||||
518 15.7812 515 16.2266
|
||||
509.516 21.4062 502.688 23.875
|
||||
113.484 164.594 120.312 162.125
|
||||
110.07 165.828 113.484 164.594
|
||||
110.07 165.828 106.656 167.062
|
||||
102.312 170.078 99.9844 170.559
|
||||
661.062 54.7656 651.75 56.6875
|
||||
685.846 50.3135 685.215 50.5762
|
||||
679.688 50.9219 677.359 51.4023
|
||||
500 18.4531 494 19.3438
|
||||
525.732 15.543 524.879 15.8516
|
||||
512 16.6719 506 17.5625
|
||||
104.641 169.598 106.969 169.117
|
||||
116.281 167.195 111.625 168.156
|
||||
638.531 70.0156 648.625 65.8125
|
||||
665.719 53.8047 661.062 54.7656
|
||||
658.719 61.6094 648.625 65.8125
|
||||
461.719 38.6875 475.375 33.75
|
||||
506 17.5625 500 18.4531
|
||||
489.031 28.8125 475.375 33.75
|
||||
127.141 159.656 133.969 157.188
|
||||
127.141 159.656 120.312 162.125
|
||||
111.625 168.156 106.969 169.117
|
||||
633.125 60.5312 614.5 64.375
|
||||
682.691 51.627 681.43 52.1523
|
||||
670.375 52.8438 665.719 53.8047
|
||||
470 22.9062 458 24.6875
|
||||
521.465 17.0859 519.758 17.7031
|
||||
494 19.3438 482 21.125
|
||||
116.281 167.195 120.938 166.234
|
||||
147.625 152.25 133.969 157.188
|
||||
139.562 162.391 130.25 164.312
|
||||
642.438 58.6094 633.125 60.5312
|
||||
628.438 74.2188 608.25 82.625
|
||||
393.438 63.375 420.75 53.5
|
||||
482 21.125 470 22.9062
|
||||
461.719 38.6875 448.062 43.625
|
||||
161.281 147.312 174.938 142.375
|
||||
161.281 147.312 147.625 152.25
|
||||
130.25 164.312 120.938 166.234
|
||||
588.062 91.0312 608.25 82.625
|
||||
676.383 54.2539 673.859 55.3047
|
||||
651.75 56.6875 642.438 58.6094
|
||||
410 31.8125 386 35.375
|
||||
512.93 20.1719 509.516 21.4062
|
||||
458 24.6875 434 28.25
|
||||
311.5 93 256.875 112.75
|
||||
139.562 162.391 148.875 160.469
|
||||
202.25 132.5 174.938 142.375
|
||||
186.125 152.781 167.5 156.625
|
||||
420.75 53.5 448.062 43.625
|
||||
595.875 68.2188 614.5 64.375
|
||||
595.875 68.2188 577.25 72.0625
|
||||
567.875 99.4375 527.5 116.25
|
||||
229.562 122.625 256.875 112.75
|
||||
434 28.25 410 31.8125
|
||||
242 56.75 146 71
|
||||
229.562 122.625 202.25 132.5
|
||||
167.5 156.625 148.875 160.469
|
||||
465.5 95.125 391 110.5
|
||||
487.125 133.062 446.75 149.875
|
||||
540 79.75 577.25 72.0625
|
||||
588.062 91.0312 567.875 99.4375
|
||||
285.25 217.125 204.5 250.75
|
||||
366.125 73.25 311.5 93
|
||||
290 49.625 338 42.5
|
||||
386 35.375 338 42.5
|
||||
204.75 148.938 242 141.25
|
||||
186.125 152.781 204.75 148.938
|
||||
290 49.625 242 56.75
|
||||
393.438 63.375 366.125 73.25
|
||||
663.766 59.5078 658.719 61.6094
|
||||
279.25 133.562 242 141.25
|
||||
93.0045 171.999 93 172
|
||||
688.991 49.0019 689 49
|
||||
465.5 95.125 502.75 87.4375
|
||||
495.859 26.3438 489.031 28.8125
|
||||
279.25 133.562 316.5 125.875
|
||||
446.75 149.875 366 183.5
|
||||
527.5 116.25 487.125 133.062
|
||||
391 110.5 316.5 125.875
|
||||
204.5 250.75 43 318
|
||||
366 183.5 285.25 217.125
|
||||
638.531 70.0156 628.438 74.2188
|
||||
529.988 14.0017 530 14
|
||||
502.75 87.4375 540 79.75
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
44
|
||||
350 158.5 392.25 148.125
|
||||
408.5 180 356.75 198.5
|
||||
350 158.5 265.5 179.25
|
||||
305 217 356.75 198.5
|
||||
434.5 137.75 476.75 127.375
|
||||
432.75 98 494.5 87
|
||||
556.25 76 494.5 87
|
||||
486.125 152.25 512 143
|
||||
460.25 161.5 486.125 152.25
|
||||
378 270.25 303 262.5
|
||||
300 27.25 245 27
|
||||
311 53 340 51.625
|
||||
434.5 137.75 392.25 148.125
|
||||
408.5 180 460.25 161.5
|
||||
519 117 476.75 127.375
|
||||
355 27.5 382.5 27.625
|
||||
369 50.25 398 48.875
|
||||
437.5 27.875 410 27.75
|
||||
327.5 27.375 300 27.25
|
||||
427 47.5 456 46.125
|
||||
300.25 90.25 276.875 94.875
|
||||
378 270.25 453 278
|
||||
398 48.875 427 47.5
|
||||
371 109 432.75 98
|
||||
340 51.625 369 50.25
|
||||
456 46.125 485 44.75
|
||||
96 251.5 135 285.75
|
||||
303 262.5 228 254.75
|
||||
265.5 179.25 181 200
|
||||
556.25 76 618 65
|
||||
83 51 100 116.5
|
||||
263 82 215 53
|
||||
253.5 99.5 276.875 94.875
|
||||
253.5 99.5 160 118
|
||||
485 44.75 543 42
|
||||
410 27.75 382.5 27.625
|
||||
327.5 27.375 355 27.5
|
||||
167 24 215 53
|
||||
18 183 96 251.5
|
||||
153 247 228 254.75
|
||||
174 320 135 285.75
|
||||
465 28 437.5 27.875
|
||||
347 81 300.25 90.25
|
||||
117 182 100 116.5
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
32
|
||||
-2622.44 97.8238 -2622.44 -2962.18
|
||||
437.56 3157.82 -2622.44 3157.82
|
||||
3497.56 97.8238 3497.56 3157.82
|
||||
-2622.44 97.8238 -2622.44 3157.82
|
||||
-583 97.25 -583 -922.75
|
||||
500.981 34.6916 591.49 34.8458
|
||||
516.76 78.8601 594.52 58.2201
|
||||
361.24 120.14 283.48 140.78
|
||||
283.48 140.78 196 164
|
||||
286.501 162.75 377.002 161.499
|
||||
95 34 276.019 34.3084
|
||||
361.24 120.14 439 99.5
|
||||
388.5 34.5 500.981 34.6916
|
||||
485.5 160 593.998 158.501
|
||||
439 99.5 516.76 78.8601
|
||||
276.019 34.3084 388.5 34.5
|
||||
485.5 160 377.002 161.499
|
||||
591.49 34.8458 682 35
|
||||
1457 1117.25 1457 97.25
|
||||
-583 1117.25 437 1117.25
|
||||
3497.56 3157.82 437.56 3157.82
|
||||
286.501 162.75 196 164
|
||||
437 -922.75 1457 -922.75
|
||||
437 1117.25 1457 1117.25
|
||||
437.56 -2962.18 -2622.44 -2962.18
|
||||
1457 97.25 1457 -922.75
|
||||
437 -922.75 -583 -922.75
|
||||
3497.56 -2962.18 3497.56 97.8238
|
||||
775 156 593.998 158.501
|
||||
-583 97.25 -583 1117.25
|
||||
594.52 58.2201 682 35
|
||||
437.56 -2962.18 3497.56 -2962.18
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
6
|
||||
419 132 699 200
|
||||
626 111 419 132
|
||||
213 166 699 200
|
||||
626 111 273 89
|
||||
273 89 431 41
|
||||
431 41 76 58
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
29
|
||||
120 465.84 120 475.44
|
||||
480 465.84 464.64 463.44
|
||||
480 475.44 480 465.84
|
||||
453.6 456.72 464.64 463.44
|
||||
444.48 443.76 453.6 456.72
|
||||
480 475.44 347.52 475.44
|
||||
293.28 124.56 166.56 421.2
|
||||
147.36 453.84 166.56 421.2
|
||||
120 475.44 222.72 475.44
|
||||
187.2 443.76 191.52 424.08
|
||||
444.48 443.76 302.88 124.56
|
||||
372.96 462.96 347.52 465.84
|
||||
347.52 475.44 347.52 465.84
|
||||
352.32 362.64 372.48 410.64
|
||||
372.48 410.64 383.52 446.64
|
||||
120 465.84 132 463.92
|
||||
132 463.92 147.36 453.84
|
||||
216.48 362.64 191.52 424.08
|
||||
380.16 457.68 383.52 446.64
|
||||
372.96 462.96 380.16 457.68
|
||||
222.72 465.84 200.64 462.96
|
||||
222.72 475.44 222.72 465.84
|
||||
187.2 443.76 191.04 456.72
|
||||
191.04 456.72 200.64 462.96
|
||||
293.28 124.56 302.88 124.56
|
||||
224.64 342 284.16 198.48
|
||||
216.48 362.64 352.32 362.64
|
||||
284.16 198.48 344.64 342
|
||||
224.64 342 344.64 342
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
18
|
||||
-401.015 -355.33 -370.558 -368.02
|
||||
-456.853 -335.025 -477.157 -355.33
|
||||
-477.157 -355.33 -510.152 -365.482
|
||||
-238.579 324.873 -456.853 -335.025
|
||||
-510.152 -365.482 -370.558 -368.02
|
||||
-149.746 -119.289 -81.2183 -342.64
|
||||
-418.782 -337.563 -350.254 -119.289
|
||||
-12.6904 -360.406 -40.6091 -342.64
|
||||
27.9188 -365.482 -12.6904 -360.406
|
||||
-40.6091 -342.64 -238.579 324.873
|
||||
-91.3706 -357.868 -124.365 -368.02
|
||||
-81.2183 -342.64 -91.3706 -357.868
|
||||
-124.365 -368.02 27.9188 -365.482
|
||||
-350.254 -119.289 -149.746 -119.289
|
||||
-342.64 -78.6802 -157.36 -78.6802
|
||||
-401.015 -355.33 -418.782 -337.563
|
||||
-241.117 218.274 -342.64 -78.6802
|
||||
-157.36 -78.6802 -241.117 218.274
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Shewchuk Triangle .poly file, produced by the CGAL::Mesh_2 package
|
||||
# Neither attributes nor boundary markers are used.
|
||||
5 2 0 0
|
||||
|
||||
1 -4.0 0.0
|
||||
2 0.0 -1.0
|
||||
3 4.0 0.0
|
||||
4 0.0 1.0
|
||||
5 2.0 0.6
|
||||
|
||||
4 0
|
||||
1 1 2
|
||||
2 2 3
|
||||
3 3 4
|
||||
4 4 1
|
||||
|
||||
0
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
#ifdef CGAL_USE_QT
|
||||
|
||||
#include <CGAL/IO/pixmaps/polygon.xpm>
|
||||
#include <CGAL/IO/pixmaps/point.xpm>
|
||||
#include <CGAL/IO/pixmaps/points.xpm>
|
||||
#include "contraints.xpm"
|
||||
#include "marked.xpm"
|
||||
#include "seeds.xpm"
|
||||
#include <CGAL/IO/pixmaps/circle.xpm>
|
||||
#include <CGAL/IO/pixmaps/triangulation.xpm>
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
extern const char *polygon_xpm[],
|
||||
*point_xpm[],
|
||||
*points_xpm[],
|
||||
*contraints_xpm[],
|
||||
*marked_xpm[],
|
||||
*seeds_xpm[],
|
||||
*circle_xpm[],
|
||||
*triangulation_xpm[];
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
# Created by the script cgal_create_makefile
|
||||
# This is the makefile for compiling a CGAL application.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# include platform specific settings
|
||||
#---------------------------------------------------------------------#
|
||||
# Choose the right include file from the <cgalroot>/make directory.
|
||||
|
||||
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
|
||||
include $(CGAL_MAKEFILE)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compiler flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
OTHER_CXXFLAGS=
|
||||
|
||||
CXXFLAGS = \
|
||||
-I../../include \
|
||||
-I../../../Triangulation_2/include \
|
||||
$(CGAL_CXXFLAGS) \
|
||||
$(LONG_NAME_PROBLEM_CXXFLAGS) \
|
||||
$(OTHER_CXXFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# linker flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
LIBPATH = \
|
||||
$(CGAL_LIBPATH)
|
||||
|
||||
LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_QT_LDFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# target entries
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
all: \
|
||||
mesh_demo$(EXE_EXT) \
|
||||
mesh$(EXE_EXT) \
|
||||
conform$(EXE_EXT)
|
||||
|
||||
Qt_widget_styled_layer.moc: Qt_widget_styled_layer.h
|
||||
$(QT_MOC) -o Qt_widget_styled_layer.moc Qt_widget_styled_layer.h
|
||||
|
||||
Qt_widget_styled_layer$(OBJ_EXT): Qt_widget_styled_layer.moc
|
||||
|
||||
Qt_widget_style_editor.moc: Qt_widget_style_editor.h
|
||||
$(QT_MOC) -o Qt_widget_style_editor.moc Qt_widget_style_editor.h
|
||||
|
||||
Qt_widget_style_editor-aux.moc: Qt_widget_style_editor-aux.h
|
||||
$(QT_MOC) -o Qt_widget_style_editor-aux.moc Qt_widget_style_editor-aux.h
|
||||
|
||||
Qt_widget_style_editor$(OBJ_EXT): Qt_widget_style_editor-aux.moc Qt_widget_style_editor.moc
|
||||
|
||||
|
||||
Show_points.moc: Show_points.h
|
||||
$(QT_MOC) -o Show_points.moc Show_points.h
|
||||
|
||||
Show_points$(OBJ_EXT): Show_points.moc Show_points.C
|
||||
|
||||
Show_segments_base.moc: Show_segments_base.h
|
||||
$(QT_MOC) -o Show_segments_base.moc Show_segments_base.h
|
||||
|
||||
Show_segments_base$(OBJ_EXT): Show_segments_base.moc Show_segments_base.C
|
||||
|
||||
icons$(OBJ_EXT): seeds.xpm marked.xpm contraints.xpm
|
||||
|
||||
mesh_demo.moc: mesh_demo.C
|
||||
$(QT_MOC) -o mesh_demo.moc $<
|
||||
|
||||
Show_clusters.moc: Show_clusters.h
|
||||
$(QT_MOC) -o Show_clusters.moc $<
|
||||
|
||||
mesh_demo$(OBJ_EXT): mesh_demo.moc Show_clusters.moc Show_segments_base.moc\
|
||||
Show_points.h \
|
||||
Qt_widget_style_editor.h
|
||||
|
||||
mesh_demo$(EXE_EXT): mesh_demo$(OBJ_EXT) icons$(OBJ_EXT) \
|
||||
Show_points$(OBJ_EXT) \
|
||||
Show_segments_base$(OBJ_EXT) \
|
||||
Qt_widget_styled_layer$(OBJ_EXT) \
|
||||
Qt_widget_style_editor$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)mesh_demo \
|
||||
mesh_demo$(OBJ_EXT) \
|
||||
icons$(OBJ_EXT) \
|
||||
Show_points$(OBJ_EXT) \
|
||||
Show_segments_base$(OBJ_EXT) \
|
||||
Qt_widget_styled_layer$(OBJ_EXT) \
|
||||
Qt_widget_style_editor$(OBJ_EXT) \
|
||||
$(LDFLAGS)
|
||||
|
||||
run_mesh_demo: mesh_demo$(EXE_EXT)
|
||||
./mesh_demo$(EXE_EXT)
|
||||
|
||||
conform$(EXE_EXT): conform$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)conform conform$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
mesh$(EXE_EXT): mesh$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)mesh mesh$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
clean: \
|
||||
icons.clean \
|
||||
mesh_demo.clean \
|
||||
mesh.clean \
|
||||
conform.clean \
|
||||
Show_points.clean \
|
||||
Show_segments_base.clean \
|
||||
Qt_widget_styled_layer.clean \
|
||||
Qt_widget_style_editor.clean
|
||||
rm -f Show_clusters.moc Qt_widget_style_editor-aux.moc
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# suffix rules
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
.C$(OBJ_EXT):
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/* XPM */
|
||||
const char * marked_xpm[] = {
|
||||
"32 32 4 1",
|
||||
" c None",
|
||||
". c #000080",
|
||||
"+ c #0CFF00",
|
||||
"@ c #FFFFFF",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ............. ",
|
||||
" ..++++++++++... ",
|
||||
" .+.++++++++.@.+. ",
|
||||
" .++.+++++++.+.++. ",
|
||||
" .+++.+++++.++.+++. ",
|
||||
" .+++.++++.+++.++++. ",
|
||||
" .+++++.++.++++.+++++. ",
|
||||
" .++++++..++++.++++... ",
|
||||
" .+++++++...+++.++..@.. ",
|
||||
" .+++++....@......++.+. ",
|
||||
" .++++.+.@.@@@@.++++.+. ",
|
||||
" .+++..++.@@.@@@.+++.++. ",
|
||||
" .++.++++.@@.@@@.+++.+++. ",
|
||||
" ...+++++.@@@.@@.++.++++. ",
|
||||
" ..++++++.@@@@@.@.++.++++. ",
|
||||
" ...+++++.@@@@@.@.+.+++++. ",
|
||||
" .++......@@@@@@..+.+++++. ",
|
||||
" .+++++++.....@@.......... ",
|
||||
" .+++++..+.+++.....++++. ",
|
||||
" .++++.++++.++++++.+++. ",
|
||||
" .+++.++++++.+++++.++. ",
|
||||
" .+..++++++++.+++.++. ",
|
||||
" ..+++++++++++.++.++. ",
|
||||
" .....+++++++++.+.+. ",
|
||||
" ........++... ",
|
||||
" .... ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
// Copyright (c) 2003-2006 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public License as
|
||||
// published by the Free Software Foundation; version 2.1 of the License.
|
||||
// See the file LICENSE.LGPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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 <CGAL/basic.h>
|
||||
|
||||
// if QT is not installed, a message will be issued in runtime.
|
||||
#ifndef CGAL_USE_QT
|
||||
#include <iostream>
|
||||
|
||||
int main(int, char*)
|
||||
{
|
||||
|
||||
std::cout << "Sorry, this demo needs QT...";
|
||||
std::cout << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Filtered_kernel.h>
|
||||
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
|
||||
#include <CGAL/Delaunay_mesher_2.h>
|
||||
#include <CGAL/Delaunay_mesh_face_base_2.h>
|
||||
#include <CGAL/Delaunay_mesh_area_criteria_2.h>
|
||||
#include <CGAL/IO/File_poly.h>
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> K1;
|
||||
typedef CGAL::Filtered_kernel<K1> K2;
|
||||
struct K : public K2 {};
|
||||
|
||||
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
|
||||
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds,
|
||||
CGAL::Exact_predicates_tag> Tr;
|
||||
typedef CGAL::Delaunay_mesh_area_criteria_2<Tr> Meshcriteria;
|
||||
|
||||
typedef K::Point_2 Point;
|
||||
|
||||
void usage(char** argv)
|
||||
{
|
||||
std::cerr << "Usage: " << std::endl
|
||||
<< argv[0] << " [-Q] [-a area] input.poly [output.poly]" << std::endl;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int arg_count = 1;
|
||||
bool terminal_output = true;
|
||||
Meshcriteria criteria;
|
||||
Tr t;
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
while(argv[arg_count][0] == '-' && argv[arg_count] != "--")
|
||||
{
|
||||
if(std::string(argv[arg_count]) == "-Q")
|
||||
terminal_output = false;
|
||||
else if(std::string(argv[arg_count]) == "-a")
|
||||
{
|
||||
double area_bound;
|
||||
if( (argc > arg_count+1) &&
|
||||
std::istringstream(argv[arg_count+1]) >> area_bound )
|
||||
{
|
||||
criteria.set_area_bound(area_bound);
|
||||
++arg_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "The area " << argv[arg_count+1]
|
||||
<< " is not a double." << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Unknown option " << argv[arg_count] << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
++arg_count;
|
||||
}
|
||||
if(argv[arg_count] == "--")
|
||||
++arg_count;
|
||||
|
||||
if(argc < arg_count+1 || argc > arg_count+2)
|
||||
{
|
||||
usage(argv);
|
||||
return 1;
|
||||
};
|
||||
|
||||
std::ifstream input(argv[arg_count]);
|
||||
if(input)
|
||||
{
|
||||
CGAL::read_triangle_poly_file(t, input);
|
||||
CGAL::refine_Delaunay_mesh_2(t, criteria);
|
||||
|
||||
if(argc==arg_count+1)
|
||||
{
|
||||
if(terminal_output)
|
||||
CGAL::write_triangle_poly_file(t, std::cout);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::ofstream output(argv[arg_count+1]);
|
||||
CGAL::write_triangle_poly_file(t, output);
|
||||
}
|
||||
if(terminal_output)
|
||||
std::cerr
|
||||
<< "Mesh points: " << t.number_of_vertices() << std::endl
|
||||
<< "Mesh triangles: " << t.number_of_faces () << std::endl;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Bad file: " << argv[arg_count] << std::endl;
|
||||
usage(argv);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
#endif // CGAL_USE_QT
|
||||
|
|
@ -0,0 +1,348 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="mesh_demo"
|
||||
ProjectGUID="{FAA5B40B-55E5-42D3-8EE2-479CD8E3F477}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Zm900"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../include/CGAL/config/msvc7;../../include;$(QTDIR)/include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CGAL_USE_QT"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cgal.lib cgalqt.lib qt-mt.lib qtmain.lib wsock32.lib winmm.lib imm32.lib"
|
||||
OutputFile="$(OutDir)/mesh_demo.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/robustness.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o mesh_demo.moc mesh_demo.C"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Zm900"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="../../include/CGAL/config/msvc7;../../include;$(QTDIR)/include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;CGAL_USE_QT"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cgal.lib cgalqt.lib qt-mt.lib qtmain.lib wsock32.lib winmm.lib imm32.lib"
|
||||
OutputFile="$(OutDir)/mesh_demo.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o mesh_demo.moc mesh_demo.C"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath=".\icons.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mesh_demo.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_widget_style_editor.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_widget_styled_layer.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Show_points.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Show_segments_base.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
<File
|
||||
RelativePath=".\icons.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_layer_show_circles.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_layer_show_triangulation.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_layer_show_triangulation_constraints.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_widget_style_editor-aux.h">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Qt_widget_style_editor-aux.moc Qt_widget_style_editor-aux.h"
|
||||
Outputs="Qt_widget_style_editor-aux.moc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Qt_widget_style_editor-aux.moc Qt_widget_style_editor-aux.h"
|
||||
Outputs="Qt_widget_style_editor-aux.moc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_widget_style_editor.h">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Qt_widget_style_editor.moc Qt_widget_style_editor.h"
|
||||
Outputs="Qt_widget_style_editor.moc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Qt_widget_style_editor.moc Qt_widget_style_editor.h"
|
||||
Outputs="Qt_widget_style_editor.moc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Qt_widget_styled_layer.h">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Qt_widget_styled_layer.moc Qt_widget_styled_layer.h"
|
||||
Outputs="t_widget_styled_layer.moc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Qt_widget_styled_layer.moc Qt_widget_styled_layer.h"
|
||||
Outputs="t_widget_styled_layer.moc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Show_clusters.h">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Show_clusters.moc Show_clusters.h"
|
||||
Outputs="Show_clusters.moc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Show_clusters.moc Show_clusters.h"
|
||||
Outputs="Show_clusters.moc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Show_points.h">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Show_points.moc Show_points.h"
|
||||
Outputs="Show_points.moc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Show_points.moc Show_points.h"
|
||||
Outputs="Show_points.moc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Show_segments.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Show_segments_base.h">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Show_segments_base.moc Show_segments_base.h"
|
||||
Outputs="Show_segments_base.moc"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="$(QTDIR)/bin/moc.exe -o Show_segments_base.moc Show_segments_base.h"
|
||||
Outputs="Show_segments_base.moc"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/* XPM */
|
||||
const char * seeds_xpm[] = {
|
||||
"32 32 4 1",
|
||||
" c None",
|
||||
". c #FF0000",
|
||||
"+ c #00FF00",
|
||||
"@ c #000000",
|
||||
" ..++++++++++++++",
|
||||
" ..+++++++++++++++",
|
||||
" ..++++++++++++++++",
|
||||
" ..++++++++++++++++++",
|
||||
" ..+++++++++++++++++++",
|
||||
" ..++++++++++++++++++++",
|
||||
" ..++++++++++++@++++++++",
|
||||
" @ ..++++++++++++@+++++++++",
|
||||
" ..++++++++++++@@++++++++++",
|
||||
" ..@@++++++++++@@+++++++++++",
|
||||
" ..+++@+++++++++@++++++++++++",
|
||||
" ..+++++@@+++++@@+++++++++++++",
|
||||
" ..++++++++@@+++@@++++++++++++++",
|
||||
"..++++++++++@@+@@+++++++++++++++",
|
||||
".++++++++++++@@@++++++++++++++++",
|
||||
"+++++++++++++@@@++++++++++++++++",
|
||||
"++++++++++++@@+@@+++++++++++++++",
|
||||
"+++++++++++@@+++@@@+++++++++++++",
|
||||
"++++++++++@@++++++@@++++++++++++",
|
||||
"+++++++++@@++++++++@@+++++++++++",
|
||||
"++++++++@@++++++++++@@++++++++++",
|
||||
"+++++++@@++++++++++++@@+++++++++",
|
||||
"++++++@@++++++++++++++@@++++++++",
|
||||
"..+++++++++++++++++++++@@+++++++",
|
||||
" .....++++++++++++++++++++++++++",
|
||||
" ....+++++++++++++++++++++++",
|
||||
" ....++++++++++++++++++++",
|
||||
" ...+++++++++++++++++",
|
||||
" ....+++++++++++++",
|
||||
" ....++++++++++",
|
||||
" ....+++++++",
|
||||
" ....+++"};
|
||||
|
|
@ -0,0 +1 @@
|
|||
2d meshing package
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
all:
|
||||
cgal_manual Mesh_2 Mesh_2_ref
|
||||
|
||||
ps:
|
||||
cgal_manual -ps Mesh_2 Mesh_2_ref
|
||||
|
||||
html:
|
||||
cgal_manual -html Mesh_2 Mesh_2_ref
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
\begin{ccPkgDescription}{2D Conforming Triangulations and Meshes\label{Pkg:Mesh2}}
|
||||
\ccPkgSummary{
|
||||
This package implements a Delaunay refinement algorithm to construct
|
||||
conforming triangulations and 2D meshes.
|
||||
|
||||
Conforming Delaunay triangulations are obtained from constrained
|
||||
Delaunay triangulations by refining constrained edges until they are
|
||||
Delaunay edges. Conforming Gabriel triangulations are obtained by further
|
||||
refining constrained edges until they become Gabriel edges.
|
||||
|
||||
The package provides also a 2D mesher that refines triangles
|
||||
and constrained edges until user defined size and shape criteria on triangles
|
||||
are satisfied.
|
||||
The package can handle intersecting input constraints
|
||||
and set no restriction on the angle formed
|
||||
by two constraints sharing an endpoint.}
|
||||
|
||||
\ccPkgDependsOn{\ccRef[2D Delaunay Triangulation]{Pkg:Triangulation2}}
|
||||
\ccPkgIntroducedInCGAL{3.1}
|
||||
\ccPkgLicense{\ccLicenseQPL}
|
||||
\end{ccPkgDescription}
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -0,0 +1,355 @@
|
|||
\ccUserChapter{2D Conforming Triangulations and Meshes}
|
||||
\label{user_chapter_2D_Meshes}
|
||||
|
||||
\ccChapterAuthor{Laurent Rineau}
|
||||
|
||||
\input{Mesh_2/PkgDescription}
|
||||
|
||||
\minitoc
|
||||
|
||||
This package implements Shewchuk's algorithm \cite{s-mgdsa-00} to construct
|
||||
conforming triangulations and 2D meshes. Conforming triangulations will be
|
||||
described in Section~\ref{sec:Mesh_2_conforming_triangulation} and
|
||||
meshes in Section~\ref{sec:Mesh_2_meshes}.
|
||||
|
||||
\section{Conforming Triangulations}
|
||||
\label{sec:Mesh_2_conforming_triangulation}
|
||||
|
||||
\subsection{Definitions}
|
||||
\label{sec:Mesh_2_conforming_definitions}
|
||||
|
||||
A triangulation is a \emph{Delaunay triangulation} if the circumscribing
|
||||
circle of any facet of the triangulation contains no vertex in its
|
||||
interior. A \emph{constrained} Delaunay triangulation is a constrained
|
||||
triangulation which is as much Delaunay as possible. The circumscribing
|
||||
circle of any facet of a constrained Delaunay triangulation contains in its
|
||||
interior no data point \emph{visible} from the facet.
|
||||
|
||||
An edge is said to be a \emph{Delaunay edge} if it is inscribed in an empty
|
||||
circle (containing no data point in its interior). This edge is said to be a
|
||||
\emph{Gabriel edge} if its diametrical circle is empty.
|
||||
|
||||
A constrained Delaunay triangulation is said to be a \emph{conforming
|
||||
Delaunay triangulation} if every constrained edge is a Delaunay edge.
|
||||
Because any edge in a constrained Delaunay triangulation is either a
|
||||
Delaunay edge or a constrained edge, a conforming Delaunay triangulation is
|
||||
in fact a Delaunay triangulation. The only difference is that some of the
|
||||
edges are marked as constrained edges.
|
||||
|
||||
A constrained Delaunay triangulation is said to be a \emph{conforming
|
||||
Gabriel triangulation} if every constrained edge is a Gabriel edge. The
|
||||
Gabriel property is stronger than the Delaunay property and each Gabriel
|
||||
edge is a Delaunay edge. Conforming Gabriel triangulations are thus also
|
||||
conforming Delaunay triangulations.
|
||||
|
||||
Any constrained Delaunay triangulation can be refined into a
|
||||
conforming Delaunay triangulation or into a conforming Gabriel
|
||||
triangulation by adding vertices, called \emph{Steiner vertices}, on
|
||||
constrained edges until they are decomposed into subconstraints small enough
|
||||
to be Delaunay or Gabriel edges.
|
||||
|
||||
\subsection{Building Conforming Triangulations}
|
||||
\label{sec:Mesh_2_building_conforming}
|
||||
|
||||
Constrained Delaunay triangulations can be refined into
|
||||
conforming triangulations
|
||||
by the two following global functions: \\
|
||||
\ccc{template<class CDT> void make_conforming_Delaunay_2 (CDT& t)}~and\\
|
||||
\ccc{template<class CDT> void make_conforming_Gabriel_2 (CDT& t)}.
|
||||
|
||||
In both cases, the template parameter \ccc{CDT} must be instantiated
|
||||
by a constrained Delaunay triangulation class. Such a class must be a
|
||||
model of the concept \ccc{ConstrainedDelaunayTriangulation_2}.
|
||||
|
||||
The geometric traits of the constrained
|
||||
Delaunay triangulation used to instantiate the parameter \ccc{CDT} has to
|
||||
be a model of the concept \ccc{ConformingDelaunayTriangulationTraits_2}.
|
||||
|
||||
The constrained Delaunay triangulation \ccc{t} is passed by reference
|
||||
and is refined into a conforming Delaunay triangulation or into a
|
||||
conforming Gabriel triangulation by adding vertices. The user is advised to
|
||||
make a copy of the input triangulation in the case where the original
|
||||
triangulation has to be preserved for other computations
|
||||
|
||||
The algorithm used by \ccc{make_conforming_Delaunay_2} and
|
||||
\ccc{make_conforming_Gabriel_2} builds internal data structures that would be
|
||||
computed twice if the two functions are called consecutively on the same
|
||||
triangulation. In order to avoid these data to be constructed twice, the
|
||||
advanced user can use the class \ccc{Triangulation_conformer_2<CDT>} to
|
||||
refine a constrained Delaunay triangulation into a conforming Delaunay
|
||||
triangulation and then into a conforming Gabriel triangulation. For
|
||||
additional control of the refinement algorithm, this class also provides
|
||||
separate functions to insert one Steiner point at a time.
|
||||
|
||||
\subsection{Example: Making a Triangulation Conforming Delaunay and Then
|
||||
Conforming Gabriel}
|
||||
\label{sec:Mesh_2_example_making_conforming}
|
||||
|
||||
This example inserts several segments into a constrained Delaunay
|
||||
triangulation, makes it conforming Delaunay, and then conforming
|
||||
Gabriel. At each step, the number of vertices of the triangulation is
|
||||
printed.
|
||||
|
||||
\ccIncludeExampleCode{Mesh_2/conforming.C}
|
||||
|
||||
See figures~\ref{Conform-example-conform},
|
||||
\ref{Conform-example-conform-Delaunay}
|
||||
and~\ref{Conform-example-conform-Gabriel}.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/example-conform}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./example-conform.png"
|
||||
align=center title="Initial triangulation.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{Initial triangulation.}
|
||||
\label{Conform-example-conform}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/example-conform-Delaunay}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./example-conform-Delaunay.png"
|
||||
align=center title="The corresponding conforming Delaunay triangulation.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{The corresponding conforming Delaunay triangulation.}
|
||||
\label{Conform-example-conform-Delaunay}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/example-conform-Gabriel}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./example-conform-Gabriel.png"
|
||||
align=center title="The corresponding conforming Gabriel triangulation.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{The corresponding conforming Gabriel triangulation.}
|
||||
\label{Conform-example-conform-Gabriel}
|
||||
\end{figure}
|
||||
|
||||
\section{Meshes}
|
||||
\label{sec:Mesh_2_meshes}
|
||||
|
||||
|
||||
\subsection{Definitions}
|
||||
\label{sec:Mesh_2_meshes_definition}
|
||||
|
||||
A mesh is a partition of a given region into simplices whose shapes
|
||||
and sizes satisfy several criteria.
|
||||
|
||||
The domain is the region that the user wants to mesh. It has to be
|
||||
a bounded region of the plane. The domain is defined by a \emph{planar
|
||||
straight line graph}, {\sc Pslg} for short, which is a set of segments
|
||||
such that two segments in the set are either disjoint or share an
|
||||
endpoint. The segments of the {\sc Pslg} are constraints that will be
|
||||
represented by a union of edges in the mesh. The {\sc Pslg} can also
|
||||
contain isolated points that will appear as vertices of the mesh.
|
||||
|
||||
The segments of the {\sc Pslg} are either segments of the
|
||||
boundary or internals constraints. The segments of the {\sc Pslg} have to
|
||||
cover the boundary of the domain.
|
||||
|
||||
The {\sc Pslg} divides the plane into several connected components. By
|
||||
default, the domain is the union of the bounded connected components. The
|
||||
user can override this default by providing a set of seed points. Either
|
||||
seed points mark components to be meshed or they mark components not to be
|
||||
meshed (holes).
|
||||
|
||||
See figures~\ref{Domain} and~\ref{Domain-mesh} for an example of a domain
|
||||
defined without using seed points, and a possible mesh of it. See
|
||||
figure~\ref{Domain-seeds} for another domain defined with the same {\sc
|
||||
Pslg} and two seed points used to define holes.
|
||||
In the corresponding mesh (figure~\ref{Domain-seeds-mesh}), these
|
||||
two holes are triangulated but not meshed.
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/domain}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./domain.png"
|
||||
align=center title="A domain defined without seed points.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{A domain defined without seed points.}
|
||||
\label{Domain}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/domain-mesh}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./domain-mesh.png"
|
||||
align=center title="A mesh of the domain defined without seed points.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{A mesh of the domain defined without seed points.}
|
||||
\label{Domain-mesh}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/domain-seeds}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./domain-seeds.png"
|
||||
align=center title="A domain with two seeds points defining holes.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{A domain with two seeds points defining holes.}
|
||||
\label{Domain-seeds}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[htbp]
|
||||
\begin{center}
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=8cm]{Mesh_2/domain-seeds-mesh}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img border=0 src="./domain-seeds-mesh.png"
|
||||
align=center title="A mesh of the domain with seeds defining holes.">
|
||||
\end{ccHtmlOnly}
|
||||
\end{center}
|
||||
\caption{A mesh of the domain with two seeds defining holes.}
|
||||
\label{Domain-seeds-mesh}
|
||||
\end{figure}
|
||||
|
||||
\subsection{Shape and Size Criteria}
|
||||
\label{sec:Mesh_2_criteria}
|
||||
|
||||
The shape criterion for triangles is a lower bound $B$ on the ratio
|
||||
between the circumradius and the shortest edge length. Such a bound
|
||||
implies a lower bound of $\arcsin{\frac{1}{2B}}$ on the minimum angle
|
||||
of the triangle and an upper bound of $\pi - 2* \arcsin{\frac{1}{2B}}$
|
||||
on the maximum angle. Unfortunately, the termination of the algorithm
|
||||
is guaranteed only if $B \ge \sqrt{2}$, which corresponds to a lower
|
||||
bound of $20.7$~degrees over the angles.
|
||||
|
||||
The size criterion can be any criterion that tends to prefer small
|
||||
triangles. For example, the size criterion can be an upper bound on the
|
||||
length of longest edge of triangles, or an upper bound on the radius of the
|
||||
circumcircle. The size bound can vary over the domain. For example,
|
||||
the size criterion could impose a small size for the triangles intersecting
|
||||
a given line.
|
||||
|
||||
Both types of criteria are defined in an object \ccc{criteria} passed as
|
||||
parameter of the meshing functions.
|
||||
|
||||
\subsection{The Meshing Algorithm}
|
||||
|
||||
The input to a meshing problem is a {\sc Pslg} and a set of seeds
|
||||
describing the domain to be meshed, and a set of size and shape
|
||||
criteria. The algorithm implemented in this package starts with a
|
||||
constrained Delaunay triangulation of the input {\sc Pslg} and produces a
|
||||
mesh using the Delaunay refinement method. This method inserts new vertices to
|
||||
the triangulation, as far as possible from other vertices, and stops when the
|
||||
criteria are satisfied.
|
||||
|
||||
If all angles between incident segments of the input {\sc Pslg}
|
||||
are greater than $60$~degrees and if the bound on the
|
||||
circumradius/edge ratio is greater than $\sqrt{2}$,
|
||||
the algorithm is guaranteed to terminate with a mesh
|
||||
satisfying the size and shape criteria.
|
||||
|
||||
If some input angles are smaller than $60$~degrees, the algorithm will
|
||||
end up with a mesh in which some triangles violate the criteria near small
|
||||
input angles. This is unavoidable since small angles formed
|
||||
by input segments cannot be suppressed. Furthermore, it has been
|
||||
shown (\cite{s-mgdsa-00}), that some domains with small input angles
|
||||
cannot be meshed with angles even smaller than the small input angles.
|
||||
Note that if the domain is a polygonal region, the resulting mesh will
|
||||
satisfy size and shape criteria except for the small input angles.
|
||||
In addition, the algorithm may succeed in producing meshes with a lower
|
||||
angle bound greater than $20.7$~degrees, but there is no such guarantee.
|
||||
|
||||
\subsection{Building Meshes}
|
||||
\label{sec:Mesh_2_building_meshes}
|
||||
|
||||
Meshes are obtained from
|
||||
constrained Delaunay triangulations by calling the global function \\
|
||||
\ccc{template<class CDT, class Criteria> void refine_Delaunay_mesh_2 (CDT
|
||||
&t, typename CDT::Geom_traits gt)}. \\
|
||||
The template parameter \ccc{CDT} must be instantiated by a constrained
|
||||
Delaunay triangulation class, which is a model of the concept
|
||||
\ccc{ConstrainedDelaunayTriangulation_2}. In order to override the domain,
|
||||
a version of this function has two more arguments that define a sequence of
|
||||
seed points.
|
||||
|
||||
The geometric traits class of \ccc{CDT} has to be a
|
||||
model of the concept \ccc{DelaunayMeshTraits_2}. This concept
|
||||
refines the concept \ccc{ConformingDelaunayTriangulationTraits_2}
|
||||
adding the geometric predicates and constructors. The template parameter
|
||||
\ccc{Criteria} must be a model of \ccc{MeshingCriteria_2}. This concept
|
||||
defines criteria that the triangles have to satisfy.
|
||||
\cgal\ provides two models for this concept:
|
||||
\begin{itemize}
|
||||
\item \ccc{Delaunay_mesh_criteria_2<CDT>}, that defines a shape criterion
|
||||
that bounds the minimum angle of triangles,
|
||||
\item \ccc{Delaunay_mesh_size_criteria_2<CDT>}, that adds to the previous
|
||||
criterion a bound on the maximum edge length.
|
||||
\end{itemize}
|
||||
|
||||
If the function \ccc{refine_Delaunay_mesh_2} is called several times on the
|
||||
same triangulation with different criteria, the algorithm rebuilds the
|
||||
internal data structure used for meshing at every call. In order to avoid
|
||||
rebuild the data structure at every call, the advanced user can
|
||||
use the class \ccc{Delaunay_mesher_2<CDT>}. This class provides also step
|
||||
by step functions. Those functions insert one vertex at a time.
|
||||
|
||||
Any object of type \ccc{Delaunay_mesher_2<CDT>} is constructed from a
|
||||
reference to a \ccc{CDT}, and has several member functions to define the
|
||||
domain to be meshed and to mesh the \ccc{CDT}. See the example given below
|
||||
and the reference manual for details. Note that the \ccc{CDT} should not be
|
||||
externally modified during the life time of the \ccc{Delaunay_mesher_2<CDT>}
|
||||
object.
|
||||
|
||||
\subsection{Example Using the Global Function}
|
||||
|
||||
The following example inserts several segments into a constrained
|
||||
triangulation and then meshes it using the global function
|
||||
\ccc{refine_Delaunay_mesh_2}. The size and shape criteria are the default ones
|
||||
provided by the criteria class \ccc{Delaunay_mesh_criteria_2<K>}. No seeds are
|
||||
given, meaning that the mesh domain covers the whole plane except the
|
||||
unbounded component.
|
||||
|
||||
\ccIncludeExampleCode{Mesh_2/mesh_global.C}
|
||||
|
||||
\subsection{Example Using the Class \protect\ccc{Delaunay_mesher_2<CDT>}}
|
||||
|
||||
This example uses the class \ccc{Delaunay_mesher_2<CDT>} and calls
|
||||
the \ccc{refine_mesh()} member function twice, changing the size and
|
||||
shape criteria in between. In such a case, using twice the global
|
||||
function \ccc{refine_Delaunay_mesh_2} would be less efficient,
|
||||
because some internal structures needed by the algorithm would be
|
||||
built twice.
|
||||
|
||||
\ccIncludeExampleCode{Mesh_2/mesh_class.C}
|
||||
|
||||
\subsection{Example Using Seeds}
|
||||
|
||||
This example uses the global function \ccc{refine_Delaunay_mesh_2} but
|
||||
defines a domain by using one seed. The size and shape criteria are the
|
||||
default ones provided by the criteria class \ccc{Delaunay_mesh_criteria_2<K>}.
|
||||
|
||||
\ccIncludeExampleCode{Mesh_2/mesh_with_seeds.C}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
\begin{ccRefConcept}{ConformingDelaunayTriangulationTraits_2}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ refines the concept
|
||||
\ccc{ConstrainedDelaunayTriangulationTraits_2} by providing a numeric
|
||||
field type \ccc{FT}, a type \ccc{Vector_2} and several constructors on
|
||||
\ccc{Vector_2}, \ccc{Point_2}, and a predicate on angles.
|
||||
The field type has to be a model of
|
||||
the concept \ccc{SqrtFieldNumberType}. This field type and the
|
||||
constructors are used by the conforming algorithm to compute Steiner
|
||||
points on constrained edges.
|
||||
|
||||
\ccRefines
|
||||
|
||||
\ccc{DelaunayTriangulationTraits_2}
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{FT}{The field type. It must be a model of
|
||||
\ccc{SqrtFieldNumberType}, that is must be a number type
|
||||
supporting the operations $+$, $-$, $*$, $/$, and $\sqrt{\cdot}$.}
|
||||
\ccNestedType{Vector_2}{The vector type.}
|
||||
\ccNestedType{Construct_vector_2}{Constructor object. Must
|
||||
provide the operator \ccc{Vector_2 operator()(Point a, Point b)}
|
||||
that computes the vector $b-a$.}
|
||||
\ccNestedType{Construct_scaled_vector_2}{Constructor object. Must
|
||||
provide the operator \ccc{Vector_2 operator()(Vector_2 v, FT scale)}
|
||||
that computes the vector $scale \cdot \mathbf{v}$.}
|
||||
\ccNestedType{Construct_translated_point_2}{Constructor object. Must
|
||||
provide the operator \ccc{Point_2 operator()(Point_2 p, Vector_2 v)}
|
||||
that computes the point $p + \mathbf{v}$.}
|
||||
\ccNestedType{Construct_midpoint_2}{Constructor object. Must provide
|
||||
the operator \ccc{Point_2 operator()(Point_2 a, Point_2 b)} that
|
||||
computes the midpoint of the segment $ab$.}
|
||||
\ccNestedType{Compute_squared_distance_2}{Constructor object. Must
|
||||
provide the operator \ccc{FT operator()(Point_2 a, Point_2 b)} that
|
||||
computes the squared distance between $a$ and $b$.}
|
||||
\ccNestedType{Angle_2}{Predicate object. Must provide the operator
|
||||
\ccc{CGAL::Angle operator()(Point_2 p, Point_2 q, Point_2 r)} that
|
||||
returns OBTUSE, RIGHT or ACUTE depending on the angle formed by the three
|
||||
points p, q, r (q being the vertex of the angle).}
|
||||
|
||||
\ccCreationVariable{traits}
|
||||
|
||||
\ccHeading{Access to predicate and constructor objects}
|
||||
|
||||
\ccThree{Construct_translated_point_2xx}{construct_translated_point_2_object()}{}
|
||||
\ccMethod{Construct_vector_2 construct_vector_2_object();}{}
|
||||
\ccGlue
|
||||
\ccMethod{Construct_scaled_vector_2 construct_scaled_vector_2_object();}{}
|
||||
\ccGlue
|
||||
\ccMethod{Construct_translated_point_2
|
||||
construct_translated_point_2_object();}{}
|
||||
\ccGlue
|
||||
\ccMethod{Constructor_midpoint_2 construct_midpoint_2_object();}{}
|
||||
\ccGlue
|
||||
\ccMethod{Compute_squared_distance_2
|
||||
compute_squared_distance_2_object();}{}
|
||||
\ccGlue
|
||||
\ccMethod{Angle_2 angle_2_object();}{}
|
||||
|
||||
\ccHasModels
|
||||
Any model of \ccc{Kernel} concept. In particular, all CGAL kernels.
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
\begin{ccRefConcept}{DelaunayMeshFaceBase_2}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ refines the concept
|
||||
\ccc{TriangulationFaceBase_2}. It adds two functions giving access
|
||||
to a boolean marker, that indicates if the face is in the
|
||||
meshing domain or not.
|
||||
|
||||
\ccRefines
|
||||
\ccc{ConstrainedTriangulationFaceBase_2}
|
||||
|
||||
\ccCreationVariable{f}
|
||||
|
||||
\ccAccessFunctions
|
||||
|
||||
\ccMethod{ bool is_in_domain() const;}
|
||||
{ returns true if this face is in the domain to be refined.}
|
||||
|
||||
\ccMethod{ void set_in_domain(const bool b);}
|
||||
{ sets if this face is in the domain. }
|
||||
|
||||
\ccHasModels
|
||||
\ccc{Delaunay_mesh_face_base_2<Traits, Fb>}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
\begin{ccRefConcept}{DelaunayMeshTraits_2}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ refines the concept
|
||||
\ccc{ConformingDelaunayTriangulationTraits_2}. It provides a construction
|
||||
object \ccc{Construct_circumcenter_2}.
|
||||
|
||||
\ccRefines
|
||||
|
||||
\ccc{ConformingDelaunayTriangulationTraits_2}
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Construct_circumcenter_2} {Constructor object. Must provide
|
||||
an operator \ccc{Point_2 operator()(Point_2 p,
|
||||
Point_2 q,
|
||||
Point_2 r);}
|
||||
that computes the center of the circle passing through the points $p$,
|
||||
$q$ and $r$.
|
||||
\ccPrecond $p$, $q$ and $r$ are not collinear.}
|
||||
|
||||
\ccCreationVariable{traits}
|
||||
|
||||
\ccHeading{Access to predicate and constructor objects}
|
||||
|
||||
\ccThree{Construct_circumcenter_2xx}{construct_circumcenter_2_object();}{}
|
||||
\ccMethod{Construct_circumcenter_2 construct_circumcenter_2_object();}{}
|
||||
|
||||
\ccHasModels
|
||||
Any model of the \ccc{Kernel} concept. In particular, all CGAL kernels.
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
\begin{ccRefClass}{Delaunay_mesh_criteria_2<CDT>}
|
||||
|
||||
\ccCreationVariable{traits}
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ is a model for the \ccc{MeshingCriteria_2} concept.
|
||||
The shape criterion on triangles is given by a bound $B$ such that for good
|
||||
triangles $\frac{r}{l} \le B$ where $l$ is the shortest edge length
|
||||
and $r$ is the circumradius of the triangle. By default, $B=\sqrt{2}$,
|
||||
which is the best bound one can use with the guarantee that the refinement
|
||||
algorithm will terminate. The upper bound $B$ is related to a lower bound
|
||||
$\alpha_{min}$ on the minimum angle in the triangle:
|
||||
\begin{displaymath}
|
||||
\sin{ \alpha_{min} } = \frac{1}{2 B}
|
||||
\end{displaymath}
|
||||
so $B=\sqrt{2}$ corresponds to $\alpha_{min} \ge 20.7$ degrees.
|
||||
|
||||
\ccInclude{CGAL/Delaunay_mesh_criteria_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccc{MeshingCriteria_2}
|
||||
|
||||
\ccCreation
|
||||
\ccConstructor{Delaunay_mesh_criteria_2()}{Default constructor. $B=\sqrt{2}$.}
|
||||
\ccConstructor{Delaunay_mesh_criteria_2(double b = 0.125)}{Construct
|
||||
a traits class with bound $B=\sqrt{\frac{1}{4 b}}$.}
|
||||
\end{ccRefClass}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
\begin{ccRefClass}{Delaunay_mesh_face_base_2<Traits, Fb>}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ is a model for the concept
|
||||
\ccc{DelaunayMeshFaceBase_2}.
|
||||
|
||||
This class can be used directly or it can serve as a base to derive other
|
||||
classes with some additional attributes (a color for example) tuned to a
|
||||
specific application.
|
||||
|
||||
\ccInclude{CGAL/Delaunay_mesh_face_base_2.h}
|
||||
|
||||
\ccParameters
|
||||
|
||||
\begin{itemize}
|
||||
\item The first parameter \ccc{Traits} is the geometric traits class. It must
|
||||
be the same as the one used for the Delaunay mesh.
|
||||
\item The second parameter \ccc{Fb} is the base class from which \ccRefName\
|
||||
derives. It must be a model of the \ccc{TriangulationFaceBase_2} concept.
|
||||
\end{itemize}
|
||||
\ccInheritsFrom
|
||||
\ccc{Fb}
|
||||
|
||||
\ccIsModel
|
||||
\ccc{DelaunayMeshFaceBase_2}
|
||||
\end{ccRefClass}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
\begin{ccRefClass}{Delaunay_mesh_size_criteria_2<CDT>}
|
||||
|
||||
\ccCreationVariable{traits}
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ is a model for the \ccc{MeshingCriteria_2} concept.
|
||||
The shape criterion on triangles is given by a bound $B$ such that for good
|
||||
triangles $\frac{r}{l} \le B$ where $l$ is the shortest edge length
|
||||
and $r$ is the circumradius of the triangle. By default, $B=\sqrt{2}$,
|
||||
which is the best bound one can use with the guarantee that the refinement
|
||||
algorithm will terminate. The upper bound $B$ is related to a lower bound
|
||||
$\alpha_{min}$ on the minimum angle in the triangle:
|
||||
\begin{displaymath}
|
||||
\sin{ \alpha_{min} } = \frac{1}{2 B}
|
||||
\end{displaymath}
|
||||
so $B=\sqrt{2}$ corresponds to $\alpha_{min} \ge 20.7$ degrees.
|
||||
|
||||
This traits class defines also a size criteria: all segments of all
|
||||
triangles must be shorter than a bound $S$.
|
||||
|
||||
\ccInclude{CGAL/Delaunay_mesh_size_criteria_2.h}
|
||||
|
||||
\ccIsModel
|
||||
|
||||
\ccc{MeshingCriteria_2}
|
||||
|
||||
\ccCreation
|
||||
\ccConstructor{Delaunay_mesh_size_criteria_2()}{Default
|
||||
constructor. $B=\sqrt{2}$. No bound on size}
|
||||
\ccConstructor{Delaunay_mesh_size_criteria_2(double b = 0.125, double S =
|
||||
0)}{Construct a traits class with bound $B=\sqrt{\frac{1}{4
|
||||
b}}$. If $S \neq 0$, the size bound is $S$. If $S = 0$, there is
|
||||
no bound on size. }
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
\begin{ccRefClass}{Delaunay_mesher_2<CDT, Criteria>}
|
||||
|
||||
This class implements a 2D mesh generator.
|
||||
|
||||
\ccParameters The template parameter \ccc{CDT} should be a model of the
|
||||
concept \ccc{ConstrainedDelaunayTriangulation_2}, and type \ccc{CDT::Face}
|
||||
should be a model of the concept \ccc{MeshFaceBase_2}.
|
||||
|
||||
The geometric traits class of the instance of \ccc{CDT} has to be
|
||||
a model of the concept \ccc{DelaunayMeshTraits_2}.
|
||||
|
||||
The template parameter \ccc{Criteria} should be a model of the concept
|
||||
\ccc{MeshingCriteria_2}. This traits class defines the shape and size
|
||||
criteria for the triangles of the mesh. \ccc{Criteria::Face_handle} has to
|
||||
be the same as \ccc{CDT::Face_handle}.
|
||||
|
||||
\ccHeading{Using this class}
|
||||
|
||||
The constructor of the class \ccRefName{} takes a reference to a \ccc{CDT}
|
||||
as an argument. A call to the refinement method \ccc{refine_mesh()} will
|
||||
refine the constrained Delaunay triangulation into a mesh satisfying the
|
||||
size and shape criteria specified in the traits class. Note that if, during
|
||||
the life time of the \ccRefName\ object, the triangulation is externally
|
||||
modified, any further call to its member methods may crash. Considere
|
||||
constructing a new \ccRefName\ object if the triangulation has been
|
||||
modified.
|
||||
|
||||
\ccHeading{Meshing domain}
|
||||
|
||||
The domain to be mesh is defined by the constrained edges and a set of seed
|
||||
points. The constrained edges divides the plane into several connected
|
||||
components. The mesh domain is either the union of the bounded connected
|
||||
components including at least one seed, or the union of the bounded
|
||||
connected components that do no contain any seed. Note that the unbounded
|
||||
component of the plane is never meshed.
|
||||
|
||||
\ccInclude{CGAL/Delaunay_mesher_2.h}
|
||||
|
||||
\ccTypes
|
||||
\ccTypedef{typedef CDT::Geom_traits Geom_traits;}{the geometric traits class.}
|
||||
\ccNestedType{Seeds_iterator}{const iterator over defined seeds. Its
|
||||
value type is \ccc{Geom_traits::Point_2}.}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{mesher}
|
||||
|
||||
\ccConstructor{Delaunay_mesher_2(CDT& t, Criteria criteria = Criteria());}
|
||||
{Create a new mesher, working on \ccc{t}, with meshing criteria
|
||||
\ccc{criteria}.}
|
||||
|
||||
\ccHeading{Seeds functions}
|
||||
|
||||
The following functions are used to define seeds.
|
||||
|
||||
\ccMethod{void clear_seeds ();}{ Sets seeds to the empty set. All
|
||||
finite connected components of the constrained triangulation will be
|
||||
refined.}
|
||||
|
||||
\ccMethod{template<class InputIterator>
|
||||
void set_seeds(InputIterator begin, InputIterator end,
|
||||
const bool mark=false);}
|
||||
{ Sets seeds to the sequence [\ccc{begin},
|
||||
\ccc{end}]. If \ccc{mark=true}, the mesh domain
|
||||
is the union of the bounded connected
|
||||
components including at least one seed. If
|
||||
\ccc{mark=false}, the domain is the union of
|
||||
the bounded components including no seed. Note
|
||||
that the unbounded component of the plane is
|
||||
never meshed.
|
||||
\ccRequire The \ccc{value_type} of
|
||||
\ccc{begin} and \ccc{end} is
|
||||
\ccc{Geom_traits::Point_2}.}
|
||||
|
||||
\ccMethod{Seeds_const_iterator seeds_begin () const;}
|
||||
{ Start of the seeds sequence. }
|
||||
\ccGlue
|
||||
\ccMethod{Seeds_const_iterator seeds_end () const;}
|
||||
{ Past the end of the seeds sequence. }
|
||||
|
||||
\ccHeading{Meshing methods}
|
||||
|
||||
\ccMethod{void refine_mesh(); }
|
||||
{ Refines the constrained Delaunay triangulation into a mesh
|
||||
satisfying the criteria defined by the traits.
|
||||
}
|
||||
|
||||
\ccMethod{ const Criteria& get_criteria();}
|
||||
{ Returns a const reference to the criteria traits object. }
|
||||
|
||||
\ccMethod{ void set_criteria(Criteria criteria);}
|
||||
{ Assigns \ccc{criteria} to the criteria traits object. }
|
||||
|
||||
\begin{ccAdvanced}
|
||||
The function \ccc{set_criteria} scans all faces to recalculate the list of
|
||||
\emph{bad faces}, that are faces not conforming to the meshing criteria.
|
||||
This function actually has an optional argument that permits to prevent
|
||||
this recalculation. The filling of the list of bad faces can then be done
|
||||
by a call to \ccc{set_bad_faces}.
|
||||
|
||||
\ccMethod{ void set_criteria(Criteria criteria, bool
|
||||
recalculate_bad_faces);}
|
||||
{ Assigns \ccc{criteria} to the criteria traits object. If
|
||||
\ccc{recalculate_bad_faces} is \ccc{false}, the list of bad faces is
|
||||
let empty and the function \ccc{set_bad_faces} should be called before
|
||||
\ccc{refine_mesh}.}
|
||||
|
||||
\ccMethod{template <class InputIterator>
|
||||
void set_bad_faces(InputIterator begin,
|
||||
InputIterator end);}
|
||||
{ This method permits to set the list of bad triangles
|
||||
directly, from the sequence [begin, end], so that the
|
||||
algorithm will not scan the whole set of triangles to
|
||||
find bad ones. To use if there is a non-naive way to
|
||||
find bad triangles. \ccRequire The \ccc{value_type}
|
||||
of \ccc{begin} and \ccc{end} is \ccc{Face_handle}.}
|
||||
|
||||
\end{ccAdvanced}
|
||||
|
||||
|
||||
\begin{ccAdvanced}
|
||||
\ccHeading{Step by step operations}
|
||||
|
||||
The \ccRefName{} class allows, for debugging or demos, to play the
|
||||
meshing algorithm step by step, using the following methods.
|
||||
|
||||
\ccMethod{ void init(); }
|
||||
{ This method must be called just before the first
|
||||
call to the following step by step refinement method,
|
||||
that is when all vertices and constrained edges have been
|
||||
inserted into the constrained Delaunay triangulation. It
|
||||
must be called again before any subsequent calls to the
|
||||
step by step refinement method if new vertices or constrained
|
||||
edges have been inserted since the last call.}
|
||||
|
||||
\ccMethod{bool is_refinement_done(); }
|
||||
{ Tests if the step by step refinement algorithm is done. If it returns
|
||||
\ccc{true}, the following calls to \ccc{step_by_step_refine_mesh} will
|
||||
not insert any points, until some new constrained segments or points are
|
||||
inserted in the triangulation and \ccc{init} is called again. }
|
||||
|
||||
\ccMethod{ bool step_by_step_refine_mesh(); }
|
||||
{ Applies one step of the algorithm, by inserting one point, if the
|
||||
algorithm is not done. Returns \ccc{false} iff no point has been inserted
|
||||
because the algorithm is done. }
|
||||
|
||||
\end{ccAdvanced}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
\begin{ccRefEnum}{Mesh_2::Face_badness}
|
||||
\ccInclude{CGAL/Mesh_2/Face_badness.h}
|
||||
|
||||
\ccGlobalEnum{enum Mesh_2::Face_badness { NOT_BAD, BAD, IMPERATIVELY_BAD }; }
|
||||
\ccRefLabel{NOT_BAD}
|
||||
\ccRefLabel{IMPERATIVELY_BAD}
|
||||
\ccRefLabel{BAD}
|
||||
\ccHtmlCrossLink{NOT_BAD}
|
||||
\ccHtmlCrossLink{IMPERATIVELY_BAD}
|
||||
\ccHtmlCrossLink{BAD}
|
||||
|
||||
\end{ccRefEnum}
|
||||
|
|
@ -0,0 +1,302 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Mesher_level.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.07.2005 Author
|
||||
% | Package: Package
|
||||
% |
|
||||
\RCSdef{\RCSMesherlevelRev}{$Id$}
|
||||
\RCSdefDate{\RCSMesherlevelDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Mesher_level_base<Tr, Mesher_level, Element, Lower,
|
||||
Tr_traits >} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The class \ccRefName\ is a generic class
|
||||
that helps to implement meshing algorithms
|
||||
based on Delaunay refinement.
|
||||
Typically, a Delaunay refinement algorithm
|
||||
involves not only the refinement of the mesh cells
|
||||
but also the refinements of lower dimensional mesh elements
|
||||
which represents constaints including e.g.
|
||||
the boundary of the domain to be meshed.
|
||||
Such a process can be seen
|
||||
as a cascade of processes called mesher level where each level
|
||||
handles the refinement of elements of a given dimension.
|
||||
The class \ccRefName\ is intended to provide a generic implementation
|
||||
of a mesher level.
|
||||
For example, a 3D mesh generator taking into account
|
||||
constrained facets (that is 2dimensional constraints)
|
||||
and edges (1-dimensional constraints) will involve
|
||||
three instances of \ccRefName\ .
|
||||
The class \ccRefName\
|
||||
is designed to serve as the base class
|
||||
in a CRTP (curiously recurent template pattern ).
|
||||
It captures what can be seen as the commmon functionalities
|
||||
of mesher levels, deferring the detailed implementation
|
||||
of elememtary operations to its derived classes.
|
||||
|
||||
|
||||
\ccInclude{CGAL/Mesher_level_base.h}
|
||||
|
||||
\ccParameters
|
||||
The class \ccRefName\ has five template parameters: \\
|
||||
- The parameter \ccc{Tr} is the type of the triangulation underlying
|
||||
the refinement process. It must be a model of the concept
|
||||
\ccc{MeshTriangulation}.\\
|
||||
- The parameter \ccc{Mesher_level} stands for the derived class
|
||||
in the CRTP pattern. This classes provides the implementation
|
||||
of basic operation in the refinement pocess and will be the actual
|
||||
mesher level used by the meshing application.
|
||||
It must be a model of the concept \ccc{MesherLevel} \\
|
||||
- The parameter \ccc{Element} is the type of mesh elements
|
||||
refined at this level refines. It is a model of the concept
|
||||
\ccc{MeshElement} for which there is no requirements..
|
||||
- The parameter \ccc{Lower} stands for the next lower mesher level
|
||||
in the cascade, handling refinement of lower dimensional mesh
|
||||
elements. It is a model of the concept
|
||||
\ccc{LowerMesherLevel} which is just a subconcept of
|
||||
\ccc{MesherLevel}.\\
|
||||
- The parameter \ccc{Tr_traits} provides some types related
|
||||
to the triangulation and in particular the type \ccc{Zone}
|
||||
It is a model of the concept \ccc{xxx}.
|
||||
|
||||
%\ccIsModel
|
||||
|
||||
%Concept
|
||||
|
||||
|
||||
\ccTypedef{typedef Tr Triangulation;}
|
||||
{The type of the underlying triangulation.}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Tr::Point Point;}
|
||||
{The type of points inserted into the triangulation.}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Tr::Vertex_handle Vertex_handle;}
|
||||
{ The vertex handles of the triangulation.}
|
||||
\ccGlue
|
||||
\ccTypedef{typedef Tr_traits::Zone Zone;}
|
||||
{A type describing the conflict zone of a query point in the triangulation,
|
||||
i.e. the set of elements that would disappear if the query point is
|
||||
inserted.
|
||||
}
|
||||
|
||||
XXXXXXXXXX
|
||||
Suggestion: Having a templated \ccc{Triangulation_traits}
|
||||
\ccc{template< class Tr>
|
||||
Triangulation_traits}
|
||||
with a default parameter \ccc{Triangulation_traits<Tr>}
|
||||
for the fifth parameter of \ccc{Mesher_level}
|
||||
xxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
%\ccNestedType{TYPE}{some nested types}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{ml} %% choose variable name
|
||||
|
||||
\ccConstructor{Mesher_level(Lower& lower);}
|
||||
{Construct a mesher level with \ccc{previous} as previous
|
||||
(lower dimensional) mesher level.}
|
||||
|
||||
|
||||
|
||||
\ccHeading{Methods for handling the meshing process}
|
||||
The following functions use the functions that are implemented in
|
||||
the derived classes.
|
||||
|
||||
\ccMethod{void scan_triangulation();}
|
||||
{ Called before the first refinement, to initialized the queue of
|
||||
elements that should be refined.}
|
||||
|
||||
|
||||
|
||||
|
||||
\ccMethod { template <class Mesh_visitor>
|
||||
void refine(Mesh_visitor& visitor);}
|
||||
{ Performs the refinement;}
|
||||
|
||||
|
||||
%All these commented function should appear
|
||||
%under their impl form in the concept for ``Mesher level''
|
||||
|
||||
|
||||
%\ccMethod{ bool no_longer_element_to_refine();}
|
||||
% { Returns \ccc{true} when there is no \ccc{Element}
|
||||
% to be refined in this level.}
|
||||
|
||||
%\ccMethod { template <class Mesh_visitor>
|
||||
% bool process_one_element(Mesh_visitor& visitor);}
|
||||
%{ Get the next elements from the queue of to be refined elements
|
||||
%and try to refine it. Returns \ccc{true} if one point has been inserted.}
|
||||
|
||||
%\ccMethod {
|
||||
% template <class Mesh_visitor>
|
||||
% Mesher_level_conflict_status
|
||||
% try_to_refine_element(Element e, Mesh_visitor& visitor);}
|
||||
% {Try to refine element \ccc{e}.}
|
||||
|
||||
|
||||
%\ccMethod { Element get_next_element();}
|
||||
%{ Retrieves the next element that could be refined.}
|
||||
|
||||
%\ccMethod { void pop_next_element();}
|
||||
%{Remove from the list of to be refined elements
|
||||
%the next element that could be refined.}
|
||||
|
||||
|
||||
%\ccMethod { Point refinement_point(const Element& e);}
|
||||
%{Compute the point that should be inserted to refine the element \ccc{e}}
|
||||
|
||||
%XXXXXX il y a trop de conflits et ils devraient etre definis.
|
||||
%Les conflits de " \ccc{conflicts_zone} " ne sont pas les memes que celles des
|
||||
%\ccc{test_point_conflict} XXXXXXXXXXXXX
|
||||
|
||||
|
||||
%\ccMethod{ Zone conflicts_zone(const Point& p, Element e);}
|
||||
% {Returns the conflict zone of \ccc{p} starting from the
|
||||
% mesh element \ccc{e}.
|
||||
% \ccPrecond{ \ccc{e} is assumed to be in conflict with \ccc{p}.}}
|
||||
|
||||
%\ccMethod { Mesher_level_conflict_status
|
||||
% private_test_point_conflict(const Point& p, Zone& zone);}
|
||||
%{ Tells if, as regards this level of the refinement process, the
|
||||
% point \ccc{p} with conflict zone \ccc{zone} may be inserted.
|
||||
% The return type is made of two booleans:
|
||||
% - the first one tells if the point can be inserted,
|
||||
% - in case of, the first one is \ccc{false}, the second one tells if
|
||||
% the tested element should be reconsidered latter..}
|
||||
|
||||
|
||||
%\ccMethod {
|
||||
% Mesher_level_conflict_status
|
||||
% test_conflict_from_higher(const Point& p,
|
||||
% Zone& zone);}
|
||||
%{ Tells if, as regards this level of the refinement process, the
|
||||
% point \ccc{p},
|
||||
% constructed as the refinement point of an element of
|
||||
% higher dimension, may be inserted.
|
||||
% \ccPrecond{The argument \ccc{zone}
|
||||
% is the connflict zone of \ccc{p}.}}
|
||||
% The return type is a
|
||||
% \ccc{Mesher_level_conflict_status}
|
||||
% telling if
|
||||
% - the point can be inserted,
|
||||
% - the point cannot be inserted but the element
|
||||
% that would be refined by this point has to be reconsidered latter.
|
||||
% - the point cannot be inserted and the element
|
||||
% that would be refined by this point has to be dropped.
|
||||
|
||||
|
||||
%\ccMethod{ Vertex_handle insert(Point p, Zone& z);}
|
||||
% { Insertion of point \ccc{p} as a new vertex.
|
||||
% \ccc{z} is assumed to be the precomputed conflict zone of
|
||||
% \ccc{p}.}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\ccHeading{ Helping methods to maintain the data structures}
|
||||
|
||||
\ccMethod{Triangulation& triangulation();}{Access to the triangulation.}
|
||||
\ccGlue
|
||||
\ccMethod{const Triangulation& triangulation();}
|
||||
{Const access to the triangulation.}
|
||||
|
||||
\ccMethod{
|
||||
template <typename Mesh_visitor>
|
||||
void before_conflicts(const Element& e, const Point& p,
|
||||
Mesh_visitor& visitor);}
|
||||
{Actions to be performed before testing conflicts
|
||||
for point \ccc{p} and element \ccc{e}.}
|
||||
|
||||
|
||||
\ccMethod{ template <class Mesh_visitor>
|
||||
void before_insertion(Element& e, const Point& p, Zone& zone,
|
||||
Mesh_visitor& visitor);}
|
||||
{
|
||||
Actions before inserting the point \ccc{p} in order to refine the
|
||||
element \ccc{e}.
|
||||
\ccPrecond{The zone of conflicts of \ccc{p} is \ccc{zone}}.}
|
||||
|
||||
|
||||
\ccMethod{template <class Mesh_visitor>
|
||||
void after_insertion(Vertex_handle vh, Mesh_visitor& visitor);}
|
||||
{ Actions to be performed after insertion of a point.
|
||||
\ccc{vh} is the Vertex handle returned by the insertion
|
||||
and visitor is the visitor.}
|
||||
|
||||
\ccMethod{ template <class Mesh_visitor>
|
||||
void after_no_insertion(const Element& e, const Point& p, Zone& zone,
|
||||
Mesh_visitor& visitor);}
|
||||
{ Actions to be performed when point \ccc{p}
|
||||
with conflict zone \ccc{zone} has been tested for insertion and
|
||||
rejected, meaning that ni insertion took place.}
|
||||
|
||||
|
||||
|
||||
\begin{ccAdvanced}
|
||||
\ccHeading{ Method for step by step advance of the meshing}
|
||||
|
||||
\ccMethod{ template <class Mesh_visitor>
|
||||
bool try_to_insert_one_point(Mesh_visitor& visitor);}
|
||||
{Inserts exactly one new vertex in the mesh and returns \ccc{true}
|
||||
exept when the algorithm is done, in which case no point is inserted
|
||||
and \ccc{false} is returned.}
|
||||
\ccGlue
|
||||
\ccMethod{template <class Mesh_visitor>
|
||||
bool one_step(Mesh_visitor& visitor);}
|
||||
{Applies one step of the algorithm, i. e.tries to refine one element of
|
||||
lower levels or one element of this level. Returns \c false iff
|
||||
\ccc{is_algorithm_done()==true}. }
|
||||
|
||||
\ccMethod { bool is_algorithm_done();}
|
||||
{Returns \ccc{true} when there is no more elements to refine
|
||||
in this mesher level and in all the cascaded previous levels.}
|
||||
|
||||
\end{ccAdvanced}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccc{Some_other_class},
|
||||
\ccc{some_other_function}.
|
||||
|
||||
\ccExample
|
||||
|
||||
A short example program.
|
||||
Instead of a short program fragment, a full running program can be
|
||||
included using the
|
||||
\verb|\ccIncludeExampleCode{Package/Mesher_level.C}|
|
||||
macro. The program example would be part of the source code distribution and
|
||||
also part of the automatic test suite.
|
||||
|
||||
\begin{ccExampleCode}
|
||||
void your_example_code() {
|
||||
}
|
||||
\end{ccExampleCode}
|
||||
|
||||
%% \ccIncludeExampleCode{Package/Mesher_level.C}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
\begin{ccRefConcept}{MeshingCriteria_2}
|
||||
|
||||
\ccDefinition
|
||||
|
||||
The concept \ccRefName\ defines the meshing criteria to be used in the
|
||||
algorithm. It provides a predicate \ccc{Is_bad} that tests a triangle
|
||||
according to criteria. The return type of \ccc{Is_bad} is an enum
|
||||
\ccc{Mesh_2::Face_badness}.
|
||||
|
||||
The possible values of \ccc{Mesh_2::Face_badness} are \ccc{NOT_BAD},
|
||||
\ccc{BAD} and \ccc{IMPERATIVELY_BAD}. If the predicate returns \ccc{BAD},
|
||||
the triangle is marked as bad and the algorithm will try to destroy it. If
|
||||
the predicates returns \ccc{IMPERATIVELY_BAD}, the algorithm will destroy
|
||||
the triangle unconditionally during its execution.
|
||||
|
||||
The termination of the algorithm is guaranteed when criteria are shape
|
||||
criteria corresponding to a bound on smallest angles not less than
|
||||
$20.7$ degrees (this corresponds to a radius-edge ratio bound not less
|
||||
than $\sqrt{2}$). Any size criteria that are satisfied by small enough
|
||||
tetrahedra can be added to the set of criteria without compromising
|
||||
the termination.
|
||||
|
||||
Note that, in the presence of input angles smaller than $60$~degrees,
|
||||
some bad shaped triangles can appear in the finale mesh in the
|
||||
neighboring of small angles. To achieve termination and the respect of
|
||||
size criteria everywhere, the \ccc{Is_bad} predicate has to return
|
||||
\ccc{IMPERATIVELY_BAD} when size criteria are not satisfied, and
|
||||
\ccc{BAD} when shape criteria are not satisfied.
|
||||
|
||||
% \ccc{IMPERATIVELY_BAD}
|
||||
% If some input angles are smaller than $60$~degrees, some triangles that do
|
||||
% not satisfy the criteria could be not destroyed, with guarantees that the
|
||||
% algorithm will terminate. This predicate should not returns
|
||||
% \ccc{IMPERATIVELY_BAD} if the only reasons for the triangle to be destroyed
|
||||
% are shapes criteria. The use of \ccc{IMPERATIVELY_BAD} should be restricted
|
||||
% to other criteria, such as size criteria.
|
||||
|
||||
\ccRefName\ also provides a type \ccc{Quality} designed to code a quality
|
||||
measure for triangles. The type \ccc{Quality} must be \emph{less-than
|
||||
comparable} as the meshing algorithm will order bad triangles by quality,
|
||||
to split those with smallest quality first. The predicate \ccc{Is_bad}
|
||||
computes the quality of the triangle as a by-product.
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Face_handle}{Handle to a face of the triangulation.}
|
||||
|
||||
\ccNestedType{Quality}{Default constructible, copy constructible,
|
||||
assignable, and less-than comparable type.}
|
||||
|
||||
\ccNestedType{Is_bad} {Predicate object. Must provide two operators. The
|
||||
first operator \ccc{Mesh_2::Face_badness operator()(Face_handle fh,
|
||||
Quality& q)} returns \ccc{NOT_BAD} if it satisfies the desired criteria
|
||||
for mesh triangles, \ccc{BAD} if it does not, and \ccc{IMPERATIVELY_BAD}
|
||||
if it does not and should be refined unconditionally. In addition, this
|
||||
operator assigns to \ccc{q} a value measuring the quality of the triangle
|
||||
pointed by \ccc{fh}. The second operator \ccc{Mesh_2::Face_badness
|
||||
operator()(Quality q)} returns \ccc{NOT_BAD} if \ccc{q} is the quality
|
||||
of a good triangle, \ccc{BAD} if the \ccc{q} represents a poor quality,
|
||||
and \ccc{IMPERATIVELY_BAD} if \ccc{q} represents the quality of a bad
|
||||
triangle that should be refined unconditionally.}
|
||||
|
||||
\ccCreationVariable{traits}
|
||||
|
||||
\ccHeading{Access to predicate and constructor objects}
|
||||
|
||||
\ccMethod{Is_bad is_bad_object();}{}
|
||||
|
||||
\ccHasModels
|
||||
\ccc{Delaunay_mesh_criteria_2<CDT>}\\
|
||||
\ccc{Delaunay_mesh_size_criteria_2<CDT>}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
\begin{ccRefClass}{Triangulation_conformer_2<CDT>}
|
||||
|
||||
The class \ccRefName{} is an auxiliary class of
|
||||
\ccc{Delaunay_mesher_2<CDT>}. It permits to refine a constrained
|
||||
Delaunay triangulation into a conforming Delaunay or conforming
|
||||
Gabriel triangulation. For standard needs, consider using the global
|
||||
functions \ccc{make_conforming_Gabriel_2} and
|
||||
\ccc{make_conforming_Delaunay_2}.
|
||||
|
||||
\ccParameters
|
||||
|
||||
The template parameter \ccc{CDT} should be a model of the concept
|
||||
\ccc{ConstrainedDelaunayTriangulation_2}.
|
||||
|
||||
The geometric traits class of the instance of \ccc{CDT} has to be
|
||||
a model of the concept \ccc{ConformingDelaunayTriangulationTraits_2}.
|
||||
|
||||
\ccHeading{Using this class}
|
||||
|
||||
The constructor of the class \ccRefName\ takes a reference to a \ccc{CDT}
|
||||
as an argument. A call to the method \ccc{make_conforming_Delaunay()} or
|
||||
\ccc{make_conforming_Gabriel()} will refine this contrained Delaunay
|
||||
triangulation into a conforming Delaunay or conforming Gabriel
|
||||
triangulation. Note that if, during the life time of the \ccRefName\
|
||||
object, the triangulation is externally modified, any further call to its
|
||||
member methods may lead to undefined behavior. Consider reconstructing a
|
||||
new \ccRefName\ object if the triangulation has been modified.
|
||||
|
||||
The conforming methods insert points into constrained edges, thereby splitting
|
||||
them into several sub-constraints. You have access to the initial inserted
|
||||
constraints if you instantiate the template parameter by a
|
||||
\ccc{CGAL::Constrained_triangulation_plus_2<CDT>}.
|
||||
|
||||
\ccInclude{CGAL/Triangulation_conformer_2.h}
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{m}
|
||||
|
||||
\ccConstructor{Triangulation_conformer_2(CDT& t);}
|
||||
{Create a new conforming maker, working on \ccc{t}.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccHeading{Conforming methods}
|
||||
|
||||
\ccMethod{ void make_conforming_Delaunay(); }
|
||||
{ Refines the triangulation into a conforming Delaunay triangulation.
|
||||
After a call to this method, all triangles fulfill the Delaunay property,
|
||||
that is the empty circle
|
||||
property. }
|
||||
|
||||
\ccMethod{ void make_conforming_Gabriel(); }
|
||||
{ Refines the triangulation into a conforming Gabriel triangulation.
|
||||
After a call to this method, all constrained edges $e$ have the
|
||||
\emph{Gabriel property}: the circle with diameter $e$
|
||||
does not contain any vertex of the triangulation. }
|
||||
|
||||
\ccHeading{Checking}
|
||||
The following methods verify that the constrained triangulation is
|
||||
conforming Delaunay or conforming Gabriel. These methods scan the
|
||||
whole triangulation and their complexity is proportional to the number
|
||||
of edges.
|
||||
|
||||
\ccMethod{ bool is_conforming_Delaunay(); }
|
||||
{ Returns \ccc{true} iff all triangles fulfill the Delaunay property.}
|
||||
|
||||
\ccMethod{ bool is_conforming_Gabriel(); }
|
||||
{ Returns \ccc{true} iff all constrained edges have the Gabriel property:
|
||||
their circumsphere is empty. }
|
||||
|
||||
\begin{ccAdvanced}
|
||||
|
||||
\ccHeading{Step by step operations}
|
||||
|
||||
The \ccRefName{} class allows, for debugging or demos, to play the
|
||||
conforming algorithm step by step, using the following methods. They exist
|
||||
in two versions, depending on whether you want the triangulation to be
|
||||
conforming Delaunay or conforming Gabriel, respectively. Any call to a
|
||||
\ccc{step_by_step_conforming_XX} function requires a previous call to the
|
||||
corresponding function \ccc{init_XX} and Gabriel and Delaunay methods can
|
||||
not be mixed between two calls of \ccc{init_XX}.
|
||||
|
||||
\ccMethod{ void init_Delaunay(); }
|
||||
{ The method must be called after all points and constrained segments
|
||||
are inserted and before any call to the following methods. If some
|
||||
points or segments are then inserted in the triangulation, this
|
||||
method must be called again. }
|
||||
|
||||
\ccMethod{ bool step_by_step_conforming_Delaunay (); }
|
||||
{ Applies one step of the algorithm, by inserting one point, if the
|
||||
algorithm is not done. Returns \ccc{false} iff no point has been inserted
|
||||
because the algorithm is done. }
|
||||
|
||||
\ccMethod{ void init_Gabriel(); }{Analog to
|
||||
\ccc{init_Delaunay} for Gabriel conforming.}
|
||||
|
||||
\ccMethod{ bool step_by_step_conforming_Gabriel (); }{Analog to
|
||||
\ccc{step_by_step_conforming_Delaunay()} for Gabriel conforming.}
|
||||
|
||||
\ccMethod{ bool is_conforming_done(); }
|
||||
{ Tests if the step by step conforming algorithm is done. If it
|
||||
returns \ccc{true}, the following calls to
|
||||
\ccc{step_by_step_conforming_XX} will not insert any points, until some
|
||||
new constrained segments or points are inserted in the triangulation and
|
||||
\ccc{init_XX} is called again. }
|
||||
|
||||
\end{ccAdvanced}
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
\ccRefChapter{2D Conforming Triangulations and Meshes}
|
||||
\ccChapterAuthor{Laurent Rineau}
|
||||
|
||||
|
||||
\section{Classified Reference Pages}
|
||||
|
||||
\subsection*{Concepts}
|
||||
\ccRefConceptPage{ConformingDelaunayTriangulationTraits_2}\\
|
||||
\ccRefConceptPage{DelaunayMeshTraits_2}\\
|
||||
\ccRefConceptPage{MeshingCriteria_2}\\
|
||||
\ccRefConceptPage{DelaunayMeshFaceBase_2}%
|
||||
|
||||
\subsection*{Classes}
|
||||
\ccRefIdfierPage{CGAL::Triangulation_conformer_2<CDT>}\\
|
||||
\ccRefIdfierPage{CGAL::Delaunay_mesher_2<CDT, Criteria>}\\
|
||||
\ccRefIdfierPage{CGAL::Delaunay_mesh_face_base_2<Traits, Fb>}\\
|
||||
\ccRefIdfierPage{CGAL::Delaunay_mesh_criteria_2<CDT>}\\
|
||||
\ccRefIdfierPage{CGAL::Delaunay_mesh_size_criteria_2<CDT>}\\
|
||||
\ccRefIdfierPage{CGAL::Mesh_2::Face_badness} \\
|
||||
%\ccRefIdfierPage{CGAL::Mesher_level}%
|
||||
|
||||
\subsection*{Global functions}
|
||||
\ccRefIdfierPage{CGAL::make_conforming_Delaunay_2}\\
|
||||
\ccRefIdfierPage{CGAL::make_conforming_Gabriel_2}\\
|
||||
\ccRefIdfierPage{CGAL::refine_Delaunay_mesh_2}%
|
||||
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | CBP Reference Manual: main.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | Automatically generated driver file for the reference manual chapter
|
||||
% | of this package. Do not edit manually, you may loose your changes.
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\input{Mesh_2_ref/intro.tex}
|
||||
|
||||
\input{Mesh_2_ref/ConformingDelaunayTriangulationTraits_2.tex}
|
||||
\input{Mesh_2_ref/DelaunayMeshFaceBase_2.tex}
|
||||
\input{Mesh_2_ref/DelaunayMeshTraits_2.tex}
|
||||
\input{Mesh_2_ref/Delaunay_mesher_2.tex}
|
||||
\input{Mesh_2_ref/Delaunay_mesh_criteria_2.tex}
|
||||
\input{Mesh_2_ref/Delaunay_mesh_face_base_2.tex}
|
||||
\input{Mesh_2_ref/Delaunay_mesh_size_criteria_2.tex}
|
||||
\input{Mesh_2_ref/Face_badness.tex}
|
||||
\input{Mesh_2_ref/make_conforming_Delaunay_2.tex}
|
||||
\input{Mesh_2_ref/make_conforming_Gabriel_2.tex}
|
||||
%\input{Mesh_2_ref/Mesher_level.tex}
|
||||
\input{Mesh_2_ref/MeshingCriteria_2.tex}
|
||||
\input{Mesh_2_ref/refine_Delaunay_mesh_2.tex}
|
||||
\input{Mesh_2_ref/Triangulation_conformer_2.tex}
|
||||
|
||||
%% EOF
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
\begin{ccRefFunction}{make_conforming_Delaunay_2}
|
||||
|
||||
\ccInclude{CGAL/Triangulation_conformer_2.h}
|
||||
|
||||
\ccFunction{ template<class CDT> void make_conforming_Delaunay_2 (CDT &t); }
|
||||
{ Refines the constrained Delaunay triangulation \ccc{t} into a
|
||||
conforming Delaunay triangulation. After a call to this function,
|
||||
all edges of \ccc{t} are Delaunay edges.
|
||||
\ccRequire The template parameter \ccc{CDT} should be a model of the
|
||||
concept \ccc{ConstrainedDelaunayTriangulation_2}.
|
||||
The geometric traits class of into the constrained Delaunay
|
||||
triangulation must be a model of
|
||||
\ccc{ConformingDelaunayTriangulationTraits_2}.}
|
||||
|
||||
\end{ccRefFunction}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
\begin{ccRefFunction}{make_conforming_Gabriel_2}
|
||||
|
||||
\ccInclude{CGAL/Triangulation_conformer_2.h}
|
||||
|
||||
\ccFunction{ template<class CDT> void make_conforming_Gabriel_2 (CDT &t); }
|
||||
{ Refines the constrained Delaunay triangulation \ccc{t} into a
|
||||
conforming Gabriel triangulation. After a call to this function, all
|
||||
constrained edges of \ccc{t} have the \emph{Gabriel property}: the
|
||||
circle that has $e$ as diameter does not contain any vertex from
|
||||
the triangulation.
|
||||
\ccRequire The template parameter \ccc{CDT} should be a model of the
|
||||
concept \ccc{ConstrainedDelaunayTriangulation_2}. The geometric
|
||||
traits class of the constrained Delaunay triangulation must be a
|
||||
model of \ccc{ConformingDelaunayTriangulationTraits_2}.}
|
||||
|
||||
\end{ccRefFunction}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: part_of_a_cluster.fig
|
||||
%%Creator: fig2dev Version 3.2 Patchlevel 4
|
||||
%%CreationDate: Tue May 13 19:26:21 2003
|
||||
%%For: lrineau@alioth (Laurent Rineau,stag..L016,7738,)
|
||||
%%BoundingBox: 0 0 152 146
|
||||
%%Magnification: 1.0000
|
||||
%%EndComments
|
||||
/$F2psDict 200 dict def
|
||||
$F2psDict begin
|
||||
$F2psDict /mtrx matrix put
|
||||
/col-1 {0 setgray} bind def
|
||||
/col0 {0.000 0.000 0.000 srgb} bind def
|
||||
/col1 {0.000 0.000 1.000 srgb} bind def
|
||||
/col2 {0.000 1.000 0.000 srgb} bind def
|
||||
/col3 {0.000 1.000 1.000 srgb} bind def
|
||||
/col4 {1.000 0.000 0.000 srgb} bind def
|
||||
/col5 {1.000 0.000 1.000 srgb} bind def
|
||||
/col6 {1.000 1.000 0.000 srgb} bind def
|
||||
/col7 {1.000 1.000 1.000 srgb} bind def
|
||||
/col8 {0.000 0.000 0.560 srgb} bind def
|
||||
/col9 {0.000 0.000 0.690 srgb} bind def
|
||||
/col10 {0.000 0.000 0.820 srgb} bind def
|
||||
/col11 {0.530 0.810 1.000 srgb} bind def
|
||||
/col12 {0.000 0.560 0.000 srgb} bind def
|
||||
/col13 {0.000 0.690 0.000 srgb} bind def
|
||||
/col14 {0.000 0.820 0.000 srgb} bind def
|
||||
/col15 {0.000 0.560 0.560 srgb} bind def
|
||||
/col16 {0.000 0.690 0.690 srgb} bind def
|
||||
/col17 {0.000 0.820 0.820 srgb} bind def
|
||||
/col18 {0.560 0.000 0.000 srgb} bind def
|
||||
/col19 {0.690 0.000 0.000 srgb} bind def
|
||||
/col20 {0.820 0.000 0.000 srgb} bind def
|
||||
/col21 {0.560 0.000 0.560 srgb} bind def
|
||||
/col22 {0.690 0.000 0.690 srgb} bind def
|
||||
/col23 {0.820 0.000 0.820 srgb} bind def
|
||||
/col24 {0.500 0.190 0.000 srgb} bind def
|
||||
/col25 {0.630 0.250 0.000 srgb} bind def
|
||||
/col26 {0.750 0.380 0.000 srgb} bind def
|
||||
/col27 {1.000 0.500 0.500 srgb} bind def
|
||||
/col28 {1.000 0.630 0.630 srgb} bind def
|
||||
/col29 {1.000 0.750 0.750 srgb} bind def
|
||||
/col30 {1.000 0.880 0.880 srgb} bind def
|
||||
/col31 {1.000 0.840 0.000 srgb} bind def
|
||||
|
||||
end
|
||||
save
|
||||
newpath 0 146 moveto 0 0 lineto 152 0 lineto 152 146 lineto closepath clip newpath
|
||||
-65.2 198.7 translate
|
||||
1 -1 scale
|
||||
|
||||
/cp {closepath} bind def
|
||||
/ef {eofill} bind def
|
||||
/gr {grestore} bind def
|
||||
/gs {gsave} bind def
|
||||
/sa {save} bind def
|
||||
/rs {restore} bind def
|
||||
/l {lineto} bind def
|
||||
/m {moveto} bind def
|
||||
/rm {rmoveto} bind def
|
||||
/n {newpath} bind def
|
||||
/s {stroke} bind def
|
||||
/sh {show} bind def
|
||||
/slc {setlinecap} bind def
|
||||
/slj {setlinejoin} bind def
|
||||
/slw {setlinewidth} bind def
|
||||
/srgb {setrgbcolor} bind def
|
||||
/rot {rotate} bind def
|
||||
/sc {scale} bind def
|
||||
/sd {setdash} bind def
|
||||
/ff {findfont} bind def
|
||||
/sf {setfont} bind def
|
||||
/scf {scalefont} bind def
|
||||
/sw {stringwidth} bind def
|
||||
/tr {translate} bind def
|
||||
/tnt {dup dup currentrgbcolor
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add
|
||||
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
|
||||
bind def
|
||||
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
|
||||
4 -2 roll mul srgb} bind def
|
||||
/DrawEllipse {
|
||||
/endangle exch def
|
||||
/startangle exch def
|
||||
/yrad exch def
|
||||
/xrad exch def
|
||||
/y exch def
|
||||
/x exch def
|
||||
/savematrix mtrx currentmatrix def
|
||||
x y tr xrad yrad sc 0 0 1 startangle endangle arc
|
||||
closepath
|
||||
savematrix setmatrix
|
||||
} def
|
||||
|
||||
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
|
||||
/$F2psEnd {$F2psEnteredState restore end} def
|
||||
|
||||
$F2psBegin
|
||||
10 setmiterlimit
|
||||
0 slj 0 slc
|
||||
0.06000 0.06000 sc
|
||||
%
|
||||
% Fig objects follow
|
||||
%
|
||||
%
|
||||
% here starts figure with depth 50
|
||||
% Ellipse
|
||||
7.500 slw
|
||||
n 1200 2100 106 106 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2400 1500 106 106 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr
|
||||
|
||||
% Ellipse
|
||||
n 2100 2700 106 106 0 360 DrawEllipse gs 0.00 setgray ef gr gs col0 s gr
|
||||
|
||||
% Polyline
|
||||
n 1200 2100 m
|
||||
3600 900 l gs col0 s gr
|
||||
% Polyline
|
||||
n 1200 2100 m
|
||||
3000 3300 l gs col0 s gr
|
||||
% Polyline
|
||||
n 2100 2700 m
|
||||
2400 1500 l gs 0.00 setgray ef gr gs col0 s gr
|
||||
/Times-Roman ff 270.00 scf sf
|
||||
1800 2250 m
|
||||
gs 1 -1 sc (f) col0 sh gr
|
||||
% here ends figure;
|
||||
$F2psEnd
|
||||
rs
|
||||
showpage
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
|
@ -0,0 +1,48 @@
|
|||
\begin{ccRefFunction}{refine_Delaunay_mesh_2}
|
||||
|
||||
|
||||
\ccFunction{ template<class CDT, class Criteria>
|
||||
void refine_Delaunay_mesh_2 (CDT &t, const Criteria& criteria = Criteria()); }
|
||||
{ Refines the default domain defined by a constrained Delaunay
|
||||
triangulation without seeds into a mesh satifying the criteria
|
||||
defined by the traits \ccc{criteria}. The domain of the mesh
|
||||
covers all the connected components of the plane defined by the
|
||||
constrained edges of \ccc{t}, except for the unbounded component.
|
||||
\ccPrecond The template parameter \ccc{CDT} must be a model of the
|
||||
concept \ccc{ConstrainedDelaunayTriangulation_2}. The geometric traits
|
||||
class of the constrained Delaunay triangulation must be a model
|
||||
of \ccc{DelaunayMeshTraits_2}.
|
||||
\ccRequire The face of the constrained
|
||||
Delaunay triangulation must be a model of the concept
|
||||
\ccc{DelaunayMeshFaceBase_2}. \ccc{Criteria} must be a model of the
|
||||
concept \ccc{MeshingCriteria_2} and \ccc{CDT::Face_handle} must be the same
|
||||
as \ccc{Criteria::Face_handle}. }
|
||||
|
||||
\ccFunction{ template <class CDT, class Criteria, class InputIterator>
|
||||
void refine_Delaunay_mesh_2(CDT& t,
|
||||
InputIterator begin, InputIterator end,
|
||||
const Criteria& criteria = Criteria(),
|
||||
bool mark = false); }
|
||||
{ Refines the default domain defined by a constrained
|
||||
Delaunay triangulation into a mesh
|
||||
satifying the criteria defined by the traits
|
||||
\ccc{criteria}.The sequence [\ccc{begin}, \ccc{end}]
|
||||
gives a set of seeds points, that defines the domain
|
||||
to be meshed as follows. The constrained edges of
|
||||
\ccc{t} partition the plane into connected components.
|
||||
If \ccc{mark=true}, the mesh domain is the union of
|
||||
the bounded connected components including at least
|
||||
one seed. If \ccc{mark=false}, the domain is the
|
||||
union of the bounded components including no seed.
|
||||
Note that the unbounded component of the plane is
|
||||
never meshed.
|
||||
\ccRequire The \ccc{value_type} of \ccc{begin} and
|
||||
\ccc{end} is \ccc{CDT::Geom_traits::Point_2}.}
|
||||
|
||||
\end{ccRefFunction}
|
||||
|
||||
%%% For emacs/AucTeX:
|
||||
%%% Local Variables: ***
|
||||
%%% mode:latex ***
|
||||
%%% TeX-master: "../Mesh_2.tex" ***
|
||||
%%% End: ***
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
examples/Mesh_2/makefile
|
||||
GNUmakefile
|
||||
TODO
|
||||
README
|
||||
bench
|
||||
Doxyfile
|
||||
stylesheet.css
|
||||
utils
|
||||
implementation.tex
|
||||
*.kdev*
|
||||
depends
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
include makefile
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
#
|
||||
# dependencies
|
||||
#
|
||||
# if you want deps, create a file my_makefile that contains
|
||||
# -include depends
|
||||
#
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
-include my_makefile
|
||||
|
||||
dep:
|
||||
rm -f depends; $(MAKE) depends
|
||||
|
||||
.PHONY: dep
|
||||
|
||||
depends: *.C
|
||||
cat /dev/null > depends
|
||||
for f in *.C; do \
|
||||
echo >> depends; \
|
||||
echo >> depends; \
|
||||
echo "$${f%.C}$(OBJ_EXT): \\" >> depends; \
|
||||
$(CGAL_CXX) $(CXXFLAGS) -M -MG $$f \
|
||||
| grep '\.\./\.\..*/include/CGAL' >> depends; \
|
||||
done
|
||||
test -f depends
|
||||
|
||||
run: all
|
||||
./conforming
|
||||
./mesh_class
|
||||
./mesh_global
|
||||
./mesh_with_seeds
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
// file: examples/Mesh_2/conforming.C
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Triangulation_conformer_2.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K> CDT;
|
||||
typedef CDT::Point Point;
|
||||
typedef CDT::Vertex_handle Vertex_handle;
|
||||
|
||||
int main()
|
||||
{
|
||||
CDT cdt;
|
||||
|
||||
// construct a constrained triangulation
|
||||
Vertex_handle
|
||||
va = cdt.insert(Point( 5., 5.)),
|
||||
vb = cdt.insert(Point(-5., 5.)),
|
||||
vc = cdt.insert(Point( 4., 3.)),
|
||||
vd = cdt.insert(Point( 5.,-5.)),
|
||||
ve = cdt.insert(Point( 6., 6.)),
|
||||
vf = cdt.insert(Point(-6., 6.)),
|
||||
vg = cdt.insert(Point(-6.,-6.)),
|
||||
vh = cdt.insert(Point( 6.,-6.));
|
||||
|
||||
cdt.insert_constraint(va,vb);
|
||||
cdt.insert_constraint(vb,vc);
|
||||
cdt.insert_constraint(vc,vd);
|
||||
cdt.insert_constraint(vd,va);
|
||||
cdt.insert_constraint(ve,vf);
|
||||
cdt.insert_constraint(vf,vg);
|
||||
cdt.insert_constraint(vg,vh);
|
||||
cdt.insert_constraint(vh,ve);
|
||||
|
||||
std::cout << "Number of vertices before: "
|
||||
<< cdt.number_of_vertices() << std::endl;
|
||||
|
||||
// make it conforming Delaunay
|
||||
CGAL::make_conforming_Delaunay_2(cdt);
|
||||
|
||||
std::cout << "Number of vertices after make_conforming_Delaunay_2: "
|
||||
<< cdt.number_of_vertices() << std::endl;
|
||||
|
||||
// then make it conforming Gabriel
|
||||
CGAL::make_conforming_Gabriel_2(cdt);
|
||||
|
||||
std::cout << "Number of vertices after make_conforming_Gabriel_2: "
|
||||
<< cdt.number_of_vertices() << std::endl;
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
# Created by the script cgal_create_makefile
|
||||
# This is the makefile for compiling a CGAL application.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# include platform specific settings
|
||||
#---------------------------------------------------------------------#
|
||||
# Choose the right include file from the <cgalroot>/make directory.
|
||||
|
||||
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
|
||||
include $(CGAL_MAKEFILE)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compiler flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
CXXFLAGS = \
|
||||
-I../../include \
|
||||
-I../../../Triangulation_2/include \
|
||||
$(CGAL_CXXFLAGS) \
|
||||
$(LONG_NAME_PROBLEM_CXXFLAGS) \
|
||||
$(OTHER_CXXFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# linker flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
LIBPATH = \
|
||||
$(CGAL_LIBPATH)
|
||||
|
||||
LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_LDFLAGS)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# target entries
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
all: \
|
||||
conforming$(EXE_EXT) \
|
||||
mesh_class$(EXE_EXT) \
|
||||
mesh_global$(EXE_EXT) \
|
||||
mesh_with_seeds$(EXE_EXT)
|
||||
|
||||
conforming$(EXE_EXT): conforming$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)conforming conforming$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
mesh_class$(EXE_EXT): mesh_class$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)mesh_class mesh_class$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
mesh_global$(EXE_EXT): mesh_global$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)mesh_global mesh_global$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
mesh_with_seeds$(EXE_EXT): mesh_with_seeds$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)mesh_with_seeds mesh_with_seeds$(OBJ_EXT) $(LDFLAGS)
|
||||
|
||||
clean: \
|
||||
conforming.clean \
|
||||
mesh_class.clean \
|
||||
mesh_global.clean \
|
||||
mesh_with_seeds.clean
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# suffix rules
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
.C$(OBJ_EXT):
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
|
||||
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
// file: examples/Mesh_2/mesh_class.C
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Delaunay_mesher_2.h>
|
||||
#include <CGAL/Delaunay_mesh_face_base_2.h>
|
||||
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
||||
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
|
||||
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
|
||||
typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
|
||||
typedef CGAL::Delaunay_mesher_2<CDT, Criteria> Mesher;
|
||||
|
||||
typedef CDT::Vertex_handle Vertex_handle;
|
||||
typedef CDT::Point Point;
|
||||
|
||||
int main()
|
||||
{
|
||||
CDT cdt;
|
||||
|
||||
Vertex_handle va = cdt.insert(Point(-4,0));
|
||||
Vertex_handle vb = cdt.insert(Point(0,-1));
|
||||
Vertex_handle vc = cdt.insert(Point(4,0));
|
||||
Vertex_handle vd = cdt.insert(Point(0,1));
|
||||
cdt.insert(Point(2, 0.6));
|
||||
|
||||
cdt.insert_constraint(va, vb);
|
||||
cdt.insert_constraint(vb, vc);
|
||||
cdt.insert_constraint(vc, vd);
|
||||
cdt.insert_constraint(vd, va);
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
|
||||
std::cout << "Meshing the triangulation with default criterias..."
|
||||
<< std::endl;
|
||||
|
||||
Mesher mesher(cdt);
|
||||
mesher.refine_mesh();
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
|
||||
std::cout << "Meshing with new criterias..." << std::endl;
|
||||
// 0.125 is the default shape bound. It corresponds to abound 20.6 degree.
|
||||
// 0.5 is the upper bound on the length of the longuest edge.
|
||||
// See reference manual for Delaunay_mesh_size_traits_2<K>.
|
||||
mesher.set_criteria(Criteria(0.125, 0.5));
|
||||
mesher.refine_mesh();
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
// file: examples/Mesh_2/mesh_global.C
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Delaunay_mesher_2.h>
|
||||
#include <CGAL/Delaunay_mesh_face_base_2.h>
|
||||
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
||||
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
|
||||
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
|
||||
typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
|
||||
|
||||
typedef CDT::Vertex_handle Vertex_handle;
|
||||
typedef CDT::Point Point;
|
||||
|
||||
int main()
|
||||
{
|
||||
CDT cdt;
|
||||
|
||||
Vertex_handle va = cdt.insert(Point(-4,0));
|
||||
Vertex_handle vb = cdt.insert(Point(0,-1));
|
||||
Vertex_handle vc = cdt.insert(Point(4,0));
|
||||
Vertex_handle vd = cdt.insert(Point(0,1));
|
||||
cdt.insert(Point(2, 0.6));
|
||||
|
||||
cdt.insert_constraint(va, vb);
|
||||
cdt.insert_constraint(vb, vc);
|
||||
cdt.insert_constraint(vc, vd);
|
||||
cdt.insert_constraint(vd, va);
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
|
||||
std::cout << "Meshing the triangulation..." << std::endl;
|
||||
CGAL::refine_Delaunay_mesh_2(cdt, Criteria(0.125, 0.5));
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
// file: examples/Mesh_2/mesh_with_seeds.C
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Delaunay_mesher_2.h>
|
||||
#include <CGAL/Delaunay_mesh_face_base_2.h>
|
||||
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
struct K : public CGAL::Exact_predicates_inexact_constructions_kernel {};
|
||||
typedef CGAL::Triangulation_vertex_base_2<K> Vb;
|
||||
typedef CGAL::Delaunay_mesh_face_base_2<K> Fb;
|
||||
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> Tds;
|
||||
typedef CGAL::Constrained_Delaunay_triangulation_2<K, Tds> CDT;
|
||||
typedef CGAL::Delaunay_mesh_size_criteria_2<CDT> Criteria;
|
||||
|
||||
typedef CDT::Vertex_handle Vertex_handle;
|
||||
typedef CDT::Point Point;
|
||||
|
||||
int main()
|
||||
{
|
||||
CDT cdt;
|
||||
Vertex_handle va = cdt.insert(Point(2,0));
|
||||
Vertex_handle vb = cdt.insert(Point(0,2));
|
||||
Vertex_handle vc = cdt.insert(Point(-2,0));
|
||||
Vertex_handle vd = cdt.insert(Point(0,-2));
|
||||
|
||||
cdt.insert_constraint(va, vb);
|
||||
cdt.insert_constraint(vb, vc);
|
||||
cdt.insert_constraint(vc, vd);
|
||||
cdt.insert_constraint(vd, va);
|
||||
|
||||
va = cdt.insert(Point(3,3));
|
||||
vb = cdt.insert(Point(-3,3));
|
||||
vc = cdt.insert(Point(-3,-3));
|
||||
vd = cdt.insert(Point(3,0-3));
|
||||
|
||||
cdt.insert_constraint(va, vb);
|
||||
cdt.insert_constraint(vb, vc);
|
||||
cdt.insert_constraint(vc, vd);
|
||||
cdt.insert_constraint(vd, va);
|
||||
|
||||
std::list<Point> list_of_seeds;
|
||||
|
||||
list_of_seeds.push_back(Point(0, 0));
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
|
||||
std::cout << "Meshing the domain..." << std::endl;
|
||||
CGAL::refine_Delaunay_mesh_2(cdt, list_of_seeds.begin(), list_of_seeds.end(),
|
||||
Criteria());
|
||||
|
||||
std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl;
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
// Copyright (c) 2003-2004 INRIA Sophia-Antipolis (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// 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
|
||||
|
||||
#ifndef CGAL_DELAUNAY_MESH_AREA_CRITERIA_2_H
|
||||
#define CGAL_DELAUNAY_MESH_AREA_CRITERIA_2_H
|
||||
|
||||
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template <class Tr>
|
||||
class Delaunay_mesh_area_criteria_2
|
||||
: public virtual Delaunay_mesh_criteria_2<Tr>,
|
||||
private Delaunay_mesh_size_criteria_2<Tr>
|
||||
/* This class "is a" Delaunay_mesh_criteria_2<Tr> and is implemented by
|
||||
Delaunay_mesh_size_criteria_2<Tr>. Delaunay_mesh_criteria_2<Tr> is a
|
||||
virtual base class of Delaunay_mesh_size_criteria_2<Tr>. */
|
||||
{
|
||||
public:
|
||||
typedef Delaunay_mesh_criteria_2<Tr> Base;
|
||||
typedef Delaunay_mesh_size_criteria_2<Tr> Private_base;
|
||||
|
||||
typedef typename Delaunay_mesh_size_criteria_2<Tr>::Quality Quality;
|
||||
|
||||
Delaunay_mesh_area_criteria_2(const double aspect_bound = 0.125,
|
||||
const double area_bound = 0)
|
||||
: Private_base(aspect_bound, area_bound) {};
|
||||
|
||||
inline
|
||||
double area_bound() const { return this->sizebound; };
|
||||
|
||||
inline
|
||||
void set_area_bound(const double ab) { this->sizebound = ab; };
|
||||
|
||||
class Is_bad: public Private_base::Is_bad
|
||||
{
|
||||
public:
|
||||
typedef typename Private_base::Is_bad Is_bad_base;
|
||||
|
||||
typedef typename Tr::Point Point_2;
|
||||
typedef typename Tr::Triangle Triangle_2;
|
||||
typedef typename Tr::Face_handle Face_handle;
|
||||
|
||||
Is_bad(const double aspect_bound,
|
||||
const double area_bound)
|
||||
: Is_bad_base(aspect_bound, area_bound) {};
|
||||
|
||||
Mesh_2::Face_badness operator()(Quality q)
|
||||
{
|
||||
return Is_bad_base::operator()(q);
|
||||
}
|
||||
|
||||
Mesh_2::Face_badness operator()(const Face_handle& fh,
|
||||
Quality& q) const
|
||||
{
|
||||
typedef typename Tr::Geom_traits Geom_traits;
|
||||
|
||||
typedef typename Geom_traits::Point_2 Point_2;
|
||||
typedef typename Geom_traits::Triangle_2 Triangle_2;
|
||||
typedef typename Geom_traits::Compute_area_2 Compute_area_2;
|
||||
typedef typename Geom_traits::Compute_squared_distance_2
|
||||
Compute_squared_distance_2;
|
||||
typedef typename Geom_traits::FT FT;
|
||||
|
||||
|
||||
Geom_traits geom_traits;
|
||||
|
||||
Compute_area_2 area_2 = geom_traits.compute_area_2_object();
|
||||
Compute_squared_distance_2 squared_distance =
|
||||
geom_traits.compute_squared_distance_2_object();
|
||||
|
||||
const Point_2& pa = fh->vertex(0)->point();
|
||||
const Point_2& pb = fh->vertex(1)->point();
|
||||
const Point_2& pc = fh->vertex(2)->point();
|
||||
|
||||
Triangle_2 t = geom_traits.construct_triangle_2_object()(pa,pb,pc);
|
||||
double area = CGAL::to_double(area_2(t));
|
||||
area=area*area; // squared area
|
||||
|
||||
double
|
||||
a = CGAL::to_double(squared_distance(pb, pc)),
|
||||
b = CGAL::to_double(squared_distance(pc, pa)),
|
||||
c = CGAL::to_double(squared_distance(pa, pb));
|
||||
|
||||
double min_sine; // squared minimum sine
|
||||
|
||||
if(a<b)
|
||||
if(a<c)
|
||||
min_sine = area/(b*c);
|
||||
else
|
||||
min_sine = area/(a*b);
|
||||
else
|
||||
if(b<c)
|
||||
min_sine = area/(a*c);
|
||||
else
|
||||
min_sine = area/(a*b);
|
||||
|
||||
q.first = min_sine;
|
||||
q.second = area;
|
||||
|
||||
if( this->squared_size_bound != 0 &&
|
||||
area > this->squared_size_bound )
|
||||
return Mesh_2::IMPERATIVELY_BAD;
|
||||
else
|
||||
if( min_sine < this->B )
|
||||
return Mesh_2::BAD;
|
||||
else
|
||||
return Mesh_2::NOT_BAD;
|
||||
};
|
||||
}; // end class Is_bad
|
||||
|
||||
Is_bad is_bad_object() const
|
||||
{ return Is_bad(this->bound(), area_bound()); }
|
||||
};
|
||||
|
||||
} //end namespace
|
||||
|
||||
#endif
|
||||