mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'origin/master' into Region_growing-revision-danston
This commit is contained in:
commit
460c50b142
|
|
@ -3,7 +3,7 @@ sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libmpfr-dev \
|
sudo apt-get install -y libmpfr-dev \
|
||||||
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
|
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \
|
||||||
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost1.72-dev zsh
|
libqt5svg5-dev qttools5-dev qttools5-dev-tools libboost-dev libinsighttoolkit4-dev zsh
|
||||||
#update cmake to 3.18.4
|
#update cmake to 3.18.4
|
||||||
sudo apt purge --auto-remove cmake
|
sudo apt purge --auto-remove cmake
|
||||||
cd /tmp
|
cd /tmp
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,15 @@ jobs:
|
||||||
if(asso == 'OWNER' || asso == 'MEMBER') {
|
if(asso == 'OWNER' || asso == 'MEMBER') {
|
||||||
const body = context.payload.comment.body
|
const body = context.payload.comment.body
|
||||||
if(body.includes("build:")) {
|
if(body.includes("build:")) {
|
||||||
const re = /\/build:(\w+)\s*/;
|
const re = /\/(force-)?build:(\w+)\s*/;
|
||||||
if(re.test(body)){
|
if(re.test(body)){
|
||||||
const res = re.exec(body)
|
const res = re.exec(body)
|
||||||
return res[1];
|
if(body.includes("force-")) {
|
||||||
|
return res[2]+":yes"
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return res[2]+":no"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -70,19 +75,22 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
PR_NUMBER=${{ steps.get_pr_number.outputs.result }}
|
PR_NUMBER=${{ steps.get_pr_number.outputs.result }}
|
||||||
ROUND=${{ steps.get_round.outputs.result }}
|
TMP_ROUND=${{ steps.get_round.outputs.result }}
|
||||||
|
ROUND=$(echo $TMP_ROUND | cut -d ":" -f 1)
|
||||||
|
force=$(echo $TMP_ROUND | cut -d ":" -f 2)
|
||||||
wget --no-verbose cgal.github.io -O tmp.html
|
wget --no-verbose cgal.github.io -O tmp.html
|
||||||
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html; then
|
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html || [ "$force" = "yes" ]; then
|
||||||
#list impacted packages
|
#list impacted packages
|
||||||
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
|
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
|
||||||
if [ "$LIST_OF_PKGS" = "" ]; then
|
if [ "$LIST_OF_PKGS" = "" ]; then
|
||||||
|
echo "::set-output name=DoxygenError::No package affected."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd build_doc && make -j2 doc
|
cd build_doc && make -j2 doc
|
||||||
make -j2 doc_with_postprocessing 2>tmp.log
|
make -j2 doc_with_postprocessing 2>tmp.log
|
||||||
if [ -s tmp.log ]; then
|
if [ -s tmp.log ]; then
|
||||||
content=`cat ./build_doc/tmp.log`
|
content=`cat ./tmp.log`
|
||||||
echo ::set-output name=DoxygenError::$(cat tmp.log)
|
echo "::set-output name=DoxygenError::$(cat tmp.log)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
|
|
@ -101,6 +109,7 @@ jobs:
|
||||||
mv tmp.html index.html
|
mv tmp.html index.html
|
||||||
git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
|
git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
|
||||||
else
|
else
|
||||||
|
echo "::set-output name=DoxygenError::This round already exists. Overwrite it with /force-build"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -109,7 +118,10 @@ jobs:
|
||||||
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const address = "The documentation is built. It will be available, after a few minutes, here : https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/${{ steps.get_round.outputs.result }}/Manual/index.html"
|
const tmp_round = "${{ steps.get_round.outputs.result }}";
|
||||||
|
const id = tmp_round.indexOf(":");
|
||||||
|
const round = tmp_round.substring(0,id);
|
||||||
|
const address = "The documentation is built. It will be available, after a few minutes, here : https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/"+round+"/Manual/index.html"
|
||||||
github.issues.createComment({
|
github.issues.createComment({
|
||||||
owner: "CGAL",
|
owner: "CGAL",
|
||||||
repo: "cgal",
|
repo: "cgal",
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ jobs:
|
||||||
if [ -d ${PR_NUMBER} ]; then
|
if [ -d ${PR_NUMBER} ]; then
|
||||||
git rm -r ${PR_NUMBER}
|
git rm -r ${PR_NUMBER}
|
||||||
fi
|
fi
|
||||||
#git diff exits with 1 if there is a diff
|
#git diff exits with 1 if there is no diff
|
||||||
if ! git diff --quiet; then
|
if git diff --quiet; then
|
||||||
git commit -a --amend -m"base commit" && git push -f -u origin master
|
git commit -a --amend -m"base commit" && git push -f -u origin master
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
name: Filter Testsuite
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.event.comment.user.login == 'maxGimeno' && contains(github.event.comment.body, '/testme')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/github-script@v3
|
||||||
|
id: get_label
|
||||||
|
with:
|
||||||
|
result-encoding: string
|
||||||
|
script: |
|
||||||
|
//get branch name and username
|
||||||
|
const pr_url = context.payload.issue.pull_request.url
|
||||||
|
const pr_content = await github.request(pr_url)
|
||||||
|
const label = pr_content.data.head.label
|
||||||
|
const base = pr_content.data.base.ref
|
||||||
|
console.log(label)
|
||||||
|
return label+":"+base
|
||||||
|
- name: Run Testsuite
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
#ssh key
|
||||||
|
(
|
||||||
|
cat <<EOF
|
||||||
|
${{ secrets.ssh_key }}
|
||||||
|
EOF
|
||||||
|
)>> ~/.ssh/id_rsa
|
||||||
|
chmod 600 /home/runner/.ssh/id_rsa
|
||||||
|
#ssh public key
|
||||||
|
(
|
||||||
|
cat <<EOF
|
||||||
|
${{ secrets.ssh_key_pub }}
|
||||||
|
EOF
|
||||||
|
)>> ~/.ssh/id_rsa.pub
|
||||||
|
chmod 644 /home/runner/.ssh/id_rsa.pub
|
||||||
|
#known hosts
|
||||||
|
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_known_hosts -O ~/.ssh/known_hosts
|
||||||
|
#config file
|
||||||
|
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_config -O ~/.ssh/config
|
||||||
|
#list of hosts
|
||||||
|
wget --no-check-certificate https://cgal.geometryfactory.com/CGAL/ssh_host_list -O ~/ssh_host_list
|
||||||
|
#ssh command
|
||||||
|
LABEL="${{ steps.get_label.outputs.result }}"
|
||||||
|
USER_NAME=$(echo $LABEL | cut -d':' -f 1)
|
||||||
|
BRANCH_NAME=$(echo $LABEL | cut -d':' -f 2)
|
||||||
|
BASE=$(echo $LABEL | cut -d':' -f 3)
|
||||||
|
PR_NUMBER=${{ github.event.issue.number }}
|
||||||
|
mapfile -t HOSTS < ~/ssh_host_list;
|
||||||
|
for i in ${!HOSTS[@]}; do
|
||||||
|
HOST=$(echo ${HOSTS[$i]}|cut -d' ' -f 1 )
|
||||||
|
PATH_TO_SCRIPT=$(echo ${HOSTS[$i]}|cut -d' ' -f 2 )
|
||||||
|
echo "ssh ${HOST} ${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
||||||
|
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
||||||
|
done
|
||||||
|
- name: Post address
|
||||||
|
uses: actions/github-script@v3
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const address = "The testsuite is lauched. results will be found, after it is done, here : https://cgal.geometryfactory.com/~mgimeno/test_suite/TESTRESULTS/index.shtml "
|
||||||
|
github.issues.createComment({
|
||||||
|
owner: "CGAL",
|
||||||
|
repo: "cgal",
|
||||||
|
issue_number: ${{ github.event.issue.number }},
|
||||||
|
body: address
|
||||||
|
});
|
||||||
|
|
@ -527,6 +527,36 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class Query, class Traversal_traits>
|
||||||
|
void traversal_with_priority(const Query& query, Traversal_traits& traits) const
|
||||||
|
{
|
||||||
|
switch(size())
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
traits.intersection(query, singleton_data());
|
||||||
|
break;
|
||||||
|
default: // if(size() >= 2)
|
||||||
|
root_node()->template traversal_with_priority<Traversal_traits,Query>(query, traits, m_primitives.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class Query, class Traversal_traits>
|
||||||
|
void traversal_with_priority_and_group_traversal(const Query& query, Traversal_traits& traits, const std::size_t group_traversal_bound) const
|
||||||
|
{
|
||||||
|
switch(size())
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
traits.intersection(query, singleton_data());
|
||||||
|
break;
|
||||||
|
default: // if(size() >= 2)
|
||||||
|
root_node()->template traversal_with_priority_and_group_traversal(m_primitives, query, traits, m_primitives.size(), 0, group_traversal_bound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef AABB_node<AABBTraits> Node;
|
typedef AABB_node<AABBTraits> Node;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,20 @@ public:
|
||||||
Traversal_traits& traits,
|
Traversal_traits& traits,
|
||||||
const std::size_t nb_primitives) const;
|
const std::size_t nb_primitives) const;
|
||||||
|
|
||||||
|
template<class Traversal_traits, class Query>
|
||||||
|
void traversal_with_priority(const Query& query,
|
||||||
|
Traversal_traits& traits,
|
||||||
|
const std::size_t nb_primitives) const;
|
||||||
|
|
||||||
|
template<class Primitive_vector, class Traversal_traits, class Query>
|
||||||
|
void traversal_with_priority_and_group_traversal(const Primitive_vector& primitives,
|
||||||
|
const Query& query,
|
||||||
|
Traversal_traits& traits,
|
||||||
|
const std::size_t nb_primitives,
|
||||||
|
std::size_t first_primitive_index,
|
||||||
|
const std::size_t group_size_bound) const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef AABBTraits AABB_traits;
|
typedef AABBTraits AABB_traits;
|
||||||
typedef AABB_node<AABB_traits> Node;
|
typedef AABB_node<AABB_traits> Node;
|
||||||
|
|
@ -152,6 +166,156 @@ AABB_node<Tr>::traversal(const Query& query,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename Tr>
|
||||||
|
template<class Traversal_traits, class Query>
|
||||||
|
void
|
||||||
|
AABB_node<Tr>::traversal_with_priority(const Query& query,
|
||||||
|
Traversal_traits& traits,
|
||||||
|
const std::size_t nb_primitives) const
|
||||||
|
{
|
||||||
|
// Recursive traversal
|
||||||
|
switch(nb_primitives)
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
traits.intersection(query, left_data());
|
||||||
|
if( traits.go_further() )
|
||||||
|
{
|
||||||
|
traits.intersection(query, right_data());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
traits.intersection(query, left_data());
|
||||||
|
if( traits.go_further() && traits.do_intersect(query, right_child()) )
|
||||||
|
{
|
||||||
|
right_child().traversal_with_priority(query, traits, 2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
bool ileft, iright;
|
||||||
|
typename Traversal_traits::Priority pleft, pright;
|
||||||
|
std::tie(ileft, pleft) = traits.do_intersect_with_priority(query, left_child());
|
||||||
|
std::tie(iright, pright) = traits.do_intersect_with_priority(query, right_child());
|
||||||
|
CGAL_precondition( (ileft || iright) ? traits.do_intersect(query, *this) : true );
|
||||||
|
|
||||||
|
if(ileft)
|
||||||
|
{
|
||||||
|
if(iright)
|
||||||
|
{
|
||||||
|
// Both children have to be inspected.
|
||||||
|
if(pleft >= pright)
|
||||||
|
{
|
||||||
|
// Inspect the left child first, has higher priority.
|
||||||
|
left_child().traversal_with_priority(query, traits, nb_primitives/2);
|
||||||
|
if( traits.go_further() )
|
||||||
|
right_child().traversal_with_priority(query, traits, nb_primitives-nb_primitives/2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Inspect the right child first, has higher priority.
|
||||||
|
right_child().traversal_with_priority(query, traits, nb_primitives-nb_primitives/2);
|
||||||
|
if( traits.go_further() )
|
||||||
|
left_child().traversal_with_priority(query, traits, nb_primitives/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Only the left child has to be inspected.
|
||||||
|
left_child().traversal_with_priority(query, traits, nb_primitives/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(iright)
|
||||||
|
{
|
||||||
|
// Only the right child has to be inspected.
|
||||||
|
right_child().traversal_with_priority(query, traits, nb_primitives-nb_primitives/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: find a better name
|
||||||
|
template<typename Tr>
|
||||||
|
template<class Primitive_vector, class Traversal_traits, class Query>
|
||||||
|
void
|
||||||
|
AABB_node<Tr>::traversal_with_priority_and_group_traversal(const Primitive_vector& primitives,
|
||||||
|
const Query& query,
|
||||||
|
Traversal_traits& traits,
|
||||||
|
const std::size_t nb_primitives,
|
||||||
|
std::size_t first_primitive_index,
|
||||||
|
const std::size_t group_traversal_bound) const
|
||||||
|
{
|
||||||
|
// Group traversal
|
||||||
|
CGAL_assertion(group_traversal_bound >= 2);
|
||||||
|
if ( nb_primitives <= group_traversal_bound )
|
||||||
|
{
|
||||||
|
if ( !traits.do_intersect(query, *this) ) return;
|
||||||
|
CGAL_assertion(traits.do_intersect(query, *this));
|
||||||
|
traits.traverse_group(query, primitives.begin()+first_primitive_index, primitives.begin()+first_primitive_index+nb_primitives);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recursive traversal
|
||||||
|
switch(nb_primitives)
|
||||||
|
{
|
||||||
|
case 2:
|
||||||
|
traits.intersection(query, left_data());
|
||||||
|
if( traits.go_further() )
|
||||||
|
{
|
||||||
|
traits.intersection(query, right_data());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
traits.intersection(query, left_data());
|
||||||
|
if( traits.go_further() && traits.do_intersect(query, right_child()) )
|
||||||
|
{
|
||||||
|
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, 2, first_primitive_index+1, group_traversal_bound);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
bool ileft, iright;
|
||||||
|
typename Traversal_traits::Priority pleft, pright;
|
||||||
|
std::tie(ileft, pleft) = traits.do_intersect_with_priority(query, left_child());
|
||||||
|
std::tie(iright, pright) = traits.do_intersect_with_priority(query, right_child());
|
||||||
|
CGAL_precondition( (ileft || iright) ? traits.do_intersect(query, *this) : true );
|
||||||
|
|
||||||
|
if(ileft)
|
||||||
|
{
|
||||||
|
if(iright)
|
||||||
|
{
|
||||||
|
// Both children have to be inspected.
|
||||||
|
if(pleft >= pright)
|
||||||
|
{
|
||||||
|
// Inspect the left child first, has higher priority.
|
||||||
|
left_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives/2, first_primitive_index, group_traversal_bound);
|
||||||
|
if( traits.go_further() )
|
||||||
|
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives-nb_primitives/2, first_primitive_index+nb_primitives/2, group_traversal_bound);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Inspect the right child first, has higher priority.
|
||||||
|
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives-nb_primitives/2, first_primitive_index+nb_primitives/2, group_traversal_bound);
|
||||||
|
if( traits.go_further() )
|
||||||
|
left_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives/2, first_primitive_index, group_traversal_bound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Only the left child has to be inspected.
|
||||||
|
left_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives/2, first_primitive_index, group_traversal_bound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(iright)
|
||||||
|
{
|
||||||
|
// Only the right child has to be inspected.
|
||||||
|
right_child().traversal_with_priority_and_group_traversal(primitives, query, traits, nb_primitives-nb_primitives/2, first_primitive_index+nb_primitives/2, group_traversal_bound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace CGAL
|
} // end namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_AABB_NODE_H
|
#endif // CGAL_AABB_NODE_H
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
#include <boost/variant/apply_visitor.hpp>
|
#include <boost/variant/apply_visitor.hpp>
|
||||||
#if BOOST_VERSION >= 105000
|
|
||||||
# if defined(BOOST_MSVC)
|
# if defined(BOOST_MSVC)
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
# pragma warning(disable: 4996)
|
# pragma warning(disable: 4996)
|
||||||
|
|
@ -30,9 +29,6 @@
|
||||||
# if defined(BOOST_MSVC)
|
# if defined(BOOST_MSVC)
|
||||||
# pragma warning(pop)
|
# pragma warning(pop)
|
||||||
# endif
|
# endif
|
||||||
#else
|
|
||||||
# include <queue>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
|
|
||||||
|
|
@ -54,11 +50,7 @@ public:
|
||||||
// BVH_node::traversal this is done through the function parameter
|
// BVH_node::traversal this is done through the function parameter
|
||||||
// nb_primitives in the recursion.
|
// nb_primitives in the recursion.
|
||||||
typedef
|
typedef
|
||||||
#if BOOST_VERSION >= 105000
|
|
||||||
boost::heap::priority_queue< Node_ptr_with_ft, boost::heap::compare< std::greater<Node_ptr_with_ft> > >
|
boost::heap::priority_queue< Node_ptr_with_ft, boost::heap::compare< std::greater<Node_ptr_with_ft> > >
|
||||||
#else
|
|
||||||
std::priority_queue< Node_ptr_with_ft>
|
|
||||||
#endif
|
|
||||||
Heap_type;
|
Heap_type;
|
||||||
|
|
||||||
typename AABB_traits::Intersection
|
typename AABB_traits::Intersection
|
||||||
|
|
@ -167,14 +159,8 @@ private:
|
||||||
const Node* node;
|
const Node* node;
|
||||||
size_type nb_primitives;
|
size_type nb_primitives;
|
||||||
FT value;
|
FT value;
|
||||||
#if BOOST_VERSION >= 105000
|
|
||||||
bool operator<(const Node_ptr_with_ft& other) const { return value < other.value; }
|
bool operator<(const Node_ptr_with_ft& other) const { return value < other.value; }
|
||||||
bool operator>(const Node_ptr_with_ft& other) const { return value > other.value; }
|
bool operator>(const Node_ptr_with_ft& other) const { return value > other.value; }
|
||||||
#else
|
|
||||||
bool operator>(const Node_ptr_with_ft& other) const { return value < other.value; }
|
|
||||||
bool operator<(const Node_ptr_with_ft& other) const { return value > other.value; }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct as_ray_param_visitor {
|
struct as_ray_param_visitor {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ for Cartesian kernels.
|
||||||
\cgalHasModel double
|
\cgalHasModel double
|
||||||
\cgalHasModel `CGAL::Gmpq`
|
\cgalHasModel `CGAL::Gmpq`
|
||||||
\cgalHasModel `CGAL::Interval_nt`
|
\cgalHasModel `CGAL::Interval_nt`
|
||||||
\cgalHasModel \ref CGAL::Interval_nt_advanced
|
\cgalHasModel `CGAL::Interval_nt_advanced`
|
||||||
\cgalHasModel `CGAL::Lazy_exact_nt<FieldNumberType>`
|
\cgalHasModel `CGAL::Lazy_exact_nt<FieldNumberType>`
|
||||||
\cgalHasModel `CGAL::Quotient<RingNumberType>`
|
\cgalHasModel `CGAL::Quotient<RingNumberType>`
|
||||||
\cgalHasModel `leda_rational`
|
\cgalHasModel `leda_rational`
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ for Homogeneous kernels.
|
||||||
\cgalHasModel \cpp built-in number types
|
\cgalHasModel \cpp built-in number types
|
||||||
\cgalHasModel `CGAL::Gmpq`
|
\cgalHasModel `CGAL::Gmpq`
|
||||||
\cgalHasModel `CGAL::Gmpz`
|
\cgalHasModel `CGAL::Gmpz`
|
||||||
\cgalHasModel` CGAL::Interval_nt`
|
\cgalHasModel `CGAL::Interval_nt`
|
||||||
\cgalHasModel \ref CGAL::Interval_nt_advanced
|
\cgalHasModel `CGAL::Interval_nt_advanced`
|
||||||
\cgalHasModel `CGAL::Lazy_exact_nt<RingNumberType>`
|
\cgalHasModel `CGAL::Lazy_exact_nt<RingNumberType>`
|
||||||
\cgalHasModel `CGAL::MP_Float`
|
\cgalHasModel `CGAL::MP_Float`
|
||||||
\cgalHasModel `CGAL::Gmpzf`
|
\cgalHasModel `CGAL::Gmpzf`
|
||||||
|
|
|
||||||
|
|
@ -338,6 +338,7 @@ void test_algebraic_structure_intern( const CGAL::Field_tag& ) {
|
||||||
test_algebraic_structure_intern< AS >( CGAL::Integral_domain_tag());
|
test_algebraic_structure_intern< AS >( CGAL::Integral_domain_tag());
|
||||||
AS a(1);
|
AS a(1);
|
||||||
AS b(3);
|
AS b(3);
|
||||||
|
AS& b_ref = b; b = b_ref; // to exercise self-copy
|
||||||
AS c = a / b;
|
AS c = a / b;
|
||||||
(void)c; // avoid warnings for unused variables
|
(void)c; // avoid warnings for unused variables
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,8 @@
|
||||||
The concept `AlphaShapeTraits_2` describes the requirements for the geometric traits
|
The concept `AlphaShapeTraits_2` describes the requirements for the geometric traits
|
||||||
class of the underlying Delaunay triangulation of a basic alpha shape.
|
class of the underlying Delaunay triangulation of a basic alpha shape.
|
||||||
|
|
||||||
\cgalRefines `DelaunayTriangulationTraits_2`
|
\cgalRefines `DelaunayTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
|
||||||
|
\cgalRefines `Periodic_2DelaunayTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation.
|
||||||
In addition to the requirements described in the concept
|
|
||||||
::DelaunayTriangulationTraits_2, the geometric traits class of a
|
|
||||||
Delaunay triangulation plugged in a basic alpha shapes provides the
|
|
||||||
following.
|
|
||||||
|
|
||||||
\cgalHasModel All models of `Kernel`.
|
\cgalHasModel All models of `Kernel`.
|
||||||
\cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3<K>`.
|
\cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3<K>`.
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,7 @@ The concept `WeightedAlphaShapeTraits_2` describes the requirements
|
||||||
for the geometric traits class
|
for the geometric traits class
|
||||||
of the underlying regular triangulation of a weighted alpha shape.
|
of the underlying regular triangulation of a weighted alpha shape.
|
||||||
|
|
||||||
\cgalRefines `RegularTriangulationTraits_2`
|
\cgalRefines `RegularTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a regular triangulation.
|
||||||
|
|
||||||
In addition to the requirements described in the concept
|
|
||||||
`RegularTriangulationTraits_2`, the geometric traits class of a
|
|
||||||
regular triangulation plugged in a basic alpha shapes provides the
|
|
||||||
following.
|
|
||||||
|
|
||||||
\cgalHasModel All models of `Kernel`.
|
\cgalHasModel All models of `Kernel`.
|
||||||
\cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3<K>`.
|
\cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3<K>`.
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,8 @@ The concept `AlphaShapeTraits_3` describes the requirements
|
||||||
for the geometric traits class
|
for the geometric traits class
|
||||||
of the underlying Delaunay triangulation of a basic alpha shape.
|
of the underlying Delaunay triangulation of a basic alpha shape.
|
||||||
|
|
||||||
\cgalRefines `DelaunayTriangulationTraits_3`
|
\cgalRefines `DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
|
||||||
|
\cgalRefines `Periodic_3DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation.
|
||||||
In addition to the requirements described in the concept
|
|
||||||
::DelaunayTriangulationTraits_3, the geometric traits class of a
|
|
||||||
Delaunay triangulation plugged in a basic alpha shapes provides the
|
|
||||||
following.
|
|
||||||
|
|
||||||
\cgalHasModel All models of `Kernel`.
|
\cgalHasModel All models of `Kernel`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,8 @@ The concept `FixedAlphaShapeTraits_3` describes the requirements
|
||||||
for the geometric traits class
|
for the geometric traits class
|
||||||
of the underlying Delaunay triangulation of a basic alpha shape with a fixed value alpha.
|
of the underlying Delaunay triangulation of a basic alpha shape with a fixed value alpha.
|
||||||
|
|
||||||
\cgalRefines `DelaunayTriangulationTraits_3`
|
\cgalRefines `DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation.
|
||||||
|
\cgalRefines `Periodic_3DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation.
|
||||||
In addition to the requirements described in the concept
|
|
||||||
`DelaunayTriangulationTraits_3`, the geometric traits class of a
|
|
||||||
Delaunay triangulation plugged in a basic alpha shape with fixed alpha
|
|
||||||
value provides the following.
|
|
||||||
|
|
||||||
\cgalHasModel All models of `Kernel`.
|
\cgalHasModel All models of `Kernel`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,8 @@
|
||||||
The concept `FixedWeightedAlphaShapeTraits_3` describes the requirements
|
The concept `FixedWeightedAlphaShapeTraits_3` describes the requirements
|
||||||
for the geometric traits class of the underlying regular triangulation of a weighted alpha shape with fixed alpha value.
|
for the geometric traits class of the underlying regular triangulation of a weighted alpha shape with fixed alpha value.
|
||||||
|
|
||||||
\cgalRefines `RegularTriangulationTraits_3`
|
\cgalRefines `RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a regular triangulation.
|
||||||
|
\cgalRefines `Periodic_3RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic regular triangulation.
|
||||||
In addition to the requirements described in the concept
|
|
||||||
::RegularTriangulationTraits_3, the geometric traits class of a
|
|
||||||
regular triangulation plugged in a weighted alpha shape with fixed
|
|
||||||
alpha value provides the following.
|
|
||||||
|
|
||||||
\cgalHasModel All models of `Kernel`.
|
\cgalHasModel All models of `Kernel`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,8 @@ The concept `WeightedAlphaShapeTraits_3` describes the requirements
|
||||||
for the geometric traits class
|
for the geometric traits class
|
||||||
of the underlying regular triangulation of a weighted alpha shape.
|
of the underlying regular triangulation of a weighted alpha shape.
|
||||||
|
|
||||||
\cgalRefines `RegularTriangulationTraits_3`
|
\cgalRefines `RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a regular triangulation.
|
||||||
|
\cgalRefines `Periodic_3RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic regular triangulation.
|
||||||
In addition to the requirements described in the concept
|
|
||||||
`RegularTriangulationTraits_3`, the geometric traits class of a
|
|
||||||
regular triangulation plugged in a basic alpha shapes provides the
|
|
||||||
following.
|
|
||||||
|
|
||||||
\cgalHasModel All models of `Kernel`.
|
\cgalHasModel All models of `Kernel`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,20 +44,12 @@ public:
|
||||||
using Base::f;
|
using Base::f;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if defined(__POWERPC__) && \
|
|
||||||
defined(__GNUC__) && (__GNUC__ == 3 ) && (__GNUC_MINOR__ == 4)
|
|
||||||
// hack to avoid nasty warning for G++ 3.4 on Darwin
|
|
||||||
static FT OFFSET()
|
|
||||||
{
|
|
||||||
return FT(10000);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static const FT& OFFSET()
|
static const FT& OFFSET()
|
||||||
{
|
{
|
||||||
static const FT offset_(10000);
|
static const FT offset_(10000);
|
||||||
return offset_;
|
return offset_;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
template< class Stream >
|
template< class Stream >
|
||||||
inline
|
inline
|
||||||
|
|
|
||||||
|
|
@ -267,24 +267,29 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Line_2 line() const
|
inline const Line_2& line() const
|
||||||
{
|
{
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Point_2 center() const
|
inline const Point_2& center() const
|
||||||
{
|
{
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline const Point_2& origin() const
|
||||||
|
{
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
template< class Stream >
|
template< class Stream >
|
||||||
void draw(Stream& W) const
|
void draw(Stream& W) const
|
||||||
{
|
{
|
||||||
std::vector< Point_2 > p;
|
std::vector< Point_2 > p;
|
||||||
std::vector< Point_2 > pleft, pright;
|
std::vector< Point_2 > pleft, pright;
|
||||||
|
|
||||||
pleft.push_back(o);
|
pleft.push_back(origin());
|
||||||
pright.push_back(o);
|
pright.push_back(origin());
|
||||||
const FT STEP(2);
|
const FT STEP(2);
|
||||||
for (int i = 1; i <= 100; i++) {
|
for (int i = 1; i <= 100; i++) {
|
||||||
p = compute_points(i * i * STEP);
|
p = compute_points(i * i * STEP);
|
||||||
|
|
@ -311,7 +316,7 @@ public:
|
||||||
W << Segment_2(pright[i], pright[i+1]);
|
W << Segment_2(pright[i], pright[i+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
W << o;
|
W << origin();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3475,7 +3475,7 @@ This package provides an <I>inserter</I> (the `<<` operator) and an
|
||||||
`Arrangement_2<Traits,Dcel>` class that inserts and an arrangement
|
`Arrangement_2<Traits,Dcel>` class that inserts and an arrangement
|
||||||
object into an output stream and extracts an arrangement object from an
|
object into an output stream and extracts an arrangement object from an
|
||||||
input stream respectively. The arrangement is written using a simple
|
input stream respectively. The arrangement is written using a simple
|
||||||
predefined ASCII format that encodes the arrangement topology, as well
|
predefined \ascii format that encodes the arrangement topology, as well
|
||||||
as all geometric entities associated with vertices and edges.
|
as all geometric entities associated with vertices and edges.
|
||||||
|
|
||||||
The ability to use the input/output operators, requires that the
|
The ability to use the input/output operators, requires that the
|
||||||
|
|
@ -3560,7 +3560,7 @@ with the basic arrangement structure.
|
||||||
|
|
||||||
The arrangement package supplies an inserter and an extractor for the
|
The arrangement package supplies an inserter and an extractor for the
|
||||||
`Arrangement_with_history_2<Traits,Dcel>` class. The arrangement is
|
`Arrangement_with_history_2<Traits,Dcel>` class. The arrangement is
|
||||||
represented using a simple predefined ASCII format. An object of the
|
represented using a simple predefined \ascii format. An object of the
|
||||||
`Arrangement_with_history_2<Traits,Dcel>` type can be saved and
|
`Arrangement_with_history_2<Traits,Dcel>` type can be saved and
|
||||||
restored, as long as the `Curve_2` type defined by the traits
|
restored, as long as the `Curve_2` type defined by the traits
|
||||||
class - as well as the `Point_2` type and the `X_monotone_curve_2`
|
class - as well as the `Point_2` type and the `X_monotone_curve_2`
|
||||||
|
|
|
||||||
|
|
@ -122,15 +122,10 @@ public:
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::Around_point_circulator;
|
friend class Trapezoidal_decomposition_2<Traits>::Around_point_circulator;
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::Around_point_circulator;
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::Around_point_circulator;
|
friend class Trapezoidal_decomposition_2<Traits>::Around_point_circulator;
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class Around_point_circulator;
|
friend class Around_point_circulator;
|
||||||
|
|
|
||||||
|
|
@ -94,14 +94,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -94,14 +94,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -91,14 +91,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -96,14 +96,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -93,14 +93,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -96,14 +96,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -92,14 +92,8 @@ public:
|
||||||
#ifdef CGAL_PM_FRIEND_CLASS
|
#ifdef CGAL_PM_FRIEND_CLASS
|
||||||
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
#if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER)
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#elif defined(__GNUC__)
|
#elif (__GNUC__ > 0)
|
||||||
|
|
||||||
#if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)))
|
|
||||||
friend typename Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
|
||||||
#else
|
|
||||||
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
friend class Trapezoidal_decomposition_2<Traits>::In_face_iterator;
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
friend class In_face_iterator;
|
friend class In_face_iterator;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -46,9 +46,7 @@
|
||||||
#define CGAL_TD_DEFAULT_SIZE_THRESHOLD 12
|
#define CGAL_TD_DEFAULT_SIZE_THRESHOLD 12
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
#if !defined __GNUC__ || __GNUC__> 3 || ((__GNUC__== 3) && (__GNUC_MINOR__> 4))
|
|
||||||
#define CGAL_PM_FRIEND_CLASS
|
#define CGAL_PM_FRIEND_CLASS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -738,35 +738,12 @@ public:
|
||||||
|
|
||||||
// read values
|
// read values
|
||||||
is >> rep._m_xy;
|
is >> rep._m_xy;
|
||||||
#if BOOST_VERSION < 104300
|
|
||||||
// EBEB: This fixes a bug in optional_io.hpp, reported to Fernando on
|
|
||||||
// April 27, 2010, don't know whether the fix makes it into
|
|
||||||
// boost 1_43.
|
|
||||||
if (!rep._m_xy) {
|
|
||||||
swallow(is, '-');
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
swallow(is, ',');
|
swallow(is, ',');
|
||||||
is >> rep._m_x;
|
is >> rep._m_x;
|
||||||
#if BOOST_VERSION < 104300
|
|
||||||
if (!rep._m_x) {
|
|
||||||
swallow(is, '-');
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
swallow(is, ',');
|
swallow(is, ',');
|
||||||
is >> rep._m_curve;
|
is >> rep._m_curve;
|
||||||
#if BOOST_VERSION < 104300
|
|
||||||
if (!rep._m_curve) {
|
|
||||||
swallow(is, '-');
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
swallow(is, ',');
|
swallow(is, ',');
|
||||||
is >> rep._m_arcno;
|
is >> rep._m_arcno;
|
||||||
#if BOOST_VERSION < 104300
|
|
||||||
if (!rep._m_arcno) {
|
|
||||||
swallow(is, '-');
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
swallow(is, ',');
|
swallow(is, ',');
|
||||||
is >> rep._m_location;
|
is >> rep._m_location;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
* A class defining a textual (ASCII) input/output format for arrangements
|
* A class defining a textual (\ascii) input/output format for arrangements
|
||||||
* and supports reading and writing an arrangement from or to input/output
|
* and supports reading and writing an arrangement from or to input/output
|
||||||
* streams.
|
* streams.
|
||||||
*/
|
*/
|
||||||
|
|
@ -489,7 +489,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
* A class defining a textual (ASCII) input/output format for arrangements
|
* A class defining a textual (\ascii) input/output format for arrangements
|
||||||
* that store auxiliary dat with their face records, as they are templated
|
* that store auxiliary dat with their face records, as they are templated
|
||||||
* by a face-extended DCEL class.
|
* by a face-extended DCEL class.
|
||||||
*/
|
*/
|
||||||
|
|
@ -546,7 +546,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
* A class defining a textual (ASCII) input/output format for arrangements
|
* A class defining a textual (\ascii) input/output format for arrangements
|
||||||
* that store auxiliary dat with all their DCEL records, as they are templated
|
* that store auxiliary dat with all their DCEL records, as they are templated
|
||||||
* by a extended DCEL class.
|
* by a extended DCEL class.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
* A class defining a textual (ASCII) input/output format for arrangements
|
* A class defining a textual (\ascii) input/output format for arrangements
|
||||||
* with history and supports reading and writing an arrangement from or to
|
* with history and supports reading and writing an arrangement from or to
|
||||||
* input/output streams.
|
* input/output streams.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ public:
|
||||||
|
|
||||||
/*! using the additional data that we store at the event, we compute
|
/*! using the additional data that we store at the event, we compute
|
||||||
* how much we have to jump (he = he->next()->twin()) from the halfedge
|
* how much we have to jump (he = he->next()->twin()) from the halfedge
|
||||||
* that is stored in the event, to the halefge that is previous to 'curve'
|
* that is stored in the event, to the halfedge that is previous to 'curve'
|
||||||
* that is about to be inserted into the arrangement.
|
* that is about to be inserted into the arrangement.
|
||||||
*/
|
*/
|
||||||
int compute_halfedge_jump_count(Subcurve* curve)
|
int compute_halfedge_jump_count(Subcurve* curve)
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,21 @@ private:
|
||||||
X_monotone_curve_2 sub_cv1; // Auxiliary variables
|
X_monotone_curve_2 sub_cv1; // Auxiliary variables
|
||||||
X_monotone_curve_2 sub_cv2; // (used for splitting curves).
|
X_monotone_curve_2 sub_cv2; // (used for splitting curves).
|
||||||
|
|
||||||
|
|
||||||
|
// update halfedge pointing to events, case with overlaps
|
||||||
|
template <class Subcurve_>
|
||||||
|
void update_incident_halfedge_after_split(Subcurve_* sc,
|
||||||
|
Halfedge_handle he,
|
||||||
|
Halfedge_handle new_he,
|
||||||
|
Tag_true);
|
||||||
|
|
||||||
|
// update halfedge pointing to events, case without overlaps
|
||||||
|
template <class Subcurve_>
|
||||||
|
void update_incident_halfedge_after_split(Subcurve_* sc,
|
||||||
|
Halfedge_handle he,
|
||||||
|
Halfedge_handle new_he,
|
||||||
|
Tag_false);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A notification invoked when a new subcurve is created. */
|
/*! A notification invoked when a new subcurve is created. */
|
||||||
void add_subcurve(const X_monotone_curve_2& cv, Subcurve* sc);
|
void add_subcurve(const X_monotone_curve_2& cv, Subcurve* sc);
|
||||||
|
|
@ -99,6 +114,43 @@ public:
|
||||||
// Member-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// update halfedge pointing to events, case with overlaps
|
||||||
|
//
|
||||||
|
template <typename Hlpr, typename Vis>
|
||||||
|
template <class Subcurve_>
|
||||||
|
void Arr_insertion_ss_visitor<Hlpr, Vis>::
|
||||||
|
update_incident_halfedge_after_split(Subcurve_* sc,
|
||||||
|
Halfedge_handle he,
|
||||||
|
Halfedge_handle new_he,
|
||||||
|
Tag_true)
|
||||||
|
{
|
||||||
|
std::vector<Subcurve*> leaves;
|
||||||
|
sc->all_leaves( std::back_inserter(leaves) );
|
||||||
|
for(Subcurve* ssc : leaves)
|
||||||
|
{
|
||||||
|
Event* last_event_on_ssc = ssc->last_event();
|
||||||
|
if (last_event_on_ssc->halfedge_handle() == he)
|
||||||
|
last_event_on_ssc->set_halfedge_handle(new_he->next());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// update halfedge pointing to events, case without overlaps
|
||||||
|
//
|
||||||
|
template <typename Hlpr, typename Vis>
|
||||||
|
template <class Subcurve_>
|
||||||
|
void Arr_insertion_ss_visitor<Hlpr, Vis>::
|
||||||
|
update_incident_halfedge_after_split(Subcurve_* sc,
|
||||||
|
Halfedge_handle he,
|
||||||
|
Halfedge_handle new_he,
|
||||||
|
Tag_false)
|
||||||
|
{
|
||||||
|
Event* last_event_on_sc = sc->last_event();
|
||||||
|
if (last_event_on_sc->halfedge_handle() == he)
|
||||||
|
last_event_on_sc->set_halfedge_handle(new_he->next());
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Check if the halfedge associated with the given subcurve will be split
|
// Check if the halfedge associated with the given subcurve will be split
|
||||||
// at the given event.
|
// at the given event.
|
||||||
|
|
@ -132,9 +184,8 @@ Arr_insertion_ss_visitor<Hlpr, Vis>::split_edge(Halfedge_handle he, Subcurve* sc
|
||||||
Halfedge_handle new_he =
|
Halfedge_handle new_he =
|
||||||
this->m_arr_access.split_edge_ex(he, pt.base(),
|
this->m_arr_access.split_edge_ex(he, pt.base(),
|
||||||
sub_cv1.base(), sub_cv2.base());
|
sub_cv1.base(), sub_cv2.base());
|
||||||
Event* last_event_on_sc = sc->last_event();
|
// update the halfedge incident to events on the left of the split
|
||||||
if (last_event_on_sc->halfedge_handle() == he)
|
update_incident_halfedge_after_split(sc, he, new_he, typename Subcurve::Handle_overlaps());
|
||||||
last_event_on_sc->set_halfedge_handle(new_he->next());
|
|
||||||
|
|
||||||
return new_he;
|
return new_he;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Memeber-function definitions:
|
// Member-function definitions:
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,20 @@ bool test_insert_at_vertices(){
|
||||||
return test_insert_at_vertices_1() && test_insert_at_vertices_2();
|
return test_insert_at_vertices_1() && test_insert_at_vertices_2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool test_insert_on_overlap(){
|
||||||
|
Arrangement_2 arr;
|
||||||
|
|
||||||
|
std::vector<Segment_2> segs1, segs2;
|
||||||
|
segs1.emplace_back(Point_2(0, 0), Point_2(0, 4));
|
||||||
|
segs2.emplace_back(Point_2(0, 0), Point_2(4,4));
|
||||||
|
segs2.emplace_back(Point_2(0, 2), Point_2(0, 4));
|
||||||
|
segs2.emplace_back(Point_2(0, 2), Point_2(4,4));
|
||||||
|
CGAL::insert(arr, segs1.begin(), segs1.end());
|
||||||
|
CGAL::insert(arr, segs2.begin(), segs2.end());
|
||||||
|
|
||||||
|
return is_valid(arr);
|
||||||
|
}
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
Arrangement_2 arr;
|
Arrangement_2 arr;
|
||||||
|
|
@ -136,6 +150,10 @@ int main ()
|
||||||
valid=test_insert_at_vertices();
|
valid=test_insert_at_vertices();
|
||||||
std::cout << ( valid ? "valid." : "NOT valid!") << std::endl;
|
std::cout << ( valid ? "valid." : "NOT valid!") << std::endl;
|
||||||
|
|
||||||
|
if (!valid) return 1;
|
||||||
|
std::cout << "Test insert on overlap\n";
|
||||||
|
valid=test_insert_on_overlap();
|
||||||
|
|
||||||
return valid?0:1;
|
return valid?0:1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@
|
||||||
#include <boost/range/has_range_iterator.hpp>
|
#include <boost/range/has_range_iterator.hpp>
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
|
|
||||||
|
#include <bitset>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#ifdef DOXYGEN_RUNNING
|
#ifdef DOXYGEN_RUNNING
|
||||||
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS NamedParameters
|
#define CGAL_BGL_NP_TEMPLATE_PARAMETERS NamedParameters
|
||||||
#define CGAL_BGL_NP_CLASS NamedParameters
|
#define CGAL_BGL_NP_CLASS NamedParameters
|
||||||
|
|
@ -393,21 +397,68 @@ struct Face_filtered_graph
|
||||||
///returns a reference to the underlying graph.
|
///returns a reference to the underlying graph.
|
||||||
Graph& graph(){ return _graph; }
|
Graph& graph(){ return _graph; }
|
||||||
|
|
||||||
///change the set of selected faces using a patch id
|
// Handling of internal correspondency for index maps.
|
||||||
template<class FacePatchIndexMap>
|
// The indices must be kept valid when the selection changes.
|
||||||
void set_selected_faces(typename boost::property_traits<FacePatchIndexMap>::value_type face_patch_id,
|
void initialize_face_indices() const
|
||||||
FacePatchIndexMap face_patch_index_map)
|
{
|
||||||
|
if(face_indices.empty())
|
||||||
|
{
|
||||||
|
face_index_type index = 0;
|
||||||
|
face_indices.resize(num_faces(_graph));
|
||||||
|
for(std::size_t i=selected_faces.find_first(); i<selected_faces.npos; i=selected_faces.find_next(i))
|
||||||
|
face_indices[i] = index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void initialize_vertex_indices() const
|
||||||
|
{
|
||||||
|
if(vertex_indices.empty())
|
||||||
|
{
|
||||||
|
vertex_index_type index = 0;
|
||||||
|
vertex_indices.resize(num_vertices(_graph));
|
||||||
|
for(std::size_t i=selected_vertices.find_first(); i<selected_vertices.npos; i=selected_vertices.find_next(i))
|
||||||
|
vertex_indices[i] = index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void initialize_halfedge_indices() const
|
||||||
|
{
|
||||||
|
if(halfedge_indices.empty())
|
||||||
|
{
|
||||||
|
halfedge_index_type index = 0;
|
||||||
|
halfedge_indices.resize(num_halfedges(_graph));
|
||||||
|
for(std::size_t i=selected_halfedges.find_first(); i<selected_halfedges.npos; i=selected_halfedges.find_next(i))
|
||||||
|
halfedge_indices[i] = index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void reset_indices()
|
||||||
{
|
{
|
||||||
face_indices.clear();
|
face_indices.clear();
|
||||||
vertex_indices.clear();
|
vertex_indices.clear();
|
||||||
halfedge_indices.clear();
|
halfedge_indices.clear();
|
||||||
|
|
||||||
|
if(is_imap_in_use.test(0))
|
||||||
|
initialize_face_indices();
|
||||||
|
if(is_imap_in_use.test(1))
|
||||||
|
initialize_vertex_indices();
|
||||||
|
if(is_imap_in_use.test(2))
|
||||||
|
initialize_halfedge_indices();
|
||||||
|
}
|
||||||
|
|
||||||
|
///change the set of selected faces using a patch id
|
||||||
|
template<class FacePatchIndexMap>
|
||||||
|
void set_selected_faces(typename boost::property_traits<FacePatchIndexMap>::value_type face_patch_id,
|
||||||
|
FacePatchIndexMap face_patch_index_map)
|
||||||
|
{
|
||||||
selected_faces.resize(num_faces(_graph));
|
selected_faces.resize(num_faces(_graph));
|
||||||
selected_vertices.resize(num_vertices(_graph));
|
selected_vertices.resize(num_vertices(_graph));
|
||||||
selected_halfedges.resize(num_halfedges(_graph));
|
selected_halfedges.resize(num_halfedges(_graph));
|
||||||
|
|
||||||
selected_faces.reset();
|
selected_faces.reset();
|
||||||
selected_vertices.reset();
|
selected_vertices.reset();
|
||||||
selected_halfedges.reset();
|
selected_halfedges.reset();
|
||||||
|
|
||||||
for(face_descriptor fd : faces(_graph) )
|
for(face_descriptor fd : faces(_graph) )
|
||||||
{
|
{
|
||||||
if(get(face_patch_index_map, fd) == face_patch_id)
|
if(get(face_patch_index_map, fd) == face_patch_id)
|
||||||
|
|
@ -421,6 +472,8 @@ struct Face_filtered_graph
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset_indices();
|
||||||
}
|
}
|
||||||
/// change the set of selected faces using a range of patch ids
|
/// change the set of selected faces using a range of patch ids
|
||||||
template<class FacePatchIndexRange, class FacePatchIndexMap>
|
template<class FacePatchIndexRange, class FacePatchIndexMap>
|
||||||
|
|
@ -433,16 +486,14 @@ struct Face_filtered_graph
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
face_indices.clear();
|
|
||||||
vertex_indices.clear();
|
|
||||||
halfedge_indices.clear();
|
|
||||||
|
|
||||||
selected_faces.resize(num_faces(_graph));
|
selected_faces.resize(num_faces(_graph));
|
||||||
selected_vertices.resize(num_vertices(_graph));
|
selected_vertices.resize(num_vertices(_graph));
|
||||||
selected_halfedges.resize(num_halfedges(_graph));
|
selected_halfedges.resize(num_halfedges(_graph));
|
||||||
|
|
||||||
selected_faces.reset();
|
selected_faces.reset();
|
||||||
selected_vertices.reset();
|
selected_vertices.reset();
|
||||||
selected_halfedges.reset();
|
selected_halfedges.reset();
|
||||||
|
|
||||||
typedef typename boost::property_traits<FacePatchIndexMap>::value_type Patch_index;
|
typedef typename boost::property_traits<FacePatchIndexMap>::value_type Patch_index;
|
||||||
boost::unordered_set<Patch_index> pids(boost::begin(selected_face_patch_indices),
|
boost::unordered_set<Patch_index> pids(boost::begin(selected_face_patch_indices),
|
||||||
boost::end(selected_face_patch_indices));
|
boost::end(selected_face_patch_indices));
|
||||||
|
|
@ -460,21 +511,22 @@ struct Face_filtered_graph
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset_indices();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// change the set of selected faces using a range of face descriptors
|
/// change the set of selected faces using a range of face descriptors
|
||||||
template<class FaceRange>
|
template<class FaceRange>
|
||||||
void set_selected_faces(const FaceRange& selection)
|
void set_selected_faces(const FaceRange& selection)
|
||||||
{
|
{
|
||||||
face_indices.clear();
|
|
||||||
vertex_indices.clear();
|
|
||||||
halfedge_indices.clear();
|
|
||||||
|
|
||||||
selected_faces.resize(num_faces(_graph));
|
selected_faces.resize(num_faces(_graph));
|
||||||
selected_vertices.resize(num_vertices(_graph));
|
selected_vertices.resize(num_vertices(_graph));
|
||||||
selected_halfedges.resize(num_halfedges(_graph));
|
selected_halfedges.resize(num_halfedges(_graph));
|
||||||
|
|
||||||
selected_faces.reset();
|
selected_faces.reset();
|
||||||
selected_vertices.reset();
|
selected_vertices.reset();
|
||||||
selected_halfedges.reset();
|
selected_halfedges.reset();
|
||||||
|
|
||||||
for(face_descriptor fd : selection)
|
for(face_descriptor fd : selection)
|
||||||
{
|
{
|
||||||
selected_faces.set(get(fimap, fd));
|
selected_faces.set(get(fimap, fd));
|
||||||
|
|
@ -485,6 +537,8 @@ struct Face_filtered_graph
|
||||||
selected_vertices.set(get(vimap, target(hd, _graph)));
|
selected_vertices.set(get(vimap, target(hd, _graph)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset_indices();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Is_simplex_valid
|
struct Is_simplex_valid
|
||||||
|
|
@ -543,45 +597,27 @@ struct Face_filtered_graph
|
||||||
Property_map_binder<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
|
Property_map_binder<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
|
||||||
get_face_index_map() const
|
get_face_index_map() const
|
||||||
{
|
{
|
||||||
if (face_indices.empty())
|
is_imap_in_use.set(0);
|
||||||
{
|
initialize_face_indices();
|
||||||
face_index_type index = 0;
|
|
||||||
face_indices.resize(num_faces(_graph));
|
return bind_property_maps(fimap, make_property_map(face_indices));
|
||||||
for (std::size_t i=selected_faces.find_first(); i < selected_faces.npos; i = selected_faces.find_next(i))
|
|
||||||
{
|
|
||||||
face_indices[i] = index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return bind_property_maps(fimap, make_property_map(face_indices) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Property_map_binder<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
|
Property_map_binder<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
|
||||||
get_vertex_index_map() const
|
get_vertex_index_map() const
|
||||||
{
|
{
|
||||||
if (vertex_indices.empty())
|
is_imap_in_use.set(1);
|
||||||
{
|
initialize_vertex_indices();
|
||||||
vertex_index_type index = 0;
|
|
||||||
vertex_indices.resize(num_vertices(_graph));
|
|
||||||
for (std::size_t i=selected_vertices.find_first(); i < selected_vertices.npos; i = selected_vertices.find_next(i))
|
|
||||||
{
|
|
||||||
vertex_indices[i] = index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return bind_property_maps(vimap, make_property_map(vertex_indices) );
|
return bind_property_maps(vimap, make_property_map(vertex_indices) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Property_map_binder<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
|
Property_map_binder<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
|
||||||
get_halfedge_index_map() const
|
get_halfedge_index_map() const
|
||||||
{
|
{
|
||||||
if (halfedge_indices.empty())
|
is_imap_in_use.set(2);
|
||||||
{
|
initialize_halfedge_indices();
|
||||||
halfedge_index_type index = 0;
|
|
||||||
halfedge_indices.resize(num_halfedges(_graph));
|
|
||||||
for (std::size_t i=selected_halfedges.find_first(); i < selected_halfedges.npos; i = selected_halfedges.find_next(i))
|
|
||||||
{
|
|
||||||
halfedge_indices[i] = index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return bind_property_maps(himap, make_property_map(halfedge_indices) );
|
return bind_property_maps(himap, make_property_map(halfedge_indices) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -649,9 +685,11 @@ private:
|
||||||
boost::dynamic_bitset<> selected_faces;
|
boost::dynamic_bitset<> selected_faces;
|
||||||
boost::dynamic_bitset<> selected_vertices;
|
boost::dynamic_bitset<> selected_vertices;
|
||||||
boost::dynamic_bitset<> selected_halfedges;
|
boost::dynamic_bitset<> selected_halfedges;
|
||||||
|
|
||||||
mutable std::vector<face_index_type> face_indices;
|
mutable std::vector<face_index_type> face_indices;
|
||||||
mutable std::vector<vertex_index_type> vertex_indices;
|
mutable std::vector<vertex_index_type> vertex_indices;
|
||||||
mutable std::vector<halfedge_index_type> halfedge_indices;
|
mutable std::vector<halfedge_index_type> halfedge_indices;
|
||||||
|
mutable std::bitset<3> is_imap_in_use; // one per descriptor type (face, vertex, halfedge)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
@ -1206,40 +1244,6 @@ CGAL_FFG_DYNAMIC_PMAP_SPEC(dynamic_face_property_t)
|
||||||
|
|
||||||
#undef CGAL_FFG_DYNAMIC_PMAP_SPEC
|
#undef CGAL_FFG_DYNAMIC_PMAP_SPEC
|
||||||
|
|
||||||
//specializations for indices
|
|
||||||
template <class Graph,
|
|
||||||
typename FIMap,
|
|
||||||
typename VIMap,
|
|
||||||
typename HIMap>
|
|
||||||
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, CGAL::face_index_t >::type
|
|
||||||
get(CGAL::face_index_t, const Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
|
||||||
{
|
|
||||||
return w.get_face_index_map();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class Graph,
|
|
||||||
typename FIMap,
|
|
||||||
typename VIMap,
|
|
||||||
typename HIMap>
|
|
||||||
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::vertex_index_t >::type
|
|
||||||
get(boost::vertex_index_t, const Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
|
||||||
{
|
|
||||||
return w.get_vertex_index_map();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class Graph,
|
|
||||||
typename FIMap,
|
|
||||||
typename VIMap,
|
|
||||||
typename HIMap>
|
|
||||||
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, CGAL::halfedge_index_t >::type
|
|
||||||
get(CGAL::halfedge_index_t, const Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
|
||||||
{
|
|
||||||
return w.get_halfedge_index_map();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template <class Graph,
|
template <class Graph,
|
||||||
typename FIMap,
|
typename FIMap,
|
||||||
typename VIMap,
|
typename VIMap,
|
||||||
|
|
@ -1307,9 +1311,11 @@ CGAL_FILTERED_FACE_GRAPH_DYNAMIC_PMAP_SPECIALIZATION(dynamic_face_property_t)
|
||||||
|
|
||||||
//specializations for indices
|
//specializations for indices
|
||||||
template<typename Graph, typename FIMap, typename VIMap, typename HIMap>
|
template<typename Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, CGAL::face_index_t>
|
struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::face_index_t>
|
||||||
{
|
{
|
||||||
typedef typename CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>::FIM FIM;
|
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
||||||
|
typedef typename FFG::FIM FIM;
|
||||||
|
|
||||||
typedef typename CGAL::Property_map_binder<FIM,
|
typedef typename CGAL::Property_map_binder<FIM,
|
||||||
typename CGAL::Pointer_property_map<
|
typename CGAL::Pointer_property_map<
|
||||||
typename boost::property_traits<FIM>::value_type>::type> type;
|
typename boost::property_traits<FIM>::value_type>::type> type;
|
||||||
|
|
@ -1319,20 +1325,21 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, CGAL:
|
||||||
template<typename Graph, typename FIMap, typename VIMap, typename HIMap>
|
template<typename Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::vertex_index_t>
|
struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::vertex_index_t>
|
||||||
{
|
{
|
||||||
typedef typename CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>::VIM VIM;
|
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
||||||
|
typedef typename FFG::VIM VIM;
|
||||||
|
|
||||||
typedef typename CGAL::Property_map_binder<VIM,
|
typedef typename CGAL::Property_map_binder<VIM,
|
||||||
typename CGAL::Pointer_property_map<
|
typename CGAL::Pointer_property_map<
|
||||||
typename boost::property_traits<VIM>::value_type>::type> type;
|
typename boost::property_traits<VIM>::value_type>::type> type;
|
||||||
typedef type const_type;
|
typedef type const_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Graph,
|
template<typename Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
typename FIMap,
|
struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::halfedge_index_t>
|
||||||
typename VIMap,
|
|
||||||
typename HIMap>
|
|
||||||
struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, CGAL::halfedge_index_t>
|
|
||||||
{
|
{
|
||||||
typedef typename CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>::HIM HIM;
|
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
|
||||||
|
typedef typename FFG::HIM HIM;
|
||||||
|
|
||||||
typedef typename CGAL::Property_map_binder<HIM,
|
typedef typename CGAL::Property_map_binder<HIM,
|
||||||
typename CGAL::Pointer_property_map<
|
typename CGAL::Pointer_property_map<
|
||||||
typename boost::property_traits<HIM>::value_type>::type> type;
|
typename boost::property_traits<HIM>::value_type>::type> type;
|
||||||
|
|
@ -1341,4 +1348,52 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, CGAL:
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
//specializations for indices
|
||||||
|
template <class Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
|
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::face_index_t >::const_type
|
||||||
|
get(boost::face_index_t, const Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
||||||
|
{
|
||||||
|
return w.get_face_index_map();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
|
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::vertex_index_t >::const_type
|
||||||
|
get(boost::vertex_index_t, const Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
||||||
|
{
|
||||||
|
return w.get_vertex_index_map();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
|
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::halfedge_index_t >::const_type
|
||||||
|
get(boost::halfedge_index_t, const Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
||||||
|
{
|
||||||
|
return w.get_halfedge_index_map();
|
||||||
|
}
|
||||||
|
|
||||||
|
// non-const
|
||||||
|
template <class Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
|
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::face_index_t >::type
|
||||||
|
get(boost::face_index_t, Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
||||||
|
{
|
||||||
|
return w.get_face_index_map();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
|
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::vertex_index_t >::type
|
||||||
|
get(boost::vertex_index_t, Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
||||||
|
{
|
||||||
|
return w.get_vertex_index_map();
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class Graph, typename FIMap, typename VIMap, typename HIMap>
|
||||||
|
typename boost::property_map<Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost::halfedge_index_t >::type
|
||||||
|
get(boost::halfedge_index_t, Face_filtered_graph<Graph, FIMap, VIMap, HIMap>& w)
|
||||||
|
{
|
||||||
|
return w.get_halfedge_index_map();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_BOOST_GRAPH_FACE_FILTERED_GRAPH_H
|
#endif // CGAL_BOOST_GRAPH_FACE_FILTERED_GRAPH_H
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ bool read_GOCAD(const std::string& fname, Graph& g,
|
||||||
/// \cgalParamNBegin{stream_precision}
|
/// \cgalParamNBegin{stream_precision}
|
||||||
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
/// \cgalParamType{int}
|
/// \cgalParamType{int}
|
||||||
/// \cgalParamDefault{`the precision of the stream `os``}
|
/// \cgalParamDefault{the precision of the stream `os`}
|
||||||
/// \cgalParamNEnd
|
/// \cgalParamNEnd
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
|
|
@ -378,7 +378,7 @@ bool write_GOCAD(std::ostream& os, const char* name, const Graph& g,
|
||||||
/// \cgalParamNBegin{stream_precision}
|
/// \cgalParamNBegin{stream_precision}
|
||||||
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
/// \cgalParamType{int}
|
/// \cgalParamType{int}
|
||||||
/// \cgalParamDefault{`the precision of the stream `os``}
|
/// \cgalParamDefault{the precision of the stream `os`}
|
||||||
/// \cgalParamNEnd
|
/// \cgalParamNEnd
|
||||||
/// \cgalNamedParamsEnd
|
/// \cgalNamedParamsEnd
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ bool read_OBJ(const std::string& fname, Graph& g,
|
||||||
\cgalParamNBegin{stream_precision}
|
\cgalParamNBegin{stream_precision}
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`the precision of the stream `os``}
|
\cgalParamDefault{the precision of the stream `os`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -392,7 +392,7 @@ bool write_OFF_BGL(std::ostream& os,
|
||||||
\cgalParamNBegin{stream_precision}
|
\cgalParamNBegin{stream_precision}
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`the precision of the stream `os``}
|
\cgalParamDefault{the precision of the stream `os`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ bool read_PLY(std::istream& is, Graph& g,
|
||||||
|
|
||||||
\cgalNamedParamsBegin
|
\cgalNamedParamsBegin
|
||||||
\cgalParamNBegin{use_binary_mode}
|
\cgalParamNBegin{use_binary_mode}
|
||||||
\cgalParamDescription{indicates whether data should be read in binary (`true`) or in ASCII (`false`)}
|
\cgalParamDescription{indicates whether data should be read in binary (`true`) or in \ascii (`false`)}
|
||||||
\cgalParamType{Boolean}
|
\cgalParamType{Boolean}
|
||||||
\cgalParamDefault{`true`}
|
\cgalParamDefault{`true`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
|
|
@ -310,8 +310,8 @@ bool read_PLY(const std::string& fname, Graph& g,
|
||||||
\cgalParamNBegin{stream_precision}
|
\cgalParamNBegin{stream_precision}
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`the precision of the stream `os``}
|
\cgalParamDefault{the precision of the stream `os`}
|
||||||
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
|
\cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
@ -482,7 +482,7 @@ bool write_PLY(std::ostream& os, const Graph& g,
|
||||||
|
|
||||||
\cgalNamedParamsBegin
|
\cgalNamedParamsBegin
|
||||||
\cgalParamNBegin{use_binary_mode}
|
\cgalParamNBegin{use_binary_mode}
|
||||||
\cgalParamDescription{indicates whether data should be written in binary (`true`) or in ASCII (`false`)}
|
\cgalParamDescription{indicates whether data should be written in binary (`true`) or in \ascii (`false`)}
|
||||||
\cgalParamType{Boolean}
|
\cgalParamType{Boolean}
|
||||||
\cgalParamDefault{`true`}
|
\cgalParamDefault{`true`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
|
|
@ -521,7 +521,7 @@ bool write_PLY(std::ostream& os, const Graph& g,
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`6`}
|
\cgalParamDefault{`6`}
|
||||||
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
|
\cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ bool read_STL(std::istream& is,
|
||||||
|
|
||||||
\cgalNamedParamsBegin
|
\cgalNamedParamsBegin
|
||||||
\cgalParamNBegin{use_binary_mode}
|
\cgalParamNBegin{use_binary_mode}
|
||||||
\cgalParamDescription{indicates whether data should be read in binary (`true`) or in ASCII (`false`)}
|
\cgalParamDescription{indicates whether data should be read in binary (`true`) or in \ascii (`false`)}
|
||||||
\cgalParamType{Boolean}
|
\cgalParamType{Boolean}
|
||||||
\cgalParamDefault{`true`}
|
\cgalParamDefault{`true`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
|
|
@ -230,8 +230,8 @@ bool read_STL(const std::string& fname, Graph& g) { return read_STL(fname, g, pa
|
||||||
\cgalParamNBegin{stream_precision}
|
\cgalParamNBegin{stream_precision}
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`the precision of the stream `os``}
|
\cgalParamDefault{the precision of the stream `os`}
|
||||||
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
|
\cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
@ -328,7 +328,7 @@ bool write_STL(std::ostream& os,
|
||||||
|
|
||||||
\cgalNamedParamsBegin
|
\cgalNamedParamsBegin
|
||||||
\cgalParamNBegin{use_binary_mode}
|
\cgalParamNBegin{use_binary_mode}
|
||||||
\cgalParamDescription{indicates whether data should be written in binary (`true`) or in ASCII (`false`)}
|
\cgalParamDescription{indicates whether data should be written in binary (`true`) or in \ascii (`false`)}
|
||||||
\cgalParamType{Boolean}
|
\cgalParamType{Boolean}
|
||||||
\cgalParamDefault{`true`}
|
\cgalParamDefault{`true`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
|
|
@ -346,7 +346,7 @@ bool write_STL(std::ostream& os,
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`6`}
|
\cgalParamDefault{`6`}
|
||||||
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
|
\cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@ void write_polys_points(std::ostream& os,
|
||||||
*
|
*
|
||||||
* \cgalNamedParamsBegin
|
* \cgalNamedParamsBegin
|
||||||
* \cgalParamNBegin{use_binary_mode}
|
* \cgalParamNBegin{use_binary_mode}
|
||||||
* \cgalParamDescription{indicates whether data should be written in binary (`true`) or in ASCII (`false`)}
|
* \cgalParamDescription{indicates whether data should be written in binary (`true`) or in \ascii (`false`)}
|
||||||
* \cgalParamType{Boolean}
|
* \cgalParamType{Boolean}
|
||||||
* \cgalParamDefault{`true`}
|
* \cgalParamDefault{`true`}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
|
|
@ -417,7 +417,7 @@ void write_polys_points(std::ostream& os,
|
||||||
* \cgalParamNBegin{stream_precision}
|
* \cgalParamNBegin{stream_precision}
|
||||||
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
* \cgalParamType{int}
|
* \cgalParamType{int}
|
||||||
* \cgalParamDefault{`the precision of the stream `os``}
|
* \cgalParamDefault{the precision of the stream `os`}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
* \cgalNamedParamsEnd
|
* \cgalNamedParamsEnd
|
||||||
*
|
*
|
||||||
|
|
@ -492,7 +492,7 @@ bool write_VTP(std::ostream& os,
|
||||||
*
|
*
|
||||||
* \cgalNamedParamsBegin
|
* \cgalNamedParamsBegin
|
||||||
* \cgalParamNBegin{use_binary_mode}
|
* \cgalParamNBegin{use_binary_mode}
|
||||||
* \cgalParamDescription{indicates whether data should be written in binary (`true`) or in ASCII (`false`)}
|
* \cgalParamDescription{indicates whether data should be written in binary (`true`) or in \ascii (`false`)}
|
||||||
* \cgalParamType{Boolean}
|
* \cgalParamType{Boolean}
|
||||||
* \cgalParamDefault{`true`}
|
* \cgalParamDefault{`true`}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace IO {
|
||||||
\cgalParamNBegin{stream_precision}
|
\cgalParamNBegin{stream_precision}
|
||||||
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
\cgalParamType{int}
|
\cgalParamType{int}
|
||||||
\cgalParamDefault{`the precision of the stream `os``}
|
\cgalParamDefault{the precision of the stream `os`}
|
||||||
\cgalParamNEnd
|
\cgalParamNEnd
|
||||||
\cgalNamedParamsEnd
|
\cgalNamedParamsEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ bool read_polygon_mesh(const std::string& fname, Graph& g)
|
||||||
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
|
||||||
* \cgalParamType{int}
|
* \cgalParamType{int}
|
||||||
* \cgalParamDefault{`6`}
|
* \cgalParamDefault{`6`}
|
||||||
* \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
|
* \cgalParamExtra{This parameter is only meaningful while using \ascii encoding.}
|
||||||
* \cgalParamNEnd
|
* \cgalParamNEnd
|
||||||
*
|
*
|
||||||
* \cgalParamNBegin{verbose}
|
* \cgalParamNBegin{verbose}
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,7 @@
|
||||||
|
|
||||||
#include <boost/graph/adjacency_list.hpp>
|
#include <boost/graph/adjacency_list.hpp>
|
||||||
#include <boost/graph/compressed_sparse_row_graph.hpp>
|
#include <boost/graph/compressed_sparse_row_graph.hpp>
|
||||||
|
#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
|
||||||
#if BOOST_VERSION >= 104400 // at this version kolmogorov_max_flow become depricated.
|
|
||||||
# include <boost/graph/boykov_kolmogorov_max_flow.hpp>
|
|
||||||
#else
|
|
||||||
# include <boost/graph/kolmogorov_max_flow.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
@ -242,12 +237,8 @@ public:
|
||||||
|
|
||||||
double max_flow()
|
double max_flow()
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 104400
|
|
||||||
return boost::boykov_kolmogorov_max_flow(graph, cluster_source,
|
return boost::boykov_kolmogorov_max_flow(graph, cluster_source,
|
||||||
cluster_sink);
|
cluster_sink);
|
||||||
#else
|
|
||||||
return boost::kolmogorov_max_flow(graph, cluster_source, cluster_sink);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename VertexLabelMap, typename InputVertexDescriptor>
|
template <typename VertexLabelMap, typename InputVertexDescriptor>
|
||||||
|
|
@ -352,13 +343,8 @@ public:
|
||||||
|
|
||||||
void init_vertices()
|
void init_vertices()
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 104000
|
|
||||||
graph = Graph(boost::edges_are_unsorted, edge_map.begin(), edge_map.end(),
|
graph = Graph(boost::edges_are_unsorted, edge_map.begin(), edge_map.end(),
|
||||||
edge_map_weights.begin(), nb_vertices);
|
edge_map_weights.begin(), nb_vertices);
|
||||||
#else
|
|
||||||
graph= Graph(edge_map.begin(), edge_map.end(),
|
|
||||||
edge_map_weights.begin(), nb_vertices);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// PERFORMANCE PROBLEM
|
// PERFORMANCE PROBLEM
|
||||||
// need to set reverse edge map, I guess there is no way to do that before creating the graph
|
// need to set reverse edge map, I guess there is no way to do that before creating the graph
|
||||||
|
|
@ -379,7 +365,6 @@ public:
|
||||||
|
|
||||||
double max_flow()
|
double max_flow()
|
||||||
{
|
{
|
||||||
#if BOOST_VERSION >= 104400
|
|
||||||
// since properties are bundled, defaults does not work need to specify them
|
// since properties are bundled, defaults does not work need to specify them
|
||||||
return boost::boykov_kolmogorov_max_flow
|
return boost::boykov_kolmogorov_max_flow
|
||||||
(graph,
|
(graph,
|
||||||
|
|
@ -392,19 +377,6 @@ public:
|
||||||
boost::get(boost::vertex_index,
|
boost::get(boost::vertex_index,
|
||||||
graph), // this is not bundled, get it from graph (CRS provides one)
|
graph), // this is not bundled, get it from graph (CRS provides one)
|
||||||
0, 1);
|
0, 1);
|
||||||
#else
|
|
||||||
return boost::kolmogorov_max_flow
|
|
||||||
(graph,
|
|
||||||
boost::get(&EdgeP::edge_capacity, graph),
|
|
||||||
boost::get(&EdgeP::edge_residual_capacity, graph),
|
|
||||||
boost::get(&EdgeP::edge_reverse, graph),
|
|
||||||
boost::get(&VertexP::vertex_predecessor, graph),
|
|
||||||
boost::get(&VertexP::vertex_color, graph),
|
|
||||||
boost::get(&VertexP::vertex_distance_t, graph),
|
|
||||||
boost::get(boost::vertex_index,
|
|
||||||
graph), // this is not bundled, get it from graph
|
|
||||||
0, 1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename VertexLabelMap, typename InputVertexDescriptor>
|
template <typename VertexLabelMap, typename InputVertexDescriptor>
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,9 @@ CGAL_add_named_parameter(use_angle_smoothing_t, use_angle_smoothing, use_angle_s
|
||||||
CGAL_add_named_parameter(use_area_smoothing_t, use_area_smoothing, use_area_smoothing)
|
CGAL_add_named_parameter(use_area_smoothing_t, use_area_smoothing, use_area_smoothing)
|
||||||
CGAL_add_named_parameter(use_Delaunay_flips_t, use_Delaunay_flips, use_Delaunay_flips)
|
CGAL_add_named_parameter(use_Delaunay_flips_t, use_Delaunay_flips, use_Delaunay_flips)
|
||||||
CGAL_add_named_parameter(do_project_t, do_project, do_project)
|
CGAL_add_named_parameter(do_project_t, do_project, do_project)
|
||||||
|
CGAL_add_named_parameter(do_split_t, do_split, do_split)
|
||||||
|
CGAL_add_named_parameter(do_collapse_t, do_collapse, do_collapse)
|
||||||
|
CGAL_add_named_parameter(do_flip_t, do_flip, do_flip)
|
||||||
CGAL_add_named_parameter(do_orientation_tests_t, do_orientation_tests, do_orientation_tests)
|
CGAL_add_named_parameter(do_orientation_tests_t, do_orientation_tests, do_orientation_tests)
|
||||||
CGAL_add_named_parameter(do_self_intersection_tests_t, do_self_intersection_tests, do_self_intersection_tests)
|
CGAL_add_named_parameter(do_self_intersection_tests_t, do_self_intersection_tests, do_self_intersection_tests)
|
||||||
CGAL_add_named_parameter(error_codes_t, error_codes, error_codes)
|
CGAL_add_named_parameter(error_codes_t, error_codes, error_codes)
|
||||||
|
|
@ -121,7 +124,10 @@ CGAL_add_named_parameter(do_not_modify_t, do_not_modify, do_not_modify)
|
||||||
CGAL_add_named_parameter(allow_self_intersections_t, allow_self_intersections, allow_self_intersections)
|
CGAL_add_named_parameter(allow_self_intersections_t, allow_self_intersections, allow_self_intersections)
|
||||||
CGAL_add_named_parameter(non_manifold_feature_map_t, non_manifold_feature_map, non_manifold_feature_map)
|
CGAL_add_named_parameter(non_manifold_feature_map_t, non_manifold_feature_map, non_manifold_feature_map)
|
||||||
CGAL_add_named_parameter(polyhedral_envelope_epsilon_t, polyhedral_envelope_epsilon, polyhedral_envelope_epsilon)
|
CGAL_add_named_parameter(polyhedral_envelope_epsilon_t, polyhedral_envelope_epsilon, polyhedral_envelope_epsilon)
|
||||||
|
CGAL_add_named_parameter(match_faces_t, match_faces, match_faces)
|
||||||
CGAL_add_named_parameter(face_epsilon_map_t, face_epsilon_map, face_epsilon_map)
|
CGAL_add_named_parameter(face_epsilon_map_t, face_epsilon_map, face_epsilon_map)
|
||||||
|
CGAL_add_named_parameter(maximum_number_t, maximum_number, maximum_number)
|
||||||
|
CGAL_add_named_parameter(use_one_sided_hausdorff_t, use_one_sided_hausdorff, use_one_sided_hausdorff)
|
||||||
|
|
||||||
// List of named parameters that we use in the package 'Surface Mesh Simplification'
|
// List of named parameters that we use in the package 'Surface Mesh Simplification'
|
||||||
CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost)
|
CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost)
|
||||||
|
|
@ -174,6 +180,7 @@ CGAL_add_named_parameter(pointmatcher_config_t, pointmatcher_config, pointmatche
|
||||||
CGAL_add_named_parameter(adjacencies_t, adjacencies, adjacencies)
|
CGAL_add_named_parameter(adjacencies_t, adjacencies, adjacencies)
|
||||||
CGAL_add_named_parameter(scan_angle_t, scan_angle_map, scan_angle_map)
|
CGAL_add_named_parameter(scan_angle_t, scan_angle_map, scan_angle_map)
|
||||||
CGAL_add_named_parameter(scanline_id_t, scanline_id_map, scanline_id_map)
|
CGAL_add_named_parameter(scanline_id_t, scanline_id_map, scanline_id_map)
|
||||||
|
CGAL_add_named_parameter(scalar_t, scalar_map, scalar_map)
|
||||||
|
|
||||||
// List of named parameters used in Surface_mesh_approximation package
|
// List of named parameters used in Surface_mesh_approximation package
|
||||||
CGAL_add_named_parameter(verbose_level_t, verbose_level, verbose_level)
|
CGAL_add_named_parameter(verbose_level_t, verbose_level, verbose_level)
|
||||||
|
|
@ -210,7 +217,7 @@ CGAL_add_named_parameter(maximum_running_time_t, maximum_running_time, maximum_r
|
||||||
CGAL_add_named_parameter(overlap_t, overlap, overlap)
|
CGAL_add_named_parameter(overlap_t, overlap, overlap)
|
||||||
CGAL_add_named_parameter(maximum_normal_deviation_t, maximum_normal_deviation, maximum_normal_deviation)
|
CGAL_add_named_parameter(maximum_normal_deviation_t, maximum_normal_deviation, maximum_normal_deviation)
|
||||||
|
|
||||||
// shape detection
|
// List of named parameters used in Shape_detection package
|
||||||
CGAL_add_named_parameter(maximum_angle_t, maximum_angle, maximum_angle)
|
CGAL_add_named_parameter(maximum_angle_t, maximum_angle, maximum_angle)
|
||||||
CGAL_add_named_parameter(maximum_distance_t, maximum_distance, maximum_distance)
|
CGAL_add_named_parameter(maximum_distance_t, maximum_distance, maximum_distance)
|
||||||
CGAL_add_named_parameter(minimum_region_size_t, minimum_region_size, minimum_region_size)
|
CGAL_add_named_parameter(minimum_region_size_t, minimum_region_size, minimum_region_size)
|
||||||
|
|
@ -218,3 +225,14 @@ CGAL_add_named_parameter(sphere_radius_t, sphere_radius, sphere_radius)
|
||||||
CGAL_add_named_parameter(k_neighbors_t, k_neighbors, k_neighbors)
|
CGAL_add_named_parameter(k_neighbors_t, k_neighbors, k_neighbors)
|
||||||
CGAL_add_named_parameter(segment_t, segment_map, segment_map)
|
CGAL_add_named_parameter(segment_t, segment_map, segment_map)
|
||||||
CGAL_add_named_parameter(cosine_value_t, cosine_value, cosine_value)
|
CGAL_add_named_parameter(cosine_value_t, cosine_value, cosine_value)
|
||||||
|
|
||||||
|
// List of named parameters used in Shape_regularization package
|
||||||
|
CGAL_add_named_parameter(minimum_length_t, minimum_length, minimum_length)
|
||||||
|
CGAL_add_named_parameter(maximum_offset_t, maximum_offset, maximum_offset)
|
||||||
|
CGAL_add_named_parameter(regularize_parallelism_t, regularize_parallelism, regularize_parallelism)
|
||||||
|
CGAL_add_named_parameter(regularize_orthogonality_t, regularize_orthogonality, regularize_orthogonality)
|
||||||
|
CGAL_add_named_parameter(regularize_coplanarity_t, regularize_coplanarity, regularize_coplanarity)
|
||||||
|
CGAL_add_named_parameter(regularize_axis_symmetry_t, regularize_axis_symmetry, regularize_axis_symmetry)
|
||||||
|
CGAL_add_named_parameter(symmetry_direction_t, symmetry_direction, symmetry_direction)
|
||||||
|
CGAL_add_named_parameter(preserve_order_t, preserve_order, preserve_order)
|
||||||
|
CGAL_add_named_parameter(adjust_directions_t, adjust_directions, adjust_directions)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include <boost/parameter/name.hpp>
|
#include <boost/parameter/name.hpp>
|
||||||
|
|
||||||
#if defined(__clang__) || (BOOST_GCC >= 40600)
|
#if defined(__clang__) || defined(BOOST_GCC)
|
||||||
# define CGAL_IGNORE_UNUSED_VARIABLES \
|
# define CGAL_IGNORE_UNUSED_VARIABLES \
|
||||||
_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
|
_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
|
||||||
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
|
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ property uchar green
|
||||||
property uchar blue
|
property uchar blue
|
||||||
property int label
|
property int label
|
||||||
element edge 6
|
element edge 6
|
||||||
property int v0
|
property int vertex1
|
||||||
property int v1
|
property int vertex2
|
||||||
property float confidence
|
property float confidence
|
||||||
end_header
|
end_header
|
||||||
0 0 0 -0.5 -0.5 -0.5 255 255 0 0
|
0 0 0 -0.5 -0.5 -0.5 255 255 0 0
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ property uchar green
|
||||||
property uchar blue
|
property uchar blue
|
||||||
property int label
|
property int label
|
||||||
element edge 6
|
element edge 6
|
||||||
property int v0
|
property int vertex1
|
||||||
property int v1
|
property int vertex2
|
||||||
property float confidence
|
property float confidence
|
||||||
end_header
|
end_header
|
||||||
0 0 0 -0.5 -0.5 -0.5 255 255 0 0
|
0 0 0 -0.5 -0.5 -0.5 255 255 0 0
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ property uchar green
|
||||||
property uchar blue
|
property uchar blue
|
||||||
property int label
|
property int label
|
||||||
element edge 6
|
element edge 6
|
||||||
property int v0
|
property int vertex1
|
||||||
property int v1
|
property int vertex2
|
||||||
property float confidence
|
property float confidence
|
||||||
end_header
|
end_header
|
||||||
0 0 0 -0.5 -0.5 -0.5 0
|
0 0 0 -0.5 -0.5 -0.5 0
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,23 @@
|
||||||
#include <CGAL/boost/graph/Face_filtered_graph.h>
|
|
||||||
#include <CGAL/Polygon_mesh_processing/connected_components.h>
|
|
||||||
#include <CGAL/boost/graph/copy_face_graph.h>
|
#include <CGAL/boost/graph/copy_face_graph.h>
|
||||||
|
#include <CGAL/boost/graph/Face_filtered_graph.h>
|
||||||
|
#include <CGAL/boost/graph/named_params_helper.h>
|
||||||
|
#include <CGAL/Polygon_mesh_processing/connected_components.h>
|
||||||
|
#include <CGAL/use.h>
|
||||||
#include "test_Prefix.h"
|
#include "test_Prefix.h"
|
||||||
|
|
||||||
#include <boost/numeric/conversion/cast.hpp>
|
#include <boost/numeric/conversion/cast.hpp>
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
#include <boost/unordered_map.hpp>
|
#include <boost/unordered_map.hpp>
|
||||||
#include <CGAL/use.h>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
typedef boost::unordered_set<std::size_t> id_map;
|
typedef boost::unordered_set<std::size_t> id_map;
|
||||||
|
|
||||||
|
namespace PMP = CGAL::Polygon_mesh_processing;
|
||||||
|
|
||||||
template <typename Graph>
|
template <typename Graph>
|
||||||
void test_halfedge_around_vertex_iterator(const Graph& g)
|
void test_halfedge_around_vertex_iterator(const Graph& g)
|
||||||
{
|
{
|
||||||
|
|
@ -17,8 +25,7 @@ void test_halfedge_around_vertex_iterator(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
boost::unordered_map<g_face_descriptor, std::size_t> map(num_faces(g));
|
boost::unordered_map<g_face_descriptor, std::size_t> map(num_faces(g));
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
|
|
||||||
|
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
typename boost::graph_traits<Adapter >::vertex_iterator vit, vend;
|
typename boost::graph_traits<Adapter >::vertex_iterator vit, vend;
|
||||||
|
|
@ -45,8 +52,9 @@ void test_halfedge_around_face_iterator(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
|
||||||
face_iterator fit, fend;
|
face_iterator fit, fend;
|
||||||
for(boost::tie(fit, fend) = faces(fg); fit != fend; ++fit) {
|
for(boost::tie(fit, fend) = faces(fg); fit != fend; ++fit) {
|
||||||
halfedge_around_face_iterator hafit, hafend;
|
halfedge_around_face_iterator hafit, hafend;
|
||||||
|
|
@ -65,7 +73,7 @@ void test_edge_iterators(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
|
||||||
// do we iterate as many as that?
|
// do we iterate as many as that?
|
||||||
|
|
@ -91,7 +99,7 @@ void test_vertex_iterators(Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
vertex_iterator vb, ve;
|
vertex_iterator vb, ve;
|
||||||
std::size_t count = 0;
|
std::size_t count = 0;
|
||||||
|
|
@ -121,7 +129,7 @@ void test_out_edges(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
|
||||||
vertex_iterator vb, ve;
|
vertex_iterator vb, ve;
|
||||||
|
|
@ -150,7 +158,7 @@ void test_in_edges(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
|
||||||
vertex_iterator vb, ve;
|
vertex_iterator vb, ve;
|
||||||
|
|
@ -177,7 +185,7 @@ void test_in_out_edges(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
|
||||||
// check that the sets of in out edges are the same
|
// check that the sets of in out edges are the same
|
||||||
|
|
@ -219,7 +227,7 @@ void test_edge_find(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
typedef std::pair<edge_descriptor, bool> ret;
|
typedef std::pair<edge_descriptor, bool> ret;
|
||||||
|
|
||||||
|
|
@ -243,7 +251,7 @@ void test_faces(const Graph& g)
|
||||||
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
|
||||||
unsigned int count = 0;
|
unsigned int count = 0;
|
||||||
|
|
@ -262,6 +270,53 @@ void test_faces(const Graph& g)
|
||||||
assert(count == num_faces(fg));
|
assert(count == num_faces(fg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename Graph>
|
||||||
|
void test_index_property_maps(const Graph& g)
|
||||||
|
{
|
||||||
|
typedef CGAL::Face_filtered_graph<Graph> Adapter;
|
||||||
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
|
|
||||||
|
typedef typename boost::graph_traits<Graph>::face_descriptor g_face_descriptor;
|
||||||
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
|
Adapter fg(g, -1, boost::make_assoc_property_map(map));
|
||||||
|
assert(is_empty(fg));
|
||||||
|
|
||||||
|
// Non const
|
||||||
|
typedef typename CGAL::GetInitializedVertexIndexMap<Adapter>::type VIMap;
|
||||||
|
VIMap vim = CGAL::get_initialized_vertex_index_map(fg);
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(vim, num_vertices(fg), vertices(fg)));
|
||||||
|
|
||||||
|
typedef typename CGAL::GetInitializedHalfedgeIndexMap<Adapter>::type HIMap;
|
||||||
|
HIMap him = CGAL::get_initialized_halfedge_index_map(fg);
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(him, num_halfedges(fg), halfedges(fg)));
|
||||||
|
|
||||||
|
typedef typename CGAL::GetInitializedFaceIndexMap<Adapter>::type FIMap;
|
||||||
|
FIMap fim = CGAL::get_initialized_face_index_map(fg);
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(fim, num_faces(fg), faces(fg)));
|
||||||
|
|
||||||
|
fg.set_selected_faces(0, boost::make_assoc_property_map(map));
|
||||||
|
assert(!is_empty(fg));
|
||||||
|
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(vim, num_vertices(fg), vertices(fg)));
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(him, num_halfedges(fg), halfedges(fg)));
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(fim, num_faces(fg), faces(fg)));
|
||||||
|
|
||||||
|
// Const
|
||||||
|
const Adapter cfg(g, 0, boost::make_assoc_property_map(map));
|
||||||
|
typedef typename CGAL::GetInitializedVertexIndexMap<Adapter>::const_type CVIMap;
|
||||||
|
CVIMap cvim = CGAL::get_initialized_vertex_index_map(cfg);
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(cvim, num_vertices(cfg), vertices(cfg)));
|
||||||
|
|
||||||
|
typedef typename CGAL::GetInitializedHalfedgeIndexMap<Adapter>::const_type CHIMap;
|
||||||
|
CHIMap chim = CGAL::get_initialized_halfedge_index_map(cfg);
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(chim, num_halfedges(cfg), halfedges(cfg)));
|
||||||
|
|
||||||
|
typedef typename CGAL::GetInitializedFaceIndexMap<Adapter>::const_type CFIMap;
|
||||||
|
CFIMap cfim = CGAL::get_initialized_face_index_map(cfg);
|
||||||
|
assert(CGAL::BGL::internal::is_index_map_valid(cfim, num_faces(cfg), faces(cfg)));
|
||||||
|
}
|
||||||
|
|
||||||
template<typename Graph>
|
template<typename Graph>
|
||||||
void test_read(const Graph& g)
|
void test_read(const Graph& g)
|
||||||
{
|
{
|
||||||
|
|
@ -270,7 +325,7 @@ void test_read(const Graph& g)
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
|
|
||||||
std::map<g_face_descriptor, std::size_t> map;
|
std::map<g_face_descriptor, std::size_t> map;
|
||||||
CGAL::Polygon_mesh_processing::connected_components(g, boost::make_assoc_property_map(map), CGAL::Polygon_mesh_processing::parameters::all_default());
|
PMP::connected_components(g, boost::make_assoc_property_map(map), CGAL::parameters::all_default());
|
||||||
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
Adapter fg(g, 0, boost::make_assoc_property_map(map));
|
||||||
assert(fg.is_selection_valid());
|
assert(fg.is_selection_valid());
|
||||||
assert(CGAL::is_valid_polygon_mesh(fg));
|
assert(CGAL::is_valid_polygon_mesh(fg));
|
||||||
|
|
@ -292,6 +347,7 @@ test_graph_range(const std::vector<Graph>& graphs)
|
||||||
test_edge_iterators(p);
|
test_edge_iterators(p);
|
||||||
test_halfedge_around_face_iterator(p);
|
test_halfedge_around_face_iterator(p);
|
||||||
test_halfedge_around_vertex_iterator(p);
|
test_halfedge_around_vertex_iterator(p);
|
||||||
|
test_index_property_maps(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -356,7 +412,6 @@ struct Constraint : public boost::put_get_helper<bool,Constraint<Mesh, VertexPoi
|
||||||
template<class Mesh, class FCCMAP, class Adapter>
|
template<class Mesh, class FCCMAP, class Adapter>
|
||||||
void test_mesh(Adapter fga)
|
void test_mesh(Adapter fga)
|
||||||
{
|
{
|
||||||
|
|
||||||
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
CGAL_GRAPH_TRAITS_MEMBERS(Adapter);
|
||||||
//check that there is the right number of simplices in fga
|
//check that there is the right number of simplices in fga
|
||||||
CGAL_assertion(CGAL::is_valid_polygon_mesh(fga));
|
CGAL_assertion(CGAL::is_valid_polygon_mesh(fga));
|
||||||
|
|
@ -365,31 +420,23 @@ void test_mesh(Adapter fga)
|
||||||
CGAL_assertion(num_halfedges(fga) == 10);
|
CGAL_assertion(num_halfedges(fga) == 10);
|
||||||
CGAL_assertion(num_vertices(fga) == 4);
|
CGAL_assertion(num_vertices(fga) == 4);
|
||||||
halfedge_descriptor h = halfedge(*faces(fga).first, fga);
|
halfedge_descriptor h = halfedge(*faces(fga).first, fga);
|
||||||
CGAL_assertion_code( vertex_descriptor v = source(h, fga) );
|
CGAL_assertion_code( vertex_descriptor v = source(h, fga));
|
||||||
//check that next() works inside the patch
|
//check that next() works inside the patch
|
||||||
CGAL_assertion(
|
CGAL_assertion(next(next(next(h, fga), fga), fga) == h);
|
||||||
next(next(next(h, fga), fga), fga) == h
|
|
||||||
);
|
|
||||||
//check that next() works on bordure of the patch
|
//check that next() works on bordure of the patch
|
||||||
h = opposite(h, fga);
|
h = opposite(h, fga);
|
||||||
CGAL_assertion(
|
CGAL_assertion(next(next(next(next(h, fga), fga), fga), fga) == h);
|
||||||
next(next(next(next(h, fga), fga), fga), fga) == h
|
|
||||||
);
|
|
||||||
//check that prev() works inside the patch
|
//check that prev() works inside the patch
|
||||||
h = halfedge(*faces(fga).first, fga);
|
h = halfedge(*faces(fga).first, fga);
|
||||||
CGAL_assertion(
|
CGAL_assertion(prev(prev(prev(h, fga), fga), fga) == h);
|
||||||
prev(prev(prev(h, fga), fga), fga) == h
|
|
||||||
);
|
|
||||||
//check that prev() works on bordure of the patch
|
//check that prev() works on bordure of the patch
|
||||||
h = opposite(h, fga);
|
h = opposite(h, fga);
|
||||||
CGAL_assertion(
|
CGAL_assertion(prev(prev(prev(prev(h, fga), fga), fga), fga) == h);
|
||||||
prev(prev(prev(prev(h, fga), fga), fga), fga) == h
|
|
||||||
);
|
|
||||||
//check degree
|
//check degree
|
||||||
CGAL_assertion(degree(v, fga) == 3);
|
CGAL_assertion(degree(v, fga) == 3);
|
||||||
//check in_edges and out_edges
|
//check in_edges and out_edges
|
||||||
CGAL_assertion(std::distance(in_edges(v, fga).first ,in_edges(v, fga).second) == 3 );
|
CGAL_assertion(std::distance(in_edges(v, fga).first ,in_edges(v, fga).second) == 3);
|
||||||
CGAL_assertion(std::distance(out_edges(v, fga).first ,out_edges(v, fga).second) == 3 );
|
CGAL_assertion(std::distance(out_edges(v, fga).first ,out_edges(v, fga).second) == 3);
|
||||||
|
|
||||||
Mesh copy;
|
Mesh copy;
|
||||||
CGAL::copy_face_graph(fga, copy);
|
CGAL::copy_face_graph(fga, copy);
|
||||||
|
|
@ -454,7 +501,7 @@ int main()
|
||||||
{
|
{
|
||||||
test_graph_range(poly_data());
|
test_graph_range(poly_data());
|
||||||
|
|
||||||
#if defined(CGAL_USE_SURFACE_MESH)
|
#ifdef CGAL_USE_SURFACE_MESH
|
||||||
test_graph_range(sm_data());
|
test_graph_range(sm_data());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -464,64 +511,47 @@ int main()
|
||||||
|
|
||||||
test_invalid_selections();
|
test_invalid_selections();
|
||||||
|
|
||||||
//Make a tetrahedron and test the adapter for a patch that only contains 2 faces
|
// Make a tetrahedron and test the adapter for a patch that only contains 2 faces
|
||||||
typedef CGAL::Face_filtered_graph<SM> SM_Adapter;
|
typedef CGAL::Face_filtered_graph<SM> SM_Adapter;
|
||||||
typedef SM::Property_map<boost::graph_traits<SM>::face_descriptor , std::size_t> SM_FCCMap;
|
typedef SM::Property_map<boost::graph_traits<SM>::face_descriptor , std::size_t> SM_FCCMap;
|
||||||
auto sm = std::make_unique<SM>();
|
auto sm = std::make_unique<SM>();
|
||||||
CGAL::make_tetrahedron(
|
CGAL::make_tetrahedron(Point_3(1,1,1), Point_3(0,0,0), Point_3(0,0,1), Point_3(1,0,1), *sm);
|
||||||
Point_3(1,1,1),
|
|
||||||
Point_3(0,0,0),
|
SM_FCCMap fccmap = sm->add_property_map<boost::graph_traits<SM>::face_descriptor, std::size_t>("f:CC").first;
|
||||||
Point_3(0,0,1),
|
SM::Property_map<boost::graph_traits<SM>::vertex_descriptor, SM::Point> positions = sm->points();
|
||||||
Point_3(1,0,1),
|
CGAL::Polygon_mesh_processing::connected_components(
|
||||||
*sm);
|
*sm, fccmap, CGAL::parameters::edge_is_constrained_map(Constraint<SM, SM::Property_map<boost::graph_traits<SM>::vertex_descriptor,
|
||||||
SM_FCCMap fccmap =
|
SM::Point> >(*sm, positions)));
|
||||||
sm->add_property_map<boost::graph_traits<SM>::face_descriptor, std::size_t>("f:CC").first;
|
|
||||||
SM::Property_map<boost::graph_traits<SM>::vertex_descriptor, SM::Point> positions =
|
|
||||||
sm->points();
|
|
||||||
CGAL::Polygon_mesh_processing::connected_components(*sm, fccmap, CGAL::Polygon_mesh_processing::parameters::
|
|
||||||
edge_is_constrained_map(Constraint<SM, SM::Property_map<boost::graph_traits<SM>::vertex_descriptor,
|
|
||||||
SM::Point> >(*sm, positions)));
|
|
||||||
boost::unordered_set<long unsigned int> pids;
|
boost::unordered_set<long unsigned int> pids;
|
||||||
pids.insert(0);
|
pids.insert(0);
|
||||||
pids.insert(2);
|
pids.insert(2);
|
||||||
SM_Adapter sm_adapter(*sm, pids, fccmap);
|
SM_Adapter sm_adapter(*sm, pids, fccmap);
|
||||||
test_mesh<SM,SM_FCCMap, SM_Adapter>(sm_adapter);
|
test_mesh<SM,SM_FCCMap, SM_Adapter>(sm_adapter);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef boost::graph_traits<Polyhedron> PolyTraits;
|
typedef boost::graph_traits<Polyhedron> PolyTraits;
|
||||||
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::const_type VPMap;
|
typedef boost::property_map<Polyhedron, boost::vertex_point_t>::const_type VPMap;
|
||||||
typedef PolyTraits::face_descriptor poly_face_descriptor;
|
typedef PolyTraits::face_descriptor poly_face_descriptor;
|
||||||
typedef boost::associative_property_map< std::map<poly_face_descriptor,
|
typedef boost::associative_property_map<std::map<poly_face_descriptor, PolyTraits::faces_size_type> > FCMap;
|
||||||
PolyTraits::faces_size_type> > FCMap;
|
|
||||||
typedef boost::property_map<Polyhedron, CGAL::face_external_index_t>::const_type FIMap;
|
typedef boost::property_map<Polyhedron, CGAL::face_external_index_t>::const_type FIMap;
|
||||||
typedef boost::property_map<Polyhedron, CGAL::vertex_external_index_t>::const_type VIMap;
|
typedef boost::property_map<Polyhedron, CGAL::vertex_external_index_t>::const_type VIMap;
|
||||||
typedef boost::property_map<Polyhedron, CGAL::halfedge_external_index_t>::const_type HIMap;
|
typedef boost::property_map<Polyhedron, CGAL::halfedge_external_index_t>::const_type HIMap;
|
||||||
typedef CGAL::Face_filtered_graph<Polyhedron, FIMap, VIMap, HIMap> Poly_Adapter;
|
typedef CGAL::Face_filtered_graph<Polyhedron, FIMap, VIMap, HIMap> Poly_Adapter;
|
||||||
auto poly = std::make_unique<Polyhedron>();
|
|
||||||
CGAL::make_tetrahedron(
|
|
||||||
Point_3(1,1,1),
|
|
||||||
Point_3(0,0,0),
|
|
||||||
Point_3(0,0,1),
|
|
||||||
Point_3(1,0,1),
|
|
||||||
*poly);
|
|
||||||
|
|
||||||
|
auto poly = std::make_unique<Polyhedron>();
|
||||||
|
CGAL::make_tetrahedron(Point_3(1,1,1), Point_3(0,0,0), Point_3(0,0,1), Point_3(1,0,1), *poly);
|
||||||
|
|
||||||
FIMap poly_fimap = get(CGAL::face_external_index, *poly);
|
FIMap poly_fimap = get(CGAL::face_external_index, *poly);
|
||||||
VIMap poly_vimap = get(CGAL::vertex_external_index, *poly);
|
VIMap poly_vimap = get(CGAL::vertex_external_index, *poly);
|
||||||
HIMap poly_himap = get(CGAL::halfedge_external_index, *poly);
|
HIMap poly_himap = get(CGAL::halfedge_external_index, *poly);
|
||||||
std::map<poly_face_descriptor,
|
std::map<poly_face_descriptor, PolyTraits::faces_size_type> fc_map;
|
||||||
PolyTraits::faces_size_type> fc_map;
|
|
||||||
FCMap poly_fccmap(fc_map);
|
FCMap poly_fccmap(fc_map);
|
||||||
|
|
||||||
VPMap vpmap = get(boost::vertex_point, *poly);
|
VPMap vpmap = get(boost::vertex_point, *poly);
|
||||||
CGAL::Polygon_mesh_processing::connected_components(*poly, poly_fccmap,
|
PMP::connected_components(*poly, poly_fccmap,
|
||||||
CGAL::Polygon_mesh_processing::parameters::edge_is_constrained_map(Constraint<Polyhedron, VPMap >(*poly, vpmap))
|
CGAL::parameters::edge_is_constrained_map(Constraint<Polyhedron, VPMap >(*poly, vpmap))
|
||||||
.face_index_map(poly_fimap));
|
.face_index_map(poly_fimap));
|
||||||
Poly_Adapter poly_adapter(*poly,
|
Poly_Adapter poly_adapter(*poly, pids, poly_fccmap,
|
||||||
pids,
|
|
||||||
poly_fccmap,
|
|
||||||
CGAL::parameters::face_index_map(poly_fimap)
|
CGAL::parameters::face_index_map(poly_fimap)
|
||||||
.vertex_index_map(poly_vimap)
|
.vertex_index_map(poly_vimap)
|
||||||
.halfedge_index_map(poly_himap));
|
.halfedge_index_map(poly_himap));
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ void test(const NamedParameters& np)
|
||||||
assert(get_parameter(np, CGAL::internal_np::non_manifold_feature_map).v == 60);
|
assert(get_parameter(np, CGAL::internal_np::non_manifold_feature_map).v == 60);
|
||||||
assert(get_parameter(np, CGAL::internal_np::filter).v == 61);
|
assert(get_parameter(np, CGAL::internal_np::filter).v == 61);
|
||||||
assert(get_parameter(np, CGAL::internal_np::face_epsilon_map).v == 62);
|
assert(get_parameter(np, CGAL::internal_np::face_epsilon_map).v == 62);
|
||||||
|
assert(get_parameter(np, CGAL::internal_np::maximum_number).v == 68);
|
||||||
|
|
||||||
// Named parameters that we use in the package 'Surface Mesh Simplification'
|
// Named parameters that we use in the package 'Surface Mesh Simplification'
|
||||||
assert(get_parameter(np, CGAL::internal_np::get_cost_policy).v == 34);
|
assert(get_parameter(np, CGAL::internal_np::get_cost_policy).v == 34);
|
||||||
|
|
@ -227,6 +228,7 @@ void test(const NamedParameters& np)
|
||||||
check_same_type<60>(get_parameter(np, CGAL::internal_np::non_manifold_feature_map));
|
check_same_type<60>(get_parameter(np, CGAL::internal_np::non_manifold_feature_map));
|
||||||
check_same_type<61>(get_parameter(np, CGAL::internal_np::filter));
|
check_same_type<61>(get_parameter(np, CGAL::internal_np::filter));
|
||||||
check_same_type<62>(get_parameter(np, CGAL::internal_np::face_epsilon_map));
|
check_same_type<62>(get_parameter(np, CGAL::internal_np::face_epsilon_map));
|
||||||
|
check_same_type<68>(get_parameter(np, CGAL::internal_np::maximum_number));
|
||||||
|
|
||||||
// Named parameters that we use in the package 'Surface Mesh Simplification'
|
// Named parameters that we use in the package 'Surface Mesh Simplification'
|
||||||
check_same_type<34>(get_parameter(np, CGAL::internal_np::get_cost_policy));
|
check_same_type<34>(get_parameter(np, CGAL::internal_np::get_cost_policy));
|
||||||
|
|
@ -356,6 +358,7 @@ int main()
|
||||||
.non_manifold_feature_map(A<60>(60))
|
.non_manifold_feature_map(A<60>(60))
|
||||||
.filter(A<61>(61))
|
.filter(A<61>(61))
|
||||||
.face_epsilon_map(A<62>(62))
|
.face_epsilon_map(A<62>(62))
|
||||||
|
.maximum_number(A<68>(68))
|
||||||
.apply_per_connected_component(A<46>(46))
|
.apply_per_connected_component(A<46>(46))
|
||||||
.output_iterator(A<47>(47))
|
.output_iterator(A<47>(47))
|
||||||
.erase_all_duplicates(A<48>(48))
|
.erase_all_duplicates(A<48>(48))
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ typedef std::vector<Point_2> Polyline_2;
|
||||||
// inserts a polyline into a graph
|
// inserts a polyline into a graph
|
||||||
void insert(const std::vector<Point_2>& poly, Graph& graph, Point_vertex_map& pvmap)
|
void insert(const std::vector<Point_2>& poly, Graph& graph, Point_vertex_map& pvmap)
|
||||||
{
|
{
|
||||||
vertex_descriptor u, v;
|
vertex_descriptor u = boost::graph_traits<Graph>::null_vertex();
|
||||||
|
vertex_descriptor v;
|
||||||
for (std::size_t i = 0; i < poly.size(); i++) {
|
for (std::size_t i = 0; i < poly.size(); i++) {
|
||||||
// check if the point is not yet in the graph
|
// check if the point is not yet in the graph
|
||||||
if (pvmap.find(poly[i]) == pvmap.end()) {
|
if (pvmap.find(poly[i]) == pvmap.end()) {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ Orientation orientation();
|
||||||
/*!
|
/*!
|
||||||
This operator imports a general polygon from the input stream `in`.
|
This operator imports a general polygon from the input stream `in`.
|
||||||
|
|
||||||
Both ASCII and binary formats are supported, and the format is automatically detected.
|
Both \ascii and binary formats are supported, and the format is automatically detected.
|
||||||
|
|
||||||
The format consists of the number of points of the outer boundary followed
|
The format consists of the number of points of the outer boundary followed
|
||||||
by the points themselves in counterclockwise order, followed by the number of holes,
|
by the points themselves in counterclockwise order, followed by the number of holes,
|
||||||
|
|
@ -100,11 +100,11 @@ std::istream& operator>>(std::istream& in, CGAL::General_polygon_2<ArrTraits>& P
|
||||||
/*!
|
/*!
|
||||||
This operator exports a general polygon to the output stream `out`.
|
This operator exports a general polygon to the output stream `out`.
|
||||||
|
|
||||||
An ASCII and a binary format exist. The format can be selected with
|
An \ascii and a binary format exist. The format can be selected with
|
||||||
the \cgal modifiers for streams, `set_ascii_mode` and `set_binary_mode`
|
the \cgal modifiers for streams, `set_ascii_mode` and `set_binary_mode`
|
||||||
respectively. The modifier `set_pretty_mode` can be used to allow for (a
|
respectively. The modifier `set_pretty_mode` can be used to allow for (a
|
||||||
few) structuring comments in the output. Otherwise, the output would
|
few) structuring comments in the output. Otherwise, the output would
|
||||||
be free of comments. The default for writing is ASCII without
|
be free of comments. The default for writing is \ascii without
|
||||||
comments.
|
comments.
|
||||||
|
|
||||||
The number of curves of the outer boundary is exported followed by the
|
The number of curves of the outer boundary is exported followed by the
|
||||||
|
|
|
||||||
|
|
@ -474,10 +474,9 @@ is_crossover_outer_boundary(const typename Traits_2::Polygon_with_holes_2& pgn,
|
||||||
return is_crossover_outer_boundary(pgn, traits, pl);
|
return is_crossover_outer_boundary(pgn, traits, pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// previously known as Simple
|
|
||||||
template <typename Traits_2>
|
template <typename Traits_2>
|
||||||
bool is_relatively_simple_polygon_with_holes
|
bool is_relatively_simple_polygon
|
||||||
(const typename Traits_2::Polygon_with_holes_2& pgn, const Traits_2& traits)
|
(const typename Traits_2::Polygon_2& pgn, const Traits_2& traits)
|
||||||
{
|
{
|
||||||
typedef typename Traits_2::Curve_const_iterator Curve_const_iterator;
|
typedef typename Traits_2::Curve_const_iterator Curve_const_iterator;
|
||||||
typedef std::pair<Curve_const_iterator,Curve_const_iterator>
|
typedef std::pair<Curve_const_iterator,Curve_const_iterator>
|
||||||
|
|
@ -487,11 +486,10 @@ bool is_relatively_simple_polygon_with_holes
|
||||||
typedef typename Traits_2::X_monotone_curve_2 X_monotone_curve_2;
|
typedef typename Traits_2::X_monotone_curve_2 X_monotone_curve_2;
|
||||||
typedef Gps_polygon_validation_visitor<Traits_2> Visitor;
|
typedef Gps_polygon_validation_visitor<Traits_2> Visitor;
|
||||||
typedef Ss2::Surface_sweep_2<Visitor> Surface_sweep;
|
typedef Ss2::Surface_sweep_2<Visitor> Surface_sweep;
|
||||||
typedef typename Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
|
|
||||||
|
|
||||||
Construct_curves_2 construct_curves_func = traits.construct_curves_2_object();
|
Construct_curves_2 construct_curves_func = traits.construct_curves_2_object();
|
||||||
// Construct a container of all outer boundary curves.
|
// Construct a container of all outer boundary curves.
|
||||||
Cci_pair itr_pair = construct_curves_func (pgn.outer_boundary());
|
Cci_pair itr_pair = construct_curves_func (pgn);
|
||||||
std::list<X_monotone_curve_2> outer_curves;
|
std::list<X_monotone_curve_2> outer_curves;
|
||||||
std::copy(itr_pair.first, itr_pair.second, std::back_inserter(outer_curves));
|
std::copy(itr_pair.first, itr_pair.second, std::back_inserter(outer_curves));
|
||||||
// Create visitor and sweep to verify outer boundary is relatively simple
|
// Create visitor and sweep to verify outer boundary is relatively simple
|
||||||
|
|
@ -502,31 +500,51 @@ bool is_relatively_simple_polygon_with_holes
|
||||||
switch (relative_visitor.error_code()) {
|
switch (relative_visitor.error_code()) {
|
||||||
case Visitor::ERROR_NONE: break;
|
case Visitor::ERROR_NONE: break;
|
||||||
case Visitor::ERROR_EDGE_INTERSECTION:
|
case Visitor::ERROR_EDGE_INTERSECTION:
|
||||||
CGAL_warning_msg(false, "The outer boundary self intersects at edges.");
|
CGAL_warning_msg(false, "Polygon self intersects at edges.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Visitor::ERROR_EDGE_VERTEX_INTERSECTION:
|
case Visitor::ERROR_EDGE_VERTEX_INTERSECTION:
|
||||||
CGAL_warning_msg(false, "The outer boundary self (weakly) intersects.");
|
CGAL_warning_msg(false, "Polygon self (weakly) intersects.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Visitor::ERROR_EDGE_OVERLAP:
|
case Visitor::ERROR_EDGE_OVERLAP:
|
||||||
CGAL_warning_msg(false, "The outer boundary self overlaps.");
|
CGAL_warning_msg(false, "Polygon self overlaps.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Visitor::ERROR_VERTEX_INTERSECTION:
|
case Visitor::ERROR_VERTEX_INTERSECTION:
|
||||||
CGAL_warning_msg(false, "The outer boundary self intersects at vertices.");
|
CGAL_warning_msg(false, "Polygon self intersects at vertices.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// previously known as Simple
|
||||||
|
template <typename Traits_2>
|
||||||
|
bool is_relatively_simple_polygon_with_holes
|
||||||
|
(const typename Traits_2::Polygon_with_holes_2& pgn, const Traits_2& traits)
|
||||||
|
{
|
||||||
|
bool outer_is_relatively_simple = is_relatively_simple_polygon(pgn.outer_boundary(), traits);
|
||||||
|
if (!outer_is_relatively_simple)
|
||||||
|
{
|
||||||
|
CGAL_warning_msg(false, "Outer boundary is not relatively simple.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Verify every hole is simple
|
// Verify every hole is simple
|
||||||
|
typedef typename Traits_2::X_monotone_curve_2 X_monotone_curve_2;
|
||||||
|
typedef typename Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
|
||||||
typename Polygon_with_holes_2::Hole_const_iterator hoit;
|
typename Polygon_with_holes_2::Hole_const_iterator hoit;
|
||||||
std::list<X_monotone_curve_2> hole_curves;
|
std::list<X_monotone_curve_2> hole_curves;
|
||||||
for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit) {
|
for (hoit = pgn.holes_begin(); hoit != pgn.holes_end(); ++hoit) {
|
||||||
bool simple_hole = is_simple_polygon(*hoit, traits);
|
bool relatively_simple_hole = is_relatively_simple_polygon(*hoit, traits);
|
||||||
if (!simple_hole)
|
if (!relatively_simple_hole)
|
||||||
|
{
|
||||||
|
CGAL_warning_msg(false, "A hole is not relatively simple.");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,4 @@
|
||||||
5 1
|
5 1
|
||||||
3 1
|
3 1
|
||||||
|
|
||||||
0
|
1
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ typedef Traits_2::Polygon_2 Polygon_2;
|
||||||
typedef Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
|
typedef Traits_2::Polygon_with_holes_2 Polygon_with_holes_2;
|
||||||
|
|
||||||
/* test files:
|
/* test files:
|
||||||
* 1. test1.dat---invalid polygon with holes. The hole is relatively simple
|
* 1. test1.dat---valid polygon with holes. The hole is relatively simple.
|
||||||
* instead of strictly simple.
|
|
||||||
* 2. test2.dat---invalid polygon with holes. The hole overlaps the outer
|
* 2. test2.dat---invalid polygon with holes. The hole overlaps the outer
|
||||||
* boundary (the intersection results in a polygon).
|
* boundary (the intersection results in a polygon).
|
||||||
* 3. test3.dat---invalid polygon with holes. Two holes intersect (the
|
* 3. test3.dat---invalid polygon with holes. Two holes intersect (the
|
||||||
|
|
|
||||||
|
|
@ -847,7 +847,7 @@ operator >> ( std::istream& is, CGAL::Min_annulus_d<Traits_>& min_annulus)
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
cerr << "Stream must be in ascii or binary mode" << endl;
|
cerr << "Stream must be in ASCII or binary mode" << endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -309,7 +309,7 @@ operator >> ( std::istream& is,
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ operator >> ( std::istream& is,
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ operator >> ( std::istream& is, CGAL::Min_circle_2<Traits_>& min_circle)
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
cerr << "Stream must be in ascii or binary mode" << endl;
|
cerr << "Stream must be in ASCII or binary mode" << endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ operator >> ( std::istream& is, CGAL::Optimisation_circle_2<K_>& c)
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII: {
|
case CGAL::IO::ASCII: {
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ operator >> ( std::istream& is,
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -386,7 +386,7 @@ operator >> ( std::istream& is,
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ operator >> ( std::istream& is, CGAL::Min_ellipse_2<Traits_>& min_ellipse)
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
cerr << "Stream must be in ascii or binary mode" << endl;
|
cerr << "Stream must be in ASCII or binary mode" << endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ operator >> ( std::istream& is, CGAL::Optimisation_ellipse_2<K_>& e)
|
||||||
|
|
||||||
case CGAL::IO::PRETTY:
|
case CGAL::IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CGAL::IO::ASCII:
|
case CGAL::IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ operator >> ( std::istream& is, Min_sphere_d<Traits>& min_sphere)
|
||||||
|
|
||||||
case IO::PRETTY:
|
case IO::PRETTY:
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
std::cerr << "Stream must be in ASCII or binary mode" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IO::ASCII:
|
case IO::ASCII:
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ typedef enum {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/** data are binary */
|
/** data are binary */
|
||||||
DM_BINARY,
|
DM_BINARY,
|
||||||
/** data are ascii */
|
/** data are \ascii */
|
||||||
DM_ASCII
|
DM_ASCII
|
||||||
} DATA_MODE;
|
} DATA_MODE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ exemple :
|
||||||
-a age (entier)
|
-a age (entier)
|
||||||
-s sexe (1/2)
|
-s sexe (1/2)
|
||||||
-l lateralite
|
-l lateralite
|
||||||
-txt texte libre (ascii)
|
-txt texte libre (ASCII)
|
||||||
-endtxt (fin du texte)
|
-endtxt (fin du texte)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -109,19 +109,19 @@ int writeGis( char *name, _image* im) {
|
||||||
|
|
||||||
switch( im->wordKind ) {
|
switch( im->wordKind ) {
|
||||||
default :
|
default :
|
||||||
fprintf(stderr, "writeGis: such word kind not handled in ascii mode for file \'%s\'\n", outputName);
|
fprintf(stderr, "writeGis: such word kind not handled in ASCII mode for file \'%s\'\n", outputName);
|
||||||
if ( outputName != nullptr ) ImageIO_free( outputName );
|
if ( outputName != nullptr ) ImageIO_free( outputName );
|
||||||
return( -3 );
|
return( -3 );
|
||||||
case WK_FIXED :
|
case WK_FIXED :
|
||||||
switch ( im->wdim ) {
|
switch ( im->wdim ) {
|
||||||
default :
|
default :
|
||||||
fprintf(stderr, "writeGis: such word dim not handled in ascii mode for file \'%s\'\n", outputName);
|
fprintf(stderr, "writeGis: such word dim not handled in ASCII mode for file \'%s\'\n", outputName);
|
||||||
if ( outputName != nullptr ) ImageIO_free( outputName );
|
if ( outputName != nullptr ) ImageIO_free( outputName );
|
||||||
return( -3 );
|
return( -3 );
|
||||||
case 1 :
|
case 1 :
|
||||||
switch ( im->sign ) {
|
switch ( im->sign ) {
|
||||||
default :
|
default :
|
||||||
fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
|
fprintf(stderr, "writeGis: such sign not handled in ASCII mode for file \'%s\'\n", outputName);
|
||||||
if ( outputName != nullptr ) ImageIO_free( outputName );
|
if ( outputName != nullptr ) ImageIO_free( outputName );
|
||||||
return( -3 );
|
return( -3 );
|
||||||
case SGN_UNSIGNED :
|
case SGN_UNSIGNED :
|
||||||
|
|
@ -169,7 +169,7 @@ int writeGis( char *name, _image* im) {
|
||||||
case 2 :
|
case 2 :
|
||||||
switch ( im->sign ) {
|
switch ( im->sign ) {
|
||||||
default :
|
default :
|
||||||
fprintf(stderr, "writeGis: such sign not handled in ascii mode for file \'%s\'\n", outputName);
|
fprintf(stderr, "writeGis: such sign not handled in ASCII mode for file \'%s\'\n", outputName);
|
||||||
if ( outputName != nullptr ) ImageIO_free( outputName );
|
if ( outputName != nullptr ) ImageIO_free( outputName );
|
||||||
return( -3 );
|
return( -3 );
|
||||||
case SGN_UNSIGNED :
|
case SGN_UNSIGNED :
|
||||||
|
|
@ -502,7 +502,7 @@ int readGisHeader( const char* name,_image* im)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* read data if ascii
|
/* read data if ASCII
|
||||||
only U8 and S8
|
only U8 and S8
|
||||||
*/
|
*/
|
||||||
if ( im->dataMode == DM_ASCII ) {
|
if ( im->dataMode == DM_ASCII ) {
|
||||||
|
|
@ -512,7 +512,7 @@ int readGisHeader( const char* name,_image* im)
|
||||||
int ret, iv=0;
|
int ret, iv=0;
|
||||||
|
|
||||||
if ( im->wdim != 1 || im->wordKind != WK_FIXED ) {
|
if ( im->wdim != 1 || im->wordKind != WK_FIXED ) {
|
||||||
fprintf(stderr, "readGisHeader: error: unable to read such ascii type\n" );
|
fprintf(stderr, "readGisHeader: error: unable to read such ASCII type\n" );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -550,7 +550,7 @@ int readGisHeader( const char* name,_image* im)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ret != 1 ) {
|
if ( ret != 1 ) {
|
||||||
fprintf( stderr, "readGisHeader: error in reading ascii data\n" );
|
fprintf( stderr, "readGisHeader: error in reading ASCII data\n" );
|
||||||
ImageIO_free( im->data ); im->data = nullptr;
|
ImageIO_free( im->data ); im->data = nullptr;
|
||||||
ImageIO_free( str );
|
ImageIO_free( str );
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ int readPgmAsciiImage(const char *name,_image *im)
|
||||||
switch ( im->wordKind ) {
|
switch ( im->wordKind ) {
|
||||||
case WK_FIXED :
|
case WK_FIXED :
|
||||||
if ( sscanf( tmp, "%d", &iv ) != 1 ) {
|
if ( sscanf( tmp, "%d", &iv ) != 1 ) {
|
||||||
fprintf( stderr, "readAsciiPgmImage: error in reading ascii data\n" );
|
fprintf( stderr, "readAsciiPgmImage: error in reading ASCII data\n" );
|
||||||
ImageIO_free( im->data ); im->data = nullptr;
|
ImageIO_free( im->data ); im->data = nullptr;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ struct VTK_type_generator<boost::uint32_t> {
|
||||||
typedef vtkUnsignedIntArray ArrayType;
|
typedef vtkUnsignedIntArray ArrayType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline
|
||||||
::vtkImageData* vtk_image_sharing_same_data_pointer(Image_3& image)
|
::vtkImageData* vtk_image_sharing_same_data_pointer(Image_3& image)
|
||||||
{
|
{
|
||||||
vtkImageData* vtk_image = vtkImageData::New();
|
vtkImageData* vtk_image = vtkImageData::New();
|
||||||
|
|
|
||||||
|
|
@ -606,6 +606,7 @@ namespace CartesianKernelFunctors {
|
||||||
template <typename K>
|
template <typename K>
|
||||||
class Compare_slope_2
|
class Compare_slope_2
|
||||||
{
|
{
|
||||||
|
typedef typename K::Point_2 Point_2;
|
||||||
typedef typename K::Line_2 Line_2;
|
typedef typename K::Line_2 Line_2;
|
||||||
typedef typename K::Segment_2 Segment_2;
|
typedef typename K::Segment_2 Segment_2;
|
||||||
public:
|
public:
|
||||||
|
|
@ -625,6 +626,15 @@ namespace CartesianKernelFunctors {
|
||||||
s2.source().x(), s2.source().y(),
|
s2.source().x(), s2.source().y(),
|
||||||
s2.target().x(), s2.target().y());
|
s2.target().x(), s2.target().y());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result_type
|
||||||
|
operator()(const Point_2& s1s, const Point_2& s1t, const Point_2& s2s, const Point_2& s2t) const
|
||||||
|
{
|
||||||
|
return compare_slopesC2(s1s.x(), s1s.y(),
|
||||||
|
s1t.x(), s1t.y(),
|
||||||
|
s2s.x(), s2s.y(),
|
||||||
|
s2t.x(), s2t.y());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
|
|
@ -2741,6 +2751,7 @@ namespace CartesianKernelFunctors {
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_2 Point_2;
|
typedef typename K::Point_2 Point_2;
|
||||||
|
typedef typename K::Segment_2 Segment_2;
|
||||||
public:
|
public:
|
||||||
typedef Point_2 result_type;
|
typedef Point_2 result_type;
|
||||||
|
|
||||||
|
|
@ -2752,6 +2763,17 @@ namespace CartesianKernelFunctors {
|
||||||
midpointC2(p.x(), p.y(), q.x(), q.y(), x, y);
|
midpointC2(p.x(), p.y(), q.x(), q.y(), x, y);
|
||||||
return construct_point_2(x, y);
|
return construct_point_2(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Point_2
|
||||||
|
operator()(const Segment_2& s) const
|
||||||
|
{
|
||||||
|
typename K::Construct_point_2 construct_point_2;
|
||||||
|
FT x, y;
|
||||||
|
const Point_2& p = s.source();
|
||||||
|
const Point_2& q = s.target();
|
||||||
|
midpointC2(p.x(), p.y(), q.x(), q.y(), x, y);
|
||||||
|
return construct_point_2(x, y);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
|
|
@ -2759,6 +2781,7 @@ namespace CartesianKernelFunctors {
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
|
typedef typename K::Segment_3 Segment_3;
|
||||||
public:
|
public:
|
||||||
typedef Point_3 result_type;
|
typedef Point_3 result_type;
|
||||||
|
|
||||||
|
|
@ -2770,6 +2793,17 @@ namespace CartesianKernelFunctors {
|
||||||
midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z);
|
midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z);
|
||||||
return construct_point_3(x, y, z);
|
return construct_point_3(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Point_3
|
||||||
|
operator()(const Segment_3& s) const
|
||||||
|
{
|
||||||
|
const Point_3& p = s.source();
|
||||||
|
const Point_3& q = s.target();
|
||||||
|
typename K::Construct_point_3 construct_point_3;
|
||||||
|
FT x, y, z;
|
||||||
|
midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z);
|
||||||
|
return construct_point_3(x, y, z);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename K>
|
template <typename K>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
#define CGAL_CAST_INT
|
#define CGAL_CAST_INT
|
||||||
|
|
||||||
#define CIRCULAR_KERNEL_2
|
#define CIRCULAR_KERNEL_2
|
||||||
#define LAZY_CURVED_KERNEL_2
|
|
||||||
//#define CIRCULAR_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
//#define LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
// #define CIRCULAR_KERNEL_2_FILTERED_BBOX
|
// #define CIRCULAR_KERNEL_2_FILTERED_BBOX
|
||||||
//#define LAZY_CURVED_KERNEL_2_FILTERED_BBOX
|
|
||||||
|
|
||||||
#define CGAL_CAST_INT
|
#define CGAL_CAST_INT
|
||||||
#include <CGAL/Cartesian.h>
|
#include <CGAL/Cartesian.h>
|
||||||
|
|
@ -22,9 +18,7 @@
|
||||||
#include <CGAL/Circular_arc_traits.h>
|
#include <CGAL/Circular_arc_traits.h>
|
||||||
#include <CGAL/Circular_arc_traits_tracer.h>
|
#include <CGAL/Circular_arc_traits_tracer.h>
|
||||||
|
|
||||||
#include <CGAL/Lazy_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||||
|
|
||||||
|
|
@ -88,80 +82,7 @@ for(i=1;i<6;i++){
|
||||||
//bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
//bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef LAZY_CURVED_KERNEL_2
|
|
||||||
// typedef CGAL::Quotient<CGAL::MP_Float> NT2;
|
|
||||||
typedef CGAL::Gmpq NT2;
|
|
||||||
typedef CGAL::Cartesian<NT2> Linear_k2;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
|
|
||||||
typedef CGAL::Circular_kernel_2 <Linear_k2, Algebraic_k2> CK2_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Interval_nt_advanced NT3;
|
|
||||||
typedef CGAL::Cartesian<NT3> Linear_k3;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT3> Algebraic_k3;
|
|
||||||
typedef CGAL::Circular_kernel_2 <Linear_k3,Algebraic_k3> CK3_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Lazy_circular_kernel_2<CK2_,CK3_> LazyCurvedK;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
|
|
||||||
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
|
|
||||||
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
|
|
||||||
typedef std::vector<LazyVarArc> LazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("LazyK. VarTraits");
|
|
||||||
|
|
||||||
bench.ComputeArrayDxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(dxffilenames);
|
|
||||||
//bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
|
|
||||||
typedef CGAL::Filtered_hexagon_circular_kernel_2<CircularKernel> CircularKernelHexagon;
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4;
|
|
||||||
typedef CircularKernelHexagon::Line_arc_2 Line_arc_4;
|
|
||||||
typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc;
|
|
||||||
typedef std::vector<CircularKernHexVarArc> CircularKernHexVarArcContainer;
|
|
||||||
typedef CGAL::Variant_traits<CircularKernelHexagon,Circular_arc_4,Line_arc_4> CircularKernHex_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("CK Hex VarTraits");
|
|
||||||
|
|
||||||
// bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
|
|
||||||
typedef CGAL::Filtered_hexagon_curved_kernel<LazyCurvedK> LazyKernelHexagon;
|
|
||||||
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
|
|
||||||
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
|
|
||||||
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
|
|
||||||
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<LazyKernelHexagon,Line_arc_5,Circular_arc_5> HxLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("LazyK Hex VarTraits") ;
|
|
||||||
|
|
||||||
//bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------------------------------------------------------
|
||||||
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
@ -182,58 +103,7 @@ bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>()
|
||||||
// bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
|
// bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX
|
|
||||||
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<LazyCurvedK> BBLazyCurvedK;
|
|
||||||
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
|
|
||||||
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
|
|
||||||
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
|
|
||||||
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBLazyCurvedK,Line_arc_7,Circular_arc_7> BBLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("LLazyK BBox VarTraits") ;
|
|
||||||
|
|
||||||
bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
|
|
||||||
//bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
|
|
||||||
#endif
|
|
||||||
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
|
|
||||||
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
|
|
||||||
bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
|
|
||||||
|
|
||||||
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
|
|
||||||
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
|
|
||||||
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
|
|
||||||
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ;
|
|
||||||
|
|
||||||
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
dxffilenames.erase(dxffilenames.begin(),dxffilenames.end());
|
dxffilenames.erase(dxffilenames.begin(),dxffilenames.end());
|
||||||
if (i<5){
|
if (i<5){
|
||||||
for(int n = 3*(i+1)-3; n < 3*(i+1); n++){
|
for(int n = 3*(i+1)-3; n < 3*(i+1); n++){
|
||||||
|
|
@ -245,5 +115,3 @@ for(int n = 3*(i+1)-3; n < 3*(i+1); n++){
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,9 @@ The usage is:
|
||||||
|
|
||||||
where alpha:
|
where alpha:
|
||||||
1: means to bench the BBox(CK) with Vartraits
|
1: means to bench the BBox(CK) with Vartraits
|
||||||
2: means to bench the Lazy(CK) with Vartraits
|
|
||||||
3: means to bench the CK with Vartraits
|
3: means to bench the CK with Vartraits
|
||||||
4: means to bench the Bbox(Lazy(CK)) with Vartraits
|
|
||||||
5: means to bench the BBox(CK) with Circulartraits
|
5: means to bench the BBox(CK) with Circulartraits
|
||||||
6: means to bench the Lazy(CK) with Circulartraits
|
|
||||||
7: means to bench the CK(CK) with Circulartraits
|
7: means to bench the CK(CK) with Circulartraits
|
||||||
8: means to bench the Bbox(Lazy(CK)) Circulartraits
|
|
||||||
(le 0 est interne)
|
(le 0 est interne)
|
||||||
|
|
||||||
beta:
|
beta:
|
||||||
|
|
@ -74,5 +70,3 @@ with 5 <= a <= 8 and 0 <= b <= 8, we cannot use the Circulartraits to handle th
|
||||||
|
|
||||||
Compile with -DCGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES if you want to benchmark with
|
Compile with -DCGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES if you want to benchmark with
|
||||||
the same kernel, but with an additional map for supporting circles.
|
the same kernel, but with an additional map for supporting circles.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,6 @@
|
||||||
#include <CGAL/Circular_arc_traits.h>
|
#include <CGAL/Circular_arc_traits.h>
|
||||||
#include <CGAL/Circular_arc_traits_tracer.h>
|
#include <CGAL/Circular_arc_traits_tracer.h>
|
||||||
|
|
||||||
#include <CGAL/Lazy_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||||
|
|
||||||
#include <CGAL/Arrangement_2.h>
|
#include <CGAL/Arrangement_2.h>
|
||||||
|
|
@ -141,75 +137,13 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
fin.close();
|
fin.close();
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Place for tests!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
// typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > NT4;
|
|
||||||
// typedef CGAL::Cartesian<NT4> Linear_k4;
|
|
||||||
// typedef CGAL::Algebraic_kernel_2_2<NT4> Algebraic_k4;
|
|
||||||
// typedef CGAL::Curved_kernel<Linear_k4,Algebraic_k4> CK4;
|
|
||||||
//
|
|
||||||
// #ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
// typedef CGAL::Circular_arc_traits<CK4> CircularK_CA_Traits;
|
|
||||||
// #else
|
|
||||||
// typedef CGAL::Circular_arc_traits<CK4> Traits0;
|
|
||||||
// typedef CGAL::Circular_arc_traits_tracer<Traits0> CircularK_CA_Traits;
|
|
||||||
// #endif
|
|
||||||
//
|
|
||||||
// typedef CK4::Circular_arc_2 CircularKArc;
|
|
||||||
// typedef std::vector<CircularKArc> CircularKArcContainer;
|
|
||||||
// bench.kernel("Circular kernel Circular arc traits");
|
|
||||||
//
|
|
||||||
// typedef CircularK_CA_Traits::Curve_2 Conic_arc_2;
|
|
||||||
// typedef CGAL::Arrangement_2<CircularK_CA_Traits> Pmwx;
|
|
||||||
// typedef CGAL::Arr_naive_point_location<Pmwx> Point_location;
|
|
||||||
//
|
|
||||||
// typedef CircularK_CA_Traits::X_monotone_curve_2 X_monotone_curve_2;
|
|
||||||
// typedef CK4::Point_2 Point_2;
|
|
||||||
// typedef CK4::Circle_2 Circle_2;
|
|
||||||
// typedef CK4::Circular_arc_2 Circular_arc_2;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// CGAL::Random generatorOfgenerator;
|
|
||||||
// int random_seed = generatorOfgenerator.get_int(0, 123456);
|
|
||||||
// std::cout << "random_seed = " << random_seed << std::endl;
|
|
||||||
// CGAL::Random theRandom(random_seed);
|
|
||||||
// int random_max = 128;
|
|
||||||
// int random_min = -128;
|
|
||||||
// CircularKArcContainer ac;
|
|
||||||
// int x;
|
|
||||||
// int y;
|
|
||||||
// int r;
|
|
||||||
// for(int i = 0; i < 20; i++){
|
|
||||||
// x = theRandom.get_int(random_min,random_max);
|
|
||||||
// y = theRandom.get_int(random_min,random_max);
|
|
||||||
// r = theRandom.get_int(1,random_max);
|
|
||||||
// ac.push_back( Circle_2( Point_2(x,y), r*r));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Pmwx _pm;
|
|
||||||
// // Point_location _pl(_pm);
|
|
||||||
// // try{
|
|
||||||
// // bench.start();
|
|
||||||
// // for (typename ArcContainer::const_iterator it=ac.begin();
|
|
||||||
// // it != ac.end(); ++it) {
|
|
||||||
// // //insert(_pm,_pl,*it);
|
|
||||||
// // insert(_pm,*it,_pl);
|
|
||||||
// // };
|
|
||||||
// // bench.stop();
|
|
||||||
// // bench.summarize(_pm.number_of_vertices(),_pm.number_of_halfedges());
|
|
||||||
// // }
|
|
||||||
// // catch (...) {
|
|
||||||
// // bench.fail();
|
|
||||||
// // }
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------------------------------------------------------
|
||||||
!!!!!!!!!!!Circular_Kernel!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!Circular_Kernel!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
-------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
typedef CGAL::Quotient<CGAL::MP_Float> NT1;
|
typedef CGAL::Quotient<CGAL::MP_Float> NT1;
|
||||||
//typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > NT1;
|
|
||||||
typedef CGAL::Cartesian<NT1> Linear_k1;
|
typedef CGAL::Cartesian<NT1> Linear_k1;
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT1> Algebraic_k1;
|
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT1> Algebraic_k1;
|
||||||
typedef CGAL::Circular_kernel_2<Linear_k1, Algebraic_k1> CircularKernel;
|
typedef CGAL::Circular_kernel_2<Linear_k1, Algebraic_k1> CircularKernel;
|
||||||
|
|
@ -240,208 +174,6 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i]);
|
||||||
bench.Compute<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
bench.Compute<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
||||||
// bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
// bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Quotient<CGAL::MP_Float> NT2;
|
|
||||||
// typedef CGAL::Lazy_exact_nt<CGAL::Quotient<CGAL::MP_Float> > NT2;
|
|
||||||
typedef CGAL::Cartesian<NT2> Linear_k2;
|
|
||||||
typedef CGAL::Algebraic_kernel_2_2<NT2> Algebraic_k2;
|
|
||||||
typedef CGAL::Curved_kernel<Linear_k2, Algebraic_k2> CK2_;
|
|
||||||
|
|
||||||
//typedef CGAL::Interval_nt<> NT2;
|
|
||||||
typedef CGAL::Interval_nt_advanced NT3;
|
|
||||||
typedef CGAL::Cartesian<NT3> Linear_k3;
|
|
||||||
typedef CGAL::Algebraic_kernel_2_2<NT3> Algebraic_k3;
|
|
||||||
typedef CGAL::Curved_kernel<Linear_k3,Algebraic_k3> CK3_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Lazy_curved_kernel<CK2_,CK3_> LazyCurvedK;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<LazyCurvedK> LazyCurvedK_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<LazyCurved_k> Traits0_2;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_2> LazyCurved_kTraits;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 LazyArc;
|
|
||||||
typedef std::vector<LazyArc> LazyArcContainer;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel Circular arc traits") ;
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_CA_Traits,LazyArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
|
|
||||||
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
|
|
||||||
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
|
|
||||||
typedef std::vector<LazyVarArc> LazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel Variant traits");
|
|
||||||
|
|
||||||
bench.Compute<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
//bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_hexagon_curved_kernel<CircularKernel> CircularKernelHexagon;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> CircularKernHex_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> Traits0_3;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_3> CircularKernHex_CA_Traits;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc;
|
|
||||||
typedef std::vector<CircularKernHexArc> CircularKernHexArcContainer;
|
|
||||||
bench.kernel("Circular kernel filtered hexagon Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_CA_Traits,CircularKernHexArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4;
|
|
||||||
typedef CircularKernelHexagon::Line_arc_2 Line_arc_4;
|
|
||||||
typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc;
|
|
||||||
typedef std::vector<CircularKernHexVarArc> CircularKernHexVarArcContainer;
|
|
||||||
typedef CGAL::Variant_traits<CircularKernelHexagon,Circular_arc_4,Line_arc_4> CircularKernHex_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("Circular kernel filtered hexagon Variants traits");
|
|
||||||
|
|
||||||
//bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_hexagon_curved_kernel<LazyCurvedK> LazyKernelHexagon;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> LazyKernelHexagon_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> Traits0_4;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_4> LazyKernelHexagon_CA_Traits;
|
|
||||||
#endif
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc;
|
|
||||||
typedef std::vector<LazyKernelHexagonArc> LazyKernelHexagonArcContainer;
|
|
||||||
bench.kernel("Lazy curved kernel filtered hexagon Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<LazyKernelHexagon,LazyKernelHexagon_CA_Traits, LazyKernelHexagonArcContainer>();
|
|
||||||
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
|
|
||||||
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
|
|
||||||
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
|
|
||||||
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<LazyKernelHexagon,Line_arc_5,Circular_arc_5> HxLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel filtered hexagon Variants traits") ;
|
|
||||||
|
|
||||||
//bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernel> BBCircularKernel ;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircularKernel> BBCircularKernel_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircularKernel> Traits0_5;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_5> BBCircularKernel_CA_Traits;
|
|
||||||
#endif
|
|
||||||
typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc;
|
|
||||||
typedef std::vector<BBCircularKernelArc> BBCircularKernelArcContainer;
|
|
||||||
bench.kernel("Circular kernel filtered bbox Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>();
|
|
||||||
|
|
||||||
typedef BBCircularKernel::Circular_arc_2 Circular_arc_6;
|
|
||||||
typedef BBCircularKernel::Line_arc_2 Line_arc_6;
|
|
||||||
typedef boost::variant<Circular_arc_6,Line_arc_6 > BBCircVarArc;
|
|
||||||
typedef std::vector<BBCircVarArc> BBCircVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBCircularKernel,Line_arc_6,Circular_arc_6> BBCircVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("Circular kernel filtered bbox Variants traits") ;
|
|
||||||
|
|
||||||
// bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<LazyCurvedK> BBLazyCurvedK;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> BBLazyCurvedK_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> Traits0_6;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_6> BBLazyCurvedK_CA_Traits;
|
|
||||||
#endif
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc;
|
|
||||||
typedef std::vector<BBLazyCurvedKArc> BBLazyCurvedKArcContainer;
|
|
||||||
bench.kernel("Lazy curved kernel filtered bbox Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBLazyCurvedK,BBLazyCurvedK_CA_Traits,BBLazyCurvedKArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
|
|
||||||
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
|
|
||||||
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
|
|
||||||
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBLazyCurvedK,Line_arc_7,Circular_arc_7> BBLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel filtered bbox Variants traits") ;
|
|
||||||
|
|
||||||
//bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
|
|
||||||
#endif
|
|
||||||
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
|
|
||||||
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
|
|
||||||
bench.kernel("BBox Circular kernel filtered bbox Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
|
|
||||||
|
|
||||||
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
|
|
||||||
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
|
|
||||||
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
|
|
||||||
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("BBox Circular kernel filtered bbox Variants traits") ;
|
|
||||||
|
|
||||||
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
if (i+1<15)
|
if (i+1<15)
|
||||||
{
|
{
|
||||||
if (strcmp(Dxffilename[i+1],""))
|
if (strcmp(Dxffilename[i+1],""))
|
||||||
|
|
@ -460,4 +192,3 @@ bench.infotable();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
#include <CGAL/intersections.h>
|
#include <CGAL/intersections.h>
|
||||||
#include <CGAL/Circular_kernel_2.h>
|
#include <CGAL/Circular_kernel_2.h>
|
||||||
#include <CGAL/Arr_circular_arc_traits_2.h>
|
#include <CGAL/Arr_circular_arc_traits_2.h>
|
||||||
#include <CGAL/Lazy_circular_kernel_2.h>
|
|
||||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||||
#include <CGAL/Arrangement_2.h>
|
#include <CGAL/Arrangement_2.h>
|
||||||
#include <CGAL/Arr_naive_point_location.h>
|
#include <CGAL/Arr_naive_point_location.h>
|
||||||
|
|
@ -42,21 +41,6 @@ typedef CGAL::Arr_circular_line_arc_traits_2<CircularKernel> CircularK_Variant
|
||||||
typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc;
|
typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc;
|
||||||
typedef std::vector<CircularKVarArc> CircularKVarArcContainer;
|
typedef std::vector<CircularKVarArc> CircularKVarArcContainer;
|
||||||
|
|
||||||
// LAZY KERNEL TYPEDEFS
|
|
||||||
typedef CGAL::Interval_nt_advanced NT3;
|
|
||||||
typedef CGAL::Cartesian<NT3> Linear_k3;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT3> Algebraic_k3;
|
|
||||||
typedef CGAL::Circular_kernel_2 <Linear_k3,Algebraic_k3> CK3_;
|
|
||||||
typedef CGAL::Lazy_circular_kernel_2<CircularKernel,CK3_> LazyCurvedK;
|
|
||||||
typedef CGAL::Arr_circular_arc_traits_2<LazyCurvedK> LazyCurvedK_CA_Traits;
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 LazyArc;
|
|
||||||
typedef std::vector<LazyArc> LazyArcContainer;
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
|
|
||||||
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
|
|
||||||
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
|
|
||||||
typedef std::vector<LazyVarArc> LazyVarContainer;
|
|
||||||
//~ typedef CGAL::Arr_circular_line_arc_traits_2<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
|
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<LazyCurvedK> LazyCurvedK_Variant_Traits;
|
|
||||||
|
|
||||||
// BBOX TYPEDEFS
|
// BBOX TYPEDEFS
|
||||||
typedef CGAL::Filtered_bbox_circular_kernel_2<CircularKernel>
|
typedef CGAL::Filtered_bbox_circular_kernel_2<CircularKernel>
|
||||||
|
|
@ -77,24 +61,6 @@ typedef std::vector<BBCircVarArc>
|
||||||
BBCircVarContainer;
|
BBCircVarContainer;
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<BBCircularKernel> BBCircVariantTraits;
|
typedef CGAL::Arr_circular_line_arc_traits_2<BBCircularKernel> BBCircVariantTraits;
|
||||||
|
|
||||||
// BBOX(LAZY)
|
|
||||||
typedef CGAL::Filtered_bbox_circular_kernel_2<LazyCurvedK>
|
|
||||||
BBLazyKernel ;
|
|
||||||
typedef CGAL::Arr_circular_arc_traits_2<BBLazyKernel>
|
|
||||||
BBLazyKernel_CA_Traits;
|
|
||||||
typedef BBLazyKernel::Circular_arc_2
|
|
||||||
BBLazyKernelArc;
|
|
||||||
typedef std::vector<BBLazyKernelArc>
|
|
||||||
BBLazyKernelArcContainer;
|
|
||||||
typedef BBLazyKernel::Circular_arc_2
|
|
||||||
Circular_arc_lazybb;
|
|
||||||
typedef BBLazyKernel::Line_arc_2
|
|
||||||
Line_arc_lazybb;
|
|
||||||
typedef boost::variant<Circular_arc_lazybb,Line_arc_lazybb >
|
|
||||||
BBLazyVarArc;
|
|
||||||
typedef std::vector<BBLazyVarArc>
|
|
||||||
BBLazyVarContainer;
|
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<BBLazyKernel> BBLazyVariantTraits;
|
|
||||||
|
|
||||||
template <class CK,class Traits,class ArcContainer>
|
template <class CK,class Traits,class ArcContainer>
|
||||||
void do_main(const char *s) {
|
void do_main(const char *s) {
|
||||||
|
|
@ -243,9 +209,7 @@ int main(int argc, char* argv[]){
|
||||||
int j = argv[2][0]-'0';
|
int j = argv[2][0]-'0';
|
||||||
if((j >= 0 && j < 9)) {
|
if((j >= 0 && j < 9)) {
|
||||||
if(i == 1) do_main<BBCircularKernel,BBCircVariantTraits, BBCircVarContainer>(dxf_filename[j]);
|
if(i == 1) do_main<BBCircularKernel,BBCircVariantTraits, BBCircVarContainer>(dxf_filename[j]);
|
||||||
if(i == 2) do_main<LazyCurvedK,LazyCurvedK_Variant_Traits, LazyVarContainer>(dxf_filename[j]);
|
|
||||||
if(i == 3) do_main<CircularKernel,CircularK_Variant_Traits, CircularKVarArcContainer>(dxf_filename[j]);
|
if(i == 3) do_main<CircularKernel,CircularK_Variant_Traits, CircularKVarArcContainer>(dxf_filename[j]);
|
||||||
if(i == 4) do_main<BBLazyKernel,BBLazyVariantTraits, BBLazyVarContainer>(dxf_filename[j]);
|
|
||||||
if((i >= 5) || (i <= 0)) std::cout << "INVALID PARAMETERS" << std::endl;
|
if((i >= 5) || (i <= 0)) std::cout << "INVALID PARAMETERS" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
int k = -1;
|
int k = -1;
|
||||||
|
|
@ -255,13 +219,9 @@ int main(int argc, char* argv[]){
|
||||||
if(j == ('c'-'0')) k = 3;
|
if(j == ('c'-'0')) k = 3;
|
||||||
if(j == ('d'-'0')) k = 4;
|
if(j == ('d'-'0')) k = 4;
|
||||||
if(i == 1) do_main<BBCircularKernel,BBCircVariantTraits, BBCircVarContainer>(k);
|
if(i == 1) do_main<BBCircularKernel,BBCircVariantTraits, BBCircVarContainer>(k);
|
||||||
if(i == 2) do_main<LazyCurvedK,LazyCurvedK_Variant_Traits, LazyVarContainer>(k);
|
|
||||||
if(i == 3) do_main<CircularKernel,CircularK_Variant_Traits, CircularKVarArcContainer>(k);
|
if(i == 3) do_main<CircularKernel,CircularK_Variant_Traits, CircularKVarArcContainer>(k);
|
||||||
if(i == 4) do_main<BBLazyKernel,BBLazyVariantTraits, BBLazyVarContainer>(k);
|
|
||||||
if(i == 5) do_main<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>(k);
|
if(i == 5) do_main<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>(k);
|
||||||
if(i == 6) do_main<LazyCurvedK,LazyCurvedK_CA_Traits, LazyArcContainer>(k);
|
|
||||||
if(i == 7) do_main<CircularKernel,CircularK_CA_Traits, CircularKArcContainer>(k);
|
if(i == 7) do_main<CircularKernel,CircularK_CA_Traits, CircularKArcContainer>(k);
|
||||||
if(i == 8) do_main<BBLazyKernel,BBLazyKernel_CA_Traits, BBLazyKernelArcContainer>(k);
|
|
||||||
}
|
}
|
||||||
} else std::cout << "INVALID PARAMETERS" << std::endl;
|
} else std::cout << "INVALID PARAMETERS" << std::endl;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,13 @@
|
||||||
#define CGAL_CAST_INT
|
#define CGAL_CAST_INT
|
||||||
#define CIRCULAR_KERNEL_2
|
#define CIRCULAR_KERNEL_2
|
||||||
#define LAZY_CURVED_KERNEL_2
|
|
||||||
#define CIRCULAR_KERNEL_2_FILTERED_HEXAGON
|
#define CIRCULAR_KERNEL_2_FILTERED_HEXAGON
|
||||||
#define LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
#define CIRCULAR_KERNEL_2_FILTERED_BBOX
|
#define CIRCULAR_KERNEL_2_FILTERED_BBOX
|
||||||
#define LAZY_CURVED_KERNEL_2_FILTERED_BBOX
|
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Cartesian.h>
|
#include <CGAL/Cartesian.h>
|
||||||
#include <CGAL/Handle_for.h>
|
#include <CGAL/Handle_for.h>
|
||||||
#include <CGAL/point_generators_2.h>
|
#include <CGAL/point_generators_2.h>
|
||||||
|
|
||||||
#include <CGAL/MP_Float.h>
|
|
||||||
|
|
||||||
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
|
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
|
||||||
|
|
||||||
#include <CGAL/intersections.h>
|
#include <CGAL/intersections.h>
|
||||||
|
|
@ -21,11 +16,6 @@
|
||||||
#include <CGAL/Arr_circular_arc_traits_2.h>
|
#include <CGAL/Arr_circular_arc_traits_2.h>
|
||||||
//#include <CGAL/Circular_arc_traits_tracer.h>
|
//#include <CGAL/Circular_arc_traits_tracer.h>
|
||||||
|
|
||||||
#include <CGAL/Lazy_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||||
|
|
||||||
|
|
@ -184,123 +174,7 @@ Bench bench; //If you want create table with all datasets
|
||||||
bench.Compute_no_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>();
|
bench.Compute_no_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef LAZY_CURVED_KERNEL_2
|
|
||||||
|
|
||||||
typedef CGAL::Quotient<CGAL::MP_Float> NT2;
|
|
||||||
typedef CGAL::Cartesian<NT2> Linear_k2;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
|
|
||||||
typedef CGAL::Circular_kernel_2 <Linear_k2, Algebraic_k2> CK2_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Interval_nt_advanced NT3;
|
|
||||||
typedef CGAL::Cartesian<NT3> Linear_k3;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT3> Algebraic_k3;
|
|
||||||
typedef CGAL::Circular_kernel_2 <Linear_k3,Algebraic_k3> CK3_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Lazy_circular_kernel_2<CK2_,CK3_> LazyCurvedK;
|
|
||||||
|
|
||||||
// #ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Arr_circular_arc_traits_2<LazyCurvedK> LazyCurvedK_CA_Traits;
|
|
||||||
// #else
|
|
||||||
// typedef CGAL::Circular_arc_traits<LazyCurved_k> Traits0_2;
|
|
||||||
// typedef CGAL::Circular_arc_traits_tracer<Traits0_2> LazyCurved_kTraits;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 LazyArc;
|
|
||||||
typedef std::vector<LazyArc> LazyArcContainer;
|
|
||||||
|
|
||||||
bench.kernel("LazyCircArc") ;
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_CA_Traits,LazyArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
|
|
||||||
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
|
|
||||||
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
|
|
||||||
typedef std::vector<LazyVarArc> LazyVarContainer;
|
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<LazyCurvedK> LazyCurvedK_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("LazyKVar");
|
|
||||||
|
|
||||||
//bench.Compute<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
//bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef CIRCULAR_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
|
|
||||||
typedef CGAL::Filtered_hexagon_circular_kernel_2<CircularKernel> CircularKernelHexagon;
|
|
||||||
|
|
||||||
// #ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Arr_circular_arc_traits_2<CircularKernelHexagon> CircularKernHex_CA_Traits;
|
|
||||||
// #else
|
|
||||||
// typedef CGAL::Circular_arc_traits<CircularKernelHexagon> Traits0_3;
|
|
||||||
// typedef CGAL::Circular_arc_traits_tracer<Traits0_3> CircularKernHex_CA_Traits;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc;
|
|
||||||
typedef std::vector<CircularKernHexArc> CircularKernHexArcContainer;
|
|
||||||
bench.kernel("CK Hex CircArcTraits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_CA_Traits,CircularKernHexArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4;
|
|
||||||
typedef CircularKernelHexagon::Line_arc_2 Line_arc_4;
|
|
||||||
typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc;
|
|
||||||
typedef std::vector<CircularKernHexVarArc> CircularKernHexVarArcContainer;
|
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<CircularKernelHexagon> CircularKernHex_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("CK Hex VarTraits");
|
|
||||||
|
|
||||||
// bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_HEXAGON
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Filtered_hexagon_circular_kernel_2<LazyCurvedK> LazyKernelHexagon;
|
|
||||||
|
|
||||||
// #ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Arr_circular_arc_traits_2<LazyKernelHexagon> LazyKernelHexagon_CA_Traits;
|
|
||||||
// #else
|
|
||||||
// typedef CGAL::Circular_arc_traits<LazyKernelHexagon> Traits0_4;
|
|
||||||
// typedef CGAL::Circular_arc_traits_tracer<Traits0_4> LazyKernelHexagon_CA_Traits;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc;
|
|
||||||
typedef std::vector<LazyKernelHexagonArc> LazyKernelHexagonArcContainer;
|
|
||||||
bench.kernel("LazyK Hex CircArcTraits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<LazyKernelHexagon,LazyKernelHexagon_CA_Traits, LazyKernelHexagonArcContainer>();
|
|
||||||
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
|
|
||||||
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
|
|
||||||
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
|
|
||||||
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
|
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<LazyKernelHexagon> HxLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("LazyK Hex VarTraits") ;
|
|
||||||
|
|
||||||
//bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
/*-------------------------------------------------------------------------------------------------------------------------
|
||||||
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
@ -333,105 +207,6 @@ bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>()
|
||||||
bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
|
bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
#ifdef LAZY_CURVED_KERNEL_2_FILTERED_BBOX
|
|
||||||
|
|
||||||
typedef CGAL::Filtered_bbox_circular_kernel_2<LazyCurvedK> BBLazyCurvedK;
|
|
||||||
|
|
||||||
// #ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Arr_circular_arc_traits_2<BBLazyCurvedK> BBLazyCurvedK_CA_Traits;
|
|
||||||
// #else
|
|
||||||
// typedef CGAL::Circular_arc_traits<BBLazyCurvedK> Traits0_6;
|
|
||||||
// typedef CGAL::Circular_arc_traits_tracer<Traits0_6> BBLazyCurvedK_CA_Traits;
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc;
|
|
||||||
typedef std::vector<BBLazyCurvedKArc> BBLazyCurvedKArcContainer;
|
|
||||||
bench.kernel("LLazyK BBox CircArcTraits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBLazyCurvedK,BBLazyCurvedK_CA_Traits,BBLazyCurvedKArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
|
|
||||||
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
|
|
||||||
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
|
|
||||||
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
|
|
||||||
typedef CGAL::Arr_circular_line_arc_traits_2<BBLazyCurvedK> BBLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("LLazyK BBox VarTraits") ;
|
|
||||||
|
|
||||||
//bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
|
|
||||||
#endif
|
|
||||||
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
|
|
||||||
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
|
|
||||||
bench.kernel("BBox Circular kernel filtered Hexagon CircArcTraits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
|
|
||||||
|
|
||||||
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
|
|
||||||
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
|
|
||||||
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
|
|
||||||
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("BBox Circular kernel filtered Hexagon VarTraits") ;
|
|
||||||
|
|
||||||
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
// if (i+1<2)
|
|
||||||
// {
|
|
||||||
// try{
|
|
||||||
// if (strcmp(Dxffilename[i+1],""))
|
|
||||||
// {
|
|
||||||
// try{
|
|
||||||
// fin.open (Dxffilename[i]);
|
|
||||||
// }
|
|
||||||
// catch(...){
|
|
||||||
// std::cout<<"error"<<std::endl;
|
|
||||||
// }
|
|
||||||
// if (!fin.is_open())
|
|
||||||
// {
|
|
||||||
// std::cout<<"file "<< Dxffilename[i] << " is not found"<<std::endl;
|
|
||||||
// std::cout << "that's all" << std::endl;
|
|
||||||
// fin.close();
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// bench.newDxfFilename(Dxffilename[i+1]);
|
|
||||||
// }
|
|
||||||
// fin.close();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// std::cout << "that's all" << std::endl;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// catch(...){std::cout << "error" << std::endl;}
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,6 @@
|
||||||
#include <CGAL/Circular_arc_traits.h>
|
#include <CGAL/Circular_arc_traits.h>
|
||||||
#include <CGAL/Circular_arc_traits_tracer.h>
|
#include <CGAL/Circular_arc_traits_tracer.h>
|
||||||
|
|
||||||
#include <CGAL/Lazy_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||||
|
|
||||||
#include <CGAL/Arrangement_2.h>
|
#include <CGAL/Arrangement_2.h>
|
||||||
|
|
@ -225,4 +221,3 @@ int exit_status = 0;
|
||||||
return exit_status;
|
return exit_status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,6 @@
|
||||||
#include <CGAL/Circular_arc_traits.h>
|
#include <CGAL/Circular_arc_traits.h>
|
||||||
#include <CGAL/Circular_arc_traits_tracer.h>
|
#include <CGAL/Circular_arc_traits_tracer.h>
|
||||||
|
|
||||||
#include <CGAL/Lazy_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_hexagon_circular_kernel_2.h>
|
|
||||||
|
|
||||||
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
#include <CGAL/Filtered_bbox_circular_kernel_2.h>
|
||||||
|
|
||||||
#include <CGAL/Arrangement_2.h>
|
#include <CGAL/Arrangement_2.h>
|
||||||
|
|
@ -169,207 +165,7 @@ Bench bench(Htmlfilename,Texfilename,Dxffilename[i],true);
|
||||||
// bench.Compute<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
// bench.Compute<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
||||||
bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
bench.Compute_dxf<CircularKernel,CircularK_Variant_Traits,CircularKVarArcContainer>(Dxffilename[i]);
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Lazy_curved_Kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
typedef CGAL::Quotient<CGAL::MP_Float> NT2;
|
|
||||||
typedef CGAL::Cartesian<NT2> Linear_k2;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
|
|
||||||
typedef CGAL::Circular_kernel_2<Linear_k2, Algebraic_k2> CK2_;
|
|
||||||
|
|
||||||
//typedef CGAL::Interval_nt<> NT2;
|
|
||||||
typedef CGAL::Interval_nt_advanced NT3;
|
|
||||||
typedef CGAL::Cartesian<NT3> Linear_k3;
|
|
||||||
typedef CGAL::Algebraic_kernel_2_2<NT3> Algebraic_k3;
|
|
||||||
typedef CGAL::Curved_kernel<Linear_k3,Algebraic_k3> CK3_;
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Lazy_circular_kernel_2<CK2_,CK3_> LazyCurvedK;
|
|
||||||
|
|
||||||
// #ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
// typedef CGAL::Circular_arc_traits<LazyCurvedK> LazyCurvedK_CA_Traits;
|
|
||||||
// #else
|
|
||||||
// typedef CGAL::Circular_arc_traits<LazyCurved_k> Traits0_2;
|
|
||||||
// typedef CGAL::Circular_arc_traits_tracer<Traits0_2> LazyCurved_kTraits;
|
|
||||||
// #endif
|
|
||||||
//
|
|
||||||
// typedef LazyCurvedK::Circular_arc_2 LazyArc;
|
|
||||||
// typedef std::vector<LazyArc> LazyArcContainer;
|
|
||||||
//
|
|
||||||
// bench.kernel("Lazy curved kernel Circular arc traits") ;
|
|
||||||
//
|
|
||||||
// bench.Compute_no_dxf<LazyCurvedK,LazyCurvedK_CA_Traits,LazyArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef LazyCurvedK::Circular_arc_2 Circular_arc_3;
|
|
||||||
typedef LazyCurvedK::Line_arc_2 Line_arc_3;
|
|
||||||
typedef boost::variant<Circular_arc_3,Line_arc_3 > LazyVarArc;
|
|
||||||
typedef std::vector<LazyVarArc> LazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<LazyCurvedK,Line_arc_3,Circular_arc_3> LazyCurvedK_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel Variant traits");
|
|
||||||
|
|
||||||
// bench.Compute<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
// bench.Compute_dxf<LazyCurvedK,LazyCurvedK_Variant_Traits,LazyVarContainer>(Dxffilename[i]);
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
asdashhhhhhhhhhhhfhjhdghdf
|
|
||||||
typedef CGAL::Filtered_hexagon_curved_kernel<CircularKernel> CircularKernelHexagon;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> CircularKernHex_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<CircularKernelHexagon> Traits0_3;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_3> CircularKernHex_CA_Traits;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 CircularKernHexArc;
|
|
||||||
typedef std::vector<CircularKernHexArc> CircularKernHexArcContainer;
|
|
||||||
bench.kernel("Circular kernel filtered hexagon Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_CA_Traits,CircularKernHexArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef CircularKernelHexagon::Circular_arc_2 Circular_arc_4;
|
|
||||||
typedef CircularKernelHexagon::Line_arc_2 Line_arc_4;
|
|
||||||
typedef boost::variant< Circular_arc_4, Line_arc_4 > CircularKernHexVarArc;
|
|
||||||
typedef std::vector<CircularKernHexVarArc> CircularKernHexVarArcContainer;
|
|
||||||
typedef CGAL::Variant_traits<CircularKernelHexagon,Circular_arc_4,Line_arc_4> CircularKernHex_Variant_Traits;
|
|
||||||
|
|
||||||
bench.kernel("Circular kernel filtered hexagon Variants traits");
|
|
||||||
|
|
||||||
bench.Compute<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>(Dxffilename[i]);
|
|
||||||
// bench.Compute_no_dxf<CircularKernelHexagon,CircularKernHex_Variant_Traits,CircularKernHexVarArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!Filtered_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_hexagon_curved_kernel<LazyCurvedK> LazyKernelHexagon;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> LazyKernelHexagon_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<LazyKernelHexagon> Traits0_4;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_4> LazyKernelHexagon_CA_Traits;
|
|
||||||
#endif
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 LazyKernelHexagonArc;
|
|
||||||
typedef std::vector<LazyKernelHexagonArc> LazyKernelHexagonArcContainer;
|
|
||||||
bench.kernel("Lazy curved kernel filtered hexagon Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<LazyKernelHexagon,LazyKernelHexagon_CA_Traits, LazyKernelHexagonArcContainer>();
|
|
||||||
|
|
||||||
typedef LazyKernelHexagon::Circular_arc_2 Circular_arc_5;
|
|
||||||
typedef LazyKernelHexagon::Line_arc_2 Line_arc_5;
|
|
||||||
typedef boost::variant<Circular_arc_5,Line_arc_5 > HxLazyVarArc;
|
|
||||||
typedef std::vector<HxLazyVarArc> HxLazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<LazyKernelHexagon,Line_arc_5,Circular_arc_5> HxLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel filtered hexagon Variants traits") ;
|
|
||||||
|
|
||||||
bench.Compute<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>(Dxffilename[i]);
|
|
||||||
//bench.Compute_no_dxf<LazyKernelHexagon,HxLazyVariantTraits,HxLazyVarContainer>();
|
|
||||||
*/
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_filtered_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernel> BBCircularKernel ;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircularKernel> BBCircularKernel_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircularKernel> Traits0_5;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_5> BBCircularKernel_CA_Traits;
|
|
||||||
#endif
|
|
||||||
typedef BBCircularKernel::Circular_arc_2 BBCircularKernelArc;
|
|
||||||
typedef std::vector<BBCircularKernelArc> BBCircularKernelArcContainer;
|
|
||||||
bench.kernel("Circular kernel filtered bbox Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBCircularKernel,BBCircularKernel_CA_Traits, BBCircularKernelArcContainer>();
|
|
||||||
|
|
||||||
typedef BBCircularKernel::Circular_arc_2 Circular_arc_6;
|
|
||||||
typedef BBCircularKernel::Line_arc_2 Line_arc_6;
|
|
||||||
typedef boost::variant<Circular_arc_6,Line_arc_6 > BBCircVarArc;
|
|
||||||
typedef std::vector<BBCircVarArc> BBCircVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBCircularKernel,Line_arc_6,Circular_arc_6> BBCircVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("Circular kernel filtered bbox Variants traits") ;
|
|
||||||
|
|
||||||
bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
|
|
||||||
// bench.Compute_no_dxf<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>();
|
|
||||||
*/
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_hexagone_Lazy_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<LazyCurvedK> BBLazyCurvedK;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> BBLazyCurvedK_CA_Traits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBLazyCurvedK> Traits0_6;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_6> BBLazyCurvedK_CA_Traits;
|
|
||||||
#endif
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 BBLazyCurvedKArc;
|
|
||||||
typedef std::vector<BBLazyCurvedKArc> BBLazyCurvedKArcContainer;
|
|
||||||
bench.kernel("Lazy curved kernel filtered bbox Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBLazyCurvedK,BBLazyCurvedK_CA_Traits,BBLazyCurvedKArcContainer>();
|
|
||||||
|
|
||||||
|
|
||||||
typedef BBLazyCurvedK::Circular_arc_2 Circular_arc_7;
|
|
||||||
typedef BBLazyCurvedK::Line_arc_2 Line_arc_7;
|
|
||||||
typedef boost::variant<Circular_arc_7,Line_arc_7 > BBLazyVarArc;
|
|
||||||
typedef std::vector< BBLazyVarArc> BBLazyVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBLazyCurvedK,Line_arc_7,Circular_arc_7> BBLazyVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("Lazy curved kernel filtered bbox Variants traits") ;
|
|
||||||
|
|
||||||
bench.Compute<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>(Dxffilename[i]);
|
|
||||||
//bench.Compute_no_dxf<BBLazyCurvedK, BBLazyVariantTraits, BBLazyVarContainer>();
|
|
||||||
*/
|
|
||||||
/*-------------------------------------------------------------------------------------------------------------------------
|
|
||||||
!!!!!!!!!!!bbox_filtered_Filtered_hexagone_Circular_kernel!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
/*
|
|
||||||
typedef CGAL::Filtered_bbox_curved_kernel<CircularKernelHexagon> BBCircKHexagon ;
|
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_DEBUG
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> BBCircKHexagonCATraits;
|
|
||||||
#else
|
|
||||||
typedef CGAL::Circular_arc_traits<BBCircKHexagon> Traits0_7;
|
|
||||||
typedef CGAL::Circular_arc_traits_tracer<Traits0_7> BBCircKHexagonCATraits;
|
|
||||||
#endif
|
|
||||||
typedef BBCircKHexagon::Circular_arc_2 BBCircKHexagonArc;
|
|
||||||
typedef std::vector<BBCircKHexagon> BBCircKHexagonArcCont;
|
|
||||||
bench.kernel("BBox Circular kernel filtered bbox Circular arc traits");
|
|
||||||
|
|
||||||
bench.Compute_no_dxf<BBCircKHexagon,BBCircKHexagonCATraits, BBCircKHexagonArcCont>();
|
|
||||||
|
|
||||||
typedef BBCircularKernelHexagon::Circular_arc_2 Circular_arc_8;
|
|
||||||
typedef BBCircularKernelHexagon::Line_arc_2 Line_arc_8;
|
|
||||||
typedef boost::variant<Circular_arc_8,Line_arc_8 > BBCircularKernelHexagonVarArc;
|
|
||||||
typedef std::vector<BBCircularKernelHexagonVarArc> BBCircularKernelHexagonVarContainer;
|
|
||||||
typedef CGAL::Variant_traits<BBCircularKernelHexagon,Line_arc_8,Circular_arc_8> BBCircularKernelHexagonVariantTraits;
|
|
||||||
|
|
||||||
bench.kernel("BBox Circular kernel filtered bbox Variants traits") ;
|
|
||||||
|
|
||||||
//bench.Compute<BBCircularKernel,BBCircVariantTraits,BBCircVarContainer>(Dxffilename[i]);
|
|
||||||
bench.Compute_no_dxf<BBCircularKernelHexagon,BBCircularKernelHexagonVariantTraits,BBCircularKernelHexagonVarContainer>();*/
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------------
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------*/
|
|
||||||
if (i+1<15)
|
if (i+1<15)
|
||||||
{
|
{
|
||||||
if (strcmp(Dxffilename[i+1],""))
|
if (strcmp(Dxffilename[i+1],""))
|
||||||
|
|
@ -388,4 +184,3 @@ bench.infotable();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ union yyalloc
|
||||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||||
not overlap. */
|
not overlap. */
|
||||||
# ifndef YYCOPY
|
# ifndef YYCOPY
|
||||||
# if defined (__GNUC__) && 1 < __GNUC__
|
# if (__GNUC__ > 0)
|
||||||
# define YYCOPY(To, From, Count) \
|
# define YYCOPY(To, From, Count) \
|
||||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||||
# else
|
# else
|
||||||
|
|
|
||||||
|
|
@ -44,28 +44,20 @@ namespace CGAL {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
#ifdef CGAL_USE_GMP
|
#ifdef CGAL_USE_GMP
|
||||||
typedef CGAL::Gmpq NT1;
|
typedef CGAL::Gmpq NT;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
typedef Quotient<MP_Float> NT1;
|
typedef Quotient<MP_Float> NT;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef Cartesian<NT1> Linear_k1;
|
typedef Cartesian<NT> Linear_k;
|
||||||
typedef Algebraic_kernel_for_circles_2_2<NT1> Algebraic_k1;
|
typedef Algebraic_kernel_for_circles_2_2<NT> Algebraic_k;
|
||||||
typedef Circular_kernel_2<Linear_k1, Algebraic_k1> CK1;
|
typedef Circular_kernel_2<Linear_k, Algebraic_k> CK;
|
||||||
|
|
||||||
// typedef CGAL::Interval_nt_advanced NT2;
|
|
||||||
// typedef CGAL::Cartesian<NT2> Linear_k2;
|
|
||||||
// typedef CGAL::Algebraic_kernel_for_circles_2_2<NT2> Algebraic_k2;
|
|
||||||
// typedef CGAL::Circular_kernel_2<Linear_k2,Algebraic_k2> CK2;
|
|
||||||
|
|
||||||
// typedef CGAL::Lazy_circular_kernel_2<CK1,CK2>
|
|
||||||
// Exact_circular_kernel_2;
|
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
|
||||||
typedef Filtered_bbox_circular_kernel_2<internal::CK1> Exact_circular_kernel_2;
|
typedef Filtered_bbox_circular_kernel_2<internal::CK> Exact_circular_kernel_2;
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ include_directories(BEFORE ../../../Kernel_23/test/Kernel_23/include)
|
||||||
include_directories(BEFORE ../Kernel_23/include)
|
include_directories(BEFORE ../Kernel_23/include)
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Circular_kernel.cpp")
|
create_single_source_cgal_program("test_Circular_kernel.cpp")
|
||||||
create_single_source_cgal_program("test_Lazy_circular_kernel.cpp")
|
|
||||||
create_single_source_cgal_program("test_Exact_circular_kernel.cpp")
|
create_single_source_cgal_program("test_Exact_circular_kernel.cpp")
|
||||||
create_single_source_cgal_program("test_Filtered_bbox_circular_kernel.cpp")
|
create_single_source_cgal_program("test_Filtered_bbox_circular_kernel.cpp")
|
||||||
create_single_source_cgal_program("test_Line_arc.cpp")
|
create_single_source_cgal_program("test_Line_arc.cpp")
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
// Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France).
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// This file is part of CGAL (www.cgal.org).
|
|
||||||
//
|
|
||||||
// $URL$
|
|
||||||
// $Id$
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
|
||||||
//
|
|
||||||
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado
|
|
||||||
|
|
||||||
// Partially supported by the IST Programme of the EU as a Shared-cost
|
|
||||||
// RTD (FET Open) Project under Contract No IST-2000-26473
|
|
||||||
// (ECG - Effective Computational Geometry for Curves and Surfaces)
|
|
||||||
// and a STREP (FET Open) Project under Contract No IST-006413
|
|
||||||
// (ACS -- Algorithms for Complex Shapes)
|
|
||||||
|
|
||||||
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h>
|
|
||||||
|
|
||||||
#include <CGAL/Exact_circular_kernel_2.h>
|
|
||||||
#include <CGAL/Circular_kernel_intersections.h>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
|
||||||
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
|
|
||||||
#include <CGAL/Circular_kernel_2.h>
|
|
||||||
|
|
||||||
|
|
||||||
typedef CGAL::Exact_predicates_exact_constructions_kernel Linear_k1;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_circles_2_2<Linear_k1::FT> Algebraic_k1;
|
|
||||||
typedef CGAL::Circular_kernel_2<Linear_k1, Algebraic_k1> CK;
|
|
||||||
CK ck;
|
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/_test_circles_predicates.h>
|
|
||||||
#include <CGAL/_test_circles_constructions.h>
|
|
||||||
#include <CGAL/_test_circles_extention.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
|
|
||||||
_test_circle_predicat(ck);
|
|
||||||
_test_circle_construct(ck);
|
|
||||||
_test_circle_bbox(ck);
|
|
||||||
_test_circular_arc_bbox(ck);
|
|
||||||
_test_has_on(ck);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -227,7 +227,7 @@ cases where many labels are used (more than five).
|
||||||
|
|
||||||
An [example](\ref Classification_example_ethz_random_forest) shows how to
|
An [example](\ref Classification_example_ethz_random_forest) shows how to
|
||||||
use this classifier. For more details about the algorithm, please refer
|
use this classifier. For more details about the algorithm, please refer
|
||||||
to README provided in the [ETH Zurich's code archive](https://www.ethz.ch/content/dam/ethz/special-interest/baug/igp/photogrammetry-remote-sensing-dam/documents/sourcecode-and-datasets/Random%20Forest/rforest.zip).
|
to README provided in the [ETH Zurich's code archive](https://ethz.ch/content/dam/ethz/special-interest/baug/igp/photogrammetry-remote-sensing-dam/documents/sourcecode-and-datasets/Random%20Forest/rforest.zip).
|
||||||
|
|
||||||
\subsubsection Classification_ETHZ_random_forest_deprecated Deprecated IO
|
\subsubsection Classification_ETHZ_random_forest_deprecated Deprecated IO
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,7 @@ public:
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief converts a deprecated configuration (in compressed ASCII
|
\brief converts a deprecated configuration (in compressed \ascii
|
||||||
format) to a new configuration (in binary format).
|
format) to a new configuration (in binary format).
|
||||||
|
|
||||||
The input file should be a GZIP container written by the
|
The input file should be a GZIP container written by the
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ public:
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief outputs the evaluation in a simple ASCII format to the stream `os`.
|
\brief outputs the evaluation in a simple \ascii format to the stream `os`.
|
||||||
*/
|
*/
|
||||||
friend std::ostream& operator<< (std::ostream& os, const Evaluation& evaluation)
|
friend std::ostream& operator<< (std::ostream& os, const Evaluation& evaluation)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -692,11 +692,7 @@ public:
|
||||||
}
|
}
|
||||||
// Write property tree to XML file
|
// Write property tree to XML file
|
||||||
boost::property_tree::write_xml(output, tree,
|
boost::property_tree::write_xml(output, tree,
|
||||||
#if BOOST_VERSION >= 105600
|
|
||||||
boost::property_tree::xml_writer_make_settings<std::string>(' ', 3));
|
boost::property_tree::xml_writer_make_settings<std::string>(' ', 3));
|
||||||
#else
|
|
||||||
boost::property_tree::xml_writer_make_settings<char>(' ', 3));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue