mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'remotes/origin/master' into Kinetic_shape_reconstruction-new_package-soesau
This commit is contained in:
commit
c9a7b79530
|
|
@ -159,7 +159,8 @@ jobs:
|
|||
with:
|
||||
script: |
|
||||
const error = process.env.ERRORMSG
|
||||
const msg = "There was an error while building the doc: \n"+error
|
||||
const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}`
|
||||
const msg = "There was an error while building the doc: \n"+error + "\n" + job_url
|
||||
github.rest.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 24px;
|
||||
border-spacing: 0;
|
||||
border-bottom: 2px solid black;
|
||||
border-top: 2px solid black;
|
||||
}
|
||||
table th {
|
||||
padding: 3px 10px;
|
||||
background-color: white;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table td {
|
||||
padding: 3px 10px;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
table tr.odd {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
table tr.even {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
name: List workflow last run
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 10 * * 1"
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
jobs:
|
||||
list_workflow:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
messages: ${{ steps.cat_output.outputs.message }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: run script
|
||||
run: |
|
||||
chmod +x ./Scripts/developer_scripts/list_cgal_workflows_last_run.sh
|
||||
./Scripts/developer_scripts/list_cgal_workflows_last_run.sh > output.md
|
||||
- name: convert markdown to html
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y pandoc
|
||||
pandoc -f markdown -t html --self-contained --css=.github/workflows/list_workflow_last_run.css -o output.html output.md
|
||||
- name: set_output
|
||||
id: cat_output
|
||||
run: |
|
||||
delimiter="$(openssl rand -hex 8)"
|
||||
echo "message<<${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||
echo "Subject:List workflow run \nContent-Type: text/html; charset=\"UTF-8\"\n" >> "${GITHUB_OUTPUT}"
|
||||
echo "<html><body>" >> "${GITHUB_OUTPUT}"
|
||||
cat output.html >> "${GITHUB_OUTPUT}"
|
||||
echo "</body></html>" >> "${GITHUB_OUTPUT}"
|
||||
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||
call_send_email:
|
||||
needs: list_workflow
|
||||
uses: ./.github/workflows/send_email.yml
|
||||
with:
|
||||
message: ${{needs.list_workflow.outputs.messages}}
|
||||
secrets:
|
||||
email: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_TO }}
|
||||
private_key: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_PRIVATE_KEY }}
|
||||
user: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_USER }}
|
||||
host: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_HOST }}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
name: Send Email using SSH
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
message:
|
||||
description: 'Message to send'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
email:
|
||||
required: true
|
||||
private_key:
|
||||
required: true
|
||||
user:
|
||||
required: true
|
||||
host:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
send_email:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: install ssh keys
|
||||
run: |
|
||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||
echo "${{ secrets.private_key }}" > ~/.ssh/id_rsa
|
||||
ssh-keyscan -H ${{ secrets.host }} > ~/.ssh/known_hosts
|
||||
- name: send email via ssh
|
||||
run: |
|
||||
echo -e '${{ inputs.message }}' | ssh ${{ secrets.user }}@${{ secrets.host }} "/sbin/sendmail -t ${{ secrets.email }}"
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
name: Wiki Notification
|
||||
|
||||
on: gollum
|
||||
|
||||
jobs:
|
||||
prepare_email:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
messages: ${{ steps.set-result.outputs.result }}
|
||||
steps:
|
||||
- name: get informations and prepare email
|
||||
uses: actions/github-script@v6
|
||||
id: set-result
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const payload = context.payload;
|
||||
const actor = payload.sender;
|
||||
const pages = payload.pages;
|
||||
let messages = "Subject:Updates to CGAL Wiki \nContent-Type: text/html\n";
|
||||
messages += "<html><body>";
|
||||
messages += `<p>The following CGAL Wiki page were modified by <a href="${actor.html_url}">"${actor.login}"</a>:</p><ul>\n`
|
||||
for (const page of pages){
|
||||
messages += `<li><a href="${page.html_url}">${page.title}</a> (link to <a href="${page.html_url}/_compare/${page.sha}%5E...${page.sha}">the diff</a>)</li>\n`;
|
||||
}
|
||||
messages += "</ul></body></html>";
|
||||
console.log( messages );
|
||||
return messages;
|
||||
call_send_email:
|
||||
needs: prepare_email
|
||||
uses: ./.github/workflows/send_email.yml
|
||||
with:
|
||||
message: ${{needs.prepare_email.outputs.messages}}
|
||||
secrets:
|
||||
email: ${{ secrets.CGAL_SEND_WIKI_EMAIL_TO }}
|
||||
private_key: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_PRIVATE_KEY }}
|
||||
user: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_USER }}
|
||||
host: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_HOST }}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABBTree}
|
||||
\cgalPkgPicture{aabb-teaser-thumb.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, Camille Wormser}
|
||||
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, and Camille Wormser}
|
||||
\cgalPkgDesc{The AABB (axis-aligned bounding box) tree component offers a static data structure and algorithms to perform efficient intersection and distance queries on sets of finite 3D geometric objects.}
|
||||
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABBTreeRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -143,18 +143,18 @@ struct AABB_covered_triangle_tree_traits
|
|||
|
||||
// Primitive ID --> box vector pos --> Bounding Box
|
||||
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
||||
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
|
||||
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
|
||||
|
||||
// Primitive ID --> point vector pos --> Reference Point
|
||||
using RPPMB = internal::Vector_property_map<Point>;
|
||||
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
|
||||
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
|
||||
|
||||
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
||||
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
||||
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
||||
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
|
||||
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
|
||||
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
||||
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
|
||||
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
|
||||
|
||||
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
||||
CGAL::Tag_true /*external pmaps*/,
|
||||
|
|
@ -207,7 +207,7 @@ public:
|
|||
: Base(traits),
|
||||
m_sq_length(square(max_length)),
|
||||
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
||||
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||
{
|
||||
initialize_tree_property_maps();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
|
||||
\cgalPkgPicture{afsr-detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Tran Kai Frank Da, David Cohen-Steiner}
|
||||
\cgalPkgAuthors{Tran Kai Frank Da and David Cohen-Steiner}
|
||||
\cgalPkgDesc{This package provides a greedy algorithm for surface reconstruction from an
|
||||
unorganized point set. Starting from a seed facet, a piecewise linear
|
||||
surface is grown by adding Delaunay triangles one by one. The most
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
\cgalPkgDescriptionBegin{2D Alpha Shapes,PkgAlphaShapes2}
|
||||
\cgalPkgPicture{alpha-detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Tran Kai Frank Da}
|
||||
\cgalPkgAuthor{Tran Kai Frank Da}
|
||||
\cgalPkgDesc{This package offers a data structure encoding the whole family of alpha-complexes related to a given 2D Delaunay or regular triangulation. In particular, the data structure allows to retrieve the alpha-complex for any alpha value, the whole spectrum of critical alpha values and a filtration on the triangulation faces (this filtration is based on the first alpha value for which each face is included on the alpha-complex).}
|
||||
\cgalPkgManuals{Chapter_2D_Alpha_Shapes,PkgAlphaShapes2Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
\cgalPkgDescriptionBegin{3D Alpha Wrapping,PkgAlphaWrap3}
|
||||
\cgalPkgPicture{alpha_wrap_3.jpg}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, Mael Rouxel-Labbé}
|
||||
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, and Mael Rouxel-Labbé}
|
||||
\cgalPkgDesc{This component takes a 3D triangle mesh, a triangle soup, or a point set as input, and generates
|
||||
a valid triangulated surface mesh that strictly contains the input (watertight, intersection-free
|
||||
and 2-manifold). The algorithm proceeds by shrink-wrapping
|
||||
|
|
|
|||
|
|
@ -175,18 +175,18 @@ struct AABB_tree_splitter_traits
|
|||
|
||||
// Primitive ID --> box vector pos --> Bounding Box
|
||||
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
||||
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
|
||||
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
|
||||
|
||||
// Primitive ID --> point vector pos --> Reference Point
|
||||
using RPPMB = internal::Vector_property_map<Point>;
|
||||
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
|
||||
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
|
||||
|
||||
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
||||
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
||||
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
||||
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
|
||||
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
|
||||
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
||||
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
|
||||
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
|
||||
|
||||
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
||||
CGAL::Tag_true /*external pmaps*/,
|
||||
|
|
@ -236,7 +236,7 @@ public:
|
|||
:
|
||||
m_sq_alpha(square(alpha)),
|
||||
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
||||
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ void test_points_API(const std::string& ps_filename,
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
const std::string tm_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/polygon_mesh.off"); // mesh
|
||||
const std::string tm_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/building.off"); // mesh
|
||||
const std::string ts_filename = (argc > 2) ? argv[2] : CGAL::data_file_path("meshes/oblong-shuffled.off"); // triangle soup
|
||||
const std::string ss_filename = (argc > 3) ? argv[3] : CGAL::data_file_path("images/420.polylines.txt"); // segment soup
|
||||
const std::string ps_filename = (argc > 4) ? argv[4] : CGAL::data_file_path("points_3/b9_training.ply"); // point set
|
||||
|
|
|
|||
|
|
@ -588,31 +588,31 @@ struct Face_filtered_graph
|
|||
return selected_halfedges.count();
|
||||
}
|
||||
|
||||
Property_map_binder<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
|
||||
Compose_property_map<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
|
||||
get_face_index_map() const
|
||||
{
|
||||
is_imap_in_use.set(0);
|
||||
initialize_face_indices();
|
||||
|
||||
return bind_property_maps(fimap, make_property_map(face_indices));
|
||||
return make_compose_property_map(fimap, make_property_map(face_indices));
|
||||
}
|
||||
|
||||
Property_map_binder<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
|
||||
Compose_property_map<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
|
||||
get_vertex_index_map() const
|
||||
{
|
||||
is_imap_in_use.set(1);
|
||||
initialize_vertex_indices();
|
||||
|
||||
return bind_property_maps(vimap, make_property_map(vertex_indices) );
|
||||
return make_compose_property_map(vimap, make_property_map(vertex_indices) );
|
||||
}
|
||||
|
||||
Property_map_binder<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
|
||||
Compose_property_map<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
|
||||
get_halfedge_index_map() const
|
||||
{
|
||||
is_imap_in_use.set(2);
|
||||
initialize_halfedge_indices();
|
||||
|
||||
return bind_property_maps(himap, make_property_map(halfedge_indices) );
|
||||
return make_compose_property_map(himap, make_property_map(halfedge_indices) );
|
||||
}
|
||||
|
||||
/// returns `true` if around any vertex of a selected face there is at most a single umbrella
|
||||
|
|
@ -1322,7 +1322,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
|
|||
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::Compose_property_map<FIM,
|
||||
typename CGAL::Pointer_property_map<
|
||||
typename boost::property_traits<FIM>::value_type>::type> type;
|
||||
typedef type const_type;
|
||||
|
|
@ -1334,7 +1334,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
|
|||
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::Compose_property_map<VIM,
|
||||
typename CGAL::Pointer_property_map<
|
||||
typename boost::property_traits<VIM>::value_type>::type> type;
|
||||
typedef type const_type;
|
||||
|
|
@ -1346,7 +1346,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
|
|||
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::Compose_property_map<HIM,
|
||||
typename CGAL::Pointer_property_map<
|
||||
typename boost::property_traits<HIM>::value_type>::type> type;
|
||||
typedef type const_type;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
#include <CGAL/iterator.h>
|
||||
#include <CGAL/Kernel_traits.h>
|
||||
#include <CGAL/Origin.h>
|
||||
#include <CGAL/iterator.h>
|
||||
#include <CGAL/Default.h>
|
||||
#include <CGAL/Named_function_parameters.h>
|
||||
#include <CGAL/property_map.h>
|
||||
|
||||
|
|
@ -276,34 +278,37 @@ public:
|
|||
typedef typename CGAL::Identity_property_map<const Dummy_point> const_type;
|
||||
};
|
||||
|
||||
template <class PointRange, class NamedParameters, typename NP_TAG = internal_np::point_t>
|
||||
template <class PointRange, class NamedParameters, class PointMap = Default, class NormalMap = Default>
|
||||
struct Point_set_processing_3_np_helper
|
||||
{
|
||||
typedef typename std::iterator_traits<typename PointRange::iterator>::value_type Value_type;
|
||||
typedef CGAL::Identity_property_map<Value_type> DefaultPMap;
|
||||
typedef CGAL::Identity_property_map<const Value_type> DefaultConstPMap;
|
||||
typedef typename Default::Get<PointMap, CGAL::Identity_property_map<Value_type>>::type DefaultPMap;
|
||||
typedef typename Default::Get<PointMap, CGAL::Identity_property_map<const Value_type>>::type DefaultConstPMap;
|
||||
|
||||
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
|
||||
NamedParameters,
|
||||
DefaultPMap>::type Point_map;
|
||||
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
|
||||
NamedParameters,
|
||||
DefaultConstPMap>::type Const_point_map;
|
||||
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
|
||||
NamedParameters,DefaultPMap> ::type Point_map; // public
|
||||
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
|
||||
NamedParameters,DefaultConstPMap> ::type Const_point_map; // public
|
||||
|
||||
typedef typename boost::property_traits<Point_map>::value_type Point;
|
||||
typedef typename Kernel_traits<Point>::Kernel Default_geom_traits;
|
||||
|
||||
typedef typename internal_np::Lookup_named_param_def<internal_np::geom_traits_t,
|
||||
typedef typename internal_np::Lookup_named_param_def <
|
||||
internal_np::geom_traits_t,
|
||||
NamedParameters,
|
||||
Default_geom_traits>::type Geom_traits;
|
||||
Default_geom_traits
|
||||
> ::type Geom_traits; // public
|
||||
|
||||
typedef typename Geom_traits::FT FT;
|
||||
typedef typename Geom_traits::FT FT; // public
|
||||
|
||||
typedef Constant_property_map<Value_type, typename Geom_traits::Vector_3> DummyNormalMap;
|
||||
typedef typename Default::Get<NormalMap, DummyNormalMap>::type DefaultNMap;
|
||||
|
||||
typedef typename internal_np::Lookup_named_param_def<internal_np::normal_t,
|
||||
typedef typename internal_np::Lookup_named_param_def<
|
||||
internal_np::normal_t,
|
||||
NamedParameters,
|
||||
DummyNormalMap>::type Normal_map;
|
||||
DefaultNMap
|
||||
> ::type Normal_map; // public
|
||||
|
||||
static Point_map get_point_map(PointRange&, const NamedParameters& np)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -737,7 +737,7 @@ namespace CGAL {
|
|||
/*! determines whether two polygons intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container>
|
||||
|
|
@ -755,7 +755,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
|||
* bso_ssectraits_sel for more information.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container, typename UsePolylines>
|
||||
|
|
@ -766,7 +766,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
|||
/*! determines whether two polygons intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container>
|
||||
|
|
@ -785,7 +785,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
|||
* information.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container, typename UsePolylines>
|
||||
|
|
@ -796,7 +796,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
|||
/*! determines whether two polygons intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container>
|
||||
|
|
@ -815,7 +815,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
|||
* information.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container, typename UsePolylines>
|
||||
|
|
@ -826,7 +826,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
|||
/*! determines whether two polygons with holes intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container>
|
||||
|
|
@ -844,7 +844,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
|||
* \ref bso_ssectraits_sel for more information.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Kernel, typename Container, typename UsePolylines>
|
||||
|
|
@ -855,7 +855,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
|||
/*! determines whether two general polygons intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `%ArrTraits` must be a model of the concept
|
||||
* `ArrangementDirectionalXMonotoneTraits_2`.
|
||||
|
|
@ -867,7 +867,7 @@ bool do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
|||
/*! determines whether two general polygons intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `%ArrTraits` must be a model of the concept
|
||||
* `ArrangementDirectionalXMonotoneTraits_2`.
|
||||
|
|
@ -880,7 +880,7 @@ do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
|||
/*! determines whether two general polygons intersect in their interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `%ArrTraits` must be a model of the concept
|
||||
* `ArrangementDirectionalXMonotoneTraits_2`.
|
||||
|
|
@ -893,7 +893,7 @@ bool do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits
|
|||
* interior.
|
||||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
*/
|
||||
template <typename Polygon>
|
||||
|
|
@ -1001,7 +1001,7 @@ bool do_intersect(InputIterator1 begin1, InputIterator1 end1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
*/
|
||||
|
|
@ -1014,7 +1014,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
*/
|
||||
|
|
@ -1028,7 +1028,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
*/
|
||||
|
|
@ -1041,7 +1041,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
*/
|
||||
|
|
@ -1054,7 +1054,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
* \pre `%ArrTraits` must be a model of the concept
|
||||
|
|
@ -1069,7 +1069,7 @@ bool do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
* \pre `%ArrTraits` must be a model of the concept
|
||||
|
|
@ -1085,7 +1085,7 @@ do_intersect(const General_polygon_2<ArrTraits>& pgn1,
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
* \pre `%ArrTraits` must be a model of the concept
|
||||
|
|
@ -1102,7 +1102,7 @@ do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits>>& p
|
|||
* \param pgn1 the 1st input polygon.
|
||||
* \param pgn2 the 2nd input polygon.
|
||||
* \param traits a traits object.
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
|
||||
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
|
||||
* otherwise.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
|
||||
|
|
|
|||
|
|
@ -41,6 +41,23 @@ plane_from_points(const typename R::Point_3 &p,
|
|||
return PlaneC3<R>(a, b, c, d);
|
||||
}
|
||||
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_LARGE_INLINE
|
||||
PlaneC3<R>
|
||||
plane_from_points(Origin,
|
||||
const typename R::Point_3 &q,
|
||||
const typename R::Point_3 &r)
|
||||
{
|
||||
typename R::FT a, b, c, d(0);
|
||||
plane_from_pointsC3( /* origin, */
|
||||
q.x(), q.y(), q.z(),
|
||||
r.x(), r.y(), r.z(),
|
||||
a, b, c);
|
||||
return PlaneC3<R>(a, b, c, d);
|
||||
}
|
||||
|
||||
|
||||
template <class R>
|
||||
CGAL_KERNEL_LARGE_INLINE
|
||||
PlaneC3<R>
|
||||
|
|
|
|||
|
|
@ -240,6 +240,22 @@ plane_from_pointsC3(const FT &px, const FT &py, const FT &pz,
|
|||
pd = - pa*rx - pb*ry - pc*rz;
|
||||
}
|
||||
|
||||
|
||||
template <class FT>
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
void
|
||||
plane_from_pointsC3( /* origin */
|
||||
const FT &qx, const FT &qy, const FT &qz,
|
||||
const FT &rx, const FT &ry, const FT &rz,
|
||||
FT &pa, FT &pb, FT &pc /* , zero */ )
|
||||
{
|
||||
pa = qy*rz - ry*qz;
|
||||
pb = qz*rx - rz*qx;
|
||||
pc = qx*ry - rx*qy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template <class FT>
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
void
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Data structures specialized to classify clusters.
|
|||
\cgalPkgPicture{data_classif.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Simon Giraudot, Florent Lafarge}
|
||||
\cgalPkgAuthors{Simon Giraudot and Florent Lafarge}
|
||||
\cgalPkgDesc{This component implements an algorithm that classifies a data set into a user-defined set of labels (such as ground, vegetation, buildings, etc.). A flexible API is provided so that users can classify any type of data, compute their own local features on the input data set, and define their own labels.}
|
||||
\cgalPkgManuals{Chapter_Classification, PkgClassificationRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ typedef Point_set::Property_map<int> Imap;
|
|||
typedef Point_set::Property_map<unsigned char> UCmap;
|
||||
|
||||
|
||||
typedef CGAL::Shape_detection::Point_set::Sphere_neighbor_query<Kernel, Point_set, Pmap> Neighbor_query;
|
||||
typedef CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region<Kernel, Point_set, Pmap, Vmap> Region_type;
|
||||
typedef CGAL::Shape_detection::Region_growing<Point_set, Neighbor_query, Region_type> Region_growing;
|
||||
typedef CGAL::Shape_detection::Point_set::Sphere_neighbor_query_for_point_set<Point_set> Neighbor_query;
|
||||
typedef CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region_for_point_set<Point_set> Region_type;
|
||||
typedef CGAL::Shape_detection::Region_growing<Neighbor_query, Region_type> Region_growing;
|
||||
|
||||
namespace Classification = CGAL::Classification;
|
||||
namespace Feature = CGAL::Classification::Feature;
|
||||
|
|
@ -111,25 +111,24 @@ int main (int argc, char** argv)
|
|||
const double max_accepted_angle = 25.0;
|
||||
const std::size_t min_region_size = 10;
|
||||
|
||||
Neighbor_query neighbor_query (
|
||||
pts,
|
||||
search_sphere_radius,
|
||||
pts.point_map());
|
||||
Region_type region_type (
|
||||
pts,
|
||||
max_distance_to_plane, max_accepted_angle, min_region_size,
|
||||
pts.point_map(), pts.normal_map());
|
||||
Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_sphere_neighbor_query (
|
||||
pts, CGAL::parameters::sphere_radius(search_sphere_radius)
|
||||
.point_map(pts.point_map()));
|
||||
Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_region(
|
||||
pts, CGAL::parameters::maximum_distance(max_distance_to_plane)
|
||||
.maximum_angle(max_accepted_angle)
|
||||
.minimum_region_size(min_region_size));
|
||||
Region_growing region_growing (
|
||||
pts, neighbor_query, region_type);
|
||||
|
||||
std::vector<Cluster> clusters;
|
||||
region_growing.detect
|
||||
(boost::make_function_output_iterator
|
||||
([&](const std::vector<std::size_t>& region) -> void {
|
||||
([&](const std::pair<Kernel::Plane_3, std::vector<Point_set::Index>>& region) -> void {
|
||||
|
||||
// Create a new cluster.
|
||||
Classification::Cluster<Point_set, Pmap> cluster (pts, pts.point_map());
|
||||
for (const std::size_t idx : region)
|
||||
for (Point_set::Index idx : region.second)
|
||||
cluster.insert(idx);
|
||||
clusters.push_back(cluster);
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
\cgalPkgPicture{Logo-ConeSpanners.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Weisheng Si, Quincy Tse and Frédérik Paradis}
|
||||
\cgalPkgAuthors{Weisheng Si, Quincy Tse, and Frédérik Paradis}
|
||||
\cgalPkgDesc{This package provides functors for constructing two kinds of cone-based spanners:
|
||||
Yao graph and Theta graph, given a set of vertices on the plane and the directions of cone boundaries.
|
||||
Both exact and inexact constructions are supported.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -7,8 +7,8 @@
|
|||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
'5.5.1',
|
||||
'5.4.3',
|
||||
'5.5.2',
|
||||
'5.4.4',
|
||||
'5.3.2',
|
||||
'5.2.4',
|
||||
'5.1.5',
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
'5.5.1',
|
||||
'5.4.3',
|
||||
'5.5.2',
|
||||
'5.4.4',
|
||||
'5.3.2',
|
||||
'5.2.4',
|
||||
'5.1.5',
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
'5.5.1',
|
||||
'5.4.3',
|
||||
'5.5.2',
|
||||
'5.4.4',
|
||||
'5.3.2',
|
||||
'5.2.4',
|
||||
'5.1.5',
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
'5.5.1',
|
||||
'5.4.3',
|
||||
'5.5.2',
|
||||
'5.4.4',
|
||||
'5.3.2',
|
||||
'5.2.4',
|
||||
'5.1.5',
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ ALIASES = "cgal=%CGAL" \
|
|||
"cgalPkgShortInfoBegin=<div class=\"PkgShortInfo\">" \
|
||||
"cgalPkgShortInfoEnd=</div>" \
|
||||
"cgalPkgAuthor{1}=<div class=\"PkgAuthors\">\1</div>" \
|
||||
"cgalPkgAuthors{1}=<div class=\"PkgAuthors\">\1</div>" \
|
||||
"cgalPkgAuthors{1}=\cgalPkgAuthor{\1}" \
|
||||
"cgalPkgDesc{1}=<div class=\"PkgDescription\">\1</div>" \
|
||||
"cgalPkgSince{1}=<B>Introduced in:</B> \cgal \1<BR>" \
|
||||
"cgalPkgDependsOn{1}=<B>Depends on:</B> \1 <BR>" \
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
var all_versions = [
|
||||
'master',
|
||||
'latest',
|
||||
'5.5.1',
|
||||
'5.4.3',
|
||||
'5.5.2',
|
||||
'5.4.4',
|
||||
'5.3.2',
|
||||
'5.2.4',
|
||||
'5.1.5',
|
||||
|
|
|
|||
|
|
@ -38,13 +38,6 @@
|
|||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
#include <boost/preprocessor/facilities/expand.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
|
|
@ -797,13 +790,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// Macro helpers to build the kernel objects
|
||||
#define CGAL_PARAM(z, n, t) std::declval<t##n>()
|
||||
#define CGAL_TYPEMAP_AC(z, n, t) typedef typename Type_mapper< t##n, LK, AK >::type A##n;
|
||||
#define CGAL_TYPEMAP_EC(z, n, t) typedef typename Type_mapper< t##n, LK, EK >::type E##n;
|
||||
#define CGAL_LEXACT(z,n,t) CGAL::exact( l##n )
|
||||
#define CGAL_LARGS(z, n, t) L##n const& l##n
|
||||
|
||||
#undef CGAL_LAZY_PRINT_TYPEID
|
||||
|
||||
template < typename K1, typename K2 >
|
||||
|
|
@ -1973,16 +1959,12 @@ struct Lazy_construction_variant {
|
|||
// you are on your own
|
||||
};
|
||||
|
||||
#define CGAL_RESULT(z, n, d) \
|
||||
template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) > \
|
||||
struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> { \
|
||||
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T) \
|
||||
typedef typename Type_mapper< \
|
||||
decltype(std::declval<AC>()(BOOST_PP_ENUM(n, CGAL_PARAM, A))), AK, LK>::type type; \
|
||||
template <typename F, class... T>
|
||||
struct result<F(T...)>
|
||||
{
|
||||
typedef typename Type_mapper<decltype(std::declval<AC>()(std::declval<typename Type_mapper<T,LK,AK>::type>()...)),AK,LK>::type type;
|
||||
};
|
||||
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
|
||||
|
||||
template <typename L1, typename L2>
|
||||
decltype(auto)
|
||||
operator()(const L1& l1, const L2& l2) const {
|
||||
|
|
@ -2120,26 +2102,23 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
|
|||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
#define CGAL_CONSTRUCTION_OPERATOR(z, n, d ) \
|
||||
template<BOOST_PP_ENUM_PARAMS(n, class L)> \
|
||||
decltype(auto) \
|
||||
operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \
|
||||
typedef Lazy< AT, ET, E2A> Handle; \
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
|
||||
{ \
|
||||
Protect_FPU_rounding<Protection> P; \
|
||||
try { \
|
||||
return result_type( Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, noprune, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
|
||||
} catch (Uncertain_conversion_exception&) {} \
|
||||
} \
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
|
||||
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); \
|
||||
return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
|
||||
template <class... L>
|
||||
decltype(auto)
|
||||
operator()(const L&... l) const {
|
||||
typedef Lazy < AT, ET, E2A > Handle;
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
{
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
return result_type(Handle(new Lazy_rep_n< AT, ET, AC, EC, E2A, noprune, L...>(ac, ec, l...)));
|
||||
} catch (Uncertain_conversion_exception&) {}
|
||||
}
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp);
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
|
||||
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST);
|
||||
return result_type(Handle(new Lazy_rep_0< AT, ET, E2A >(ec(CGAL::exact(l)...))));
|
||||
}
|
||||
|
||||
// arity 1-8
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
|
||||
|
||||
// nullary
|
||||
decltype(auto)
|
||||
|
|
@ -2149,8 +2128,6 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
|
|||
return result_type( Handle() );
|
||||
}
|
||||
|
||||
#undef CGAL_CONSTRUCTION_OPERATOR
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -2174,34 +2151,31 @@ struct Lazy_construction<LK, AC, EC, E2A_, false>
|
|||
CGAL_NO_UNIQUE_ADDRESS AC ac;
|
||||
CGAL_NO_UNIQUE_ADDRESS EC ec;
|
||||
|
||||
// acquire the result_type of the approximate kernel, map it back to the lazy kernel object
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
|
||||
template <typename F, class... T>
|
||||
struct result<F(T...)>
|
||||
{
|
||||
typedef typename Type_mapper<decltype(std::declval<AC>()(std::declval<typename Type_mapper<T,LK,AK>::type>()...)),AK,LK>::type type;
|
||||
};
|
||||
|
||||
#define CGAL_CONSTRUCTION_OPERATOR(z, n, d) \
|
||||
template<BOOST_PP_ENUM_PARAMS(n, class L)> \
|
||||
decltype(auto) \
|
||||
operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \
|
||||
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L) \
|
||||
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L) \
|
||||
typedef typename Type_mapper<decltype(std::declval<EC>()(BOOST_PP_ENUM(n, CGAL_PARAM, E))),EK,EK>::type ET; \
|
||||
typedef typename Type_mapper<decltype(std::declval<AC>()(BOOST_PP_ENUM(n, CGAL_PARAM, A))),AK,AK>::type AT; \
|
||||
typedef Lazy< AT, ET, E2A> Handle; \
|
||||
typedef typename result<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type result_type; \
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
|
||||
{ \
|
||||
Protect_FPU_rounding<Protection> P; \
|
||||
try { \
|
||||
return result_type( Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, noprune, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
|
||||
} catch (Uncertain_conversion_exception&) {} \
|
||||
} \
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
|
||||
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); \
|
||||
return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
|
||||
template <class... L>
|
||||
decltype(auto)
|
||||
operator()(const L&... l) const {
|
||||
typedef typename Type_mapper<decltype(std::declval<EC>()(std::declval<typename Type_mapper<L, LK, EK>::type>()...)),EK,EK>::type ET;
|
||||
typedef typename Type_mapper<decltype(std::declval<AC>()(std::declval<typename Type_mapper<L, LK, AK>::type>()...)),AK,AK>::type AT;
|
||||
typedef Lazy<AT, ET, E2A> Handle;
|
||||
typedef typename result<Lazy_construction(L...)>::type result_type;
|
||||
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
|
||||
{
|
||||
Protect_FPU_rounding<Protection> P;
|
||||
try {
|
||||
return result_type(Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, noprune, L...> (ac, ec, l...)));
|
||||
} catch (Uncertain_conversion_exception&) {}
|
||||
}
|
||||
CGAL_BRANCH_PROFILER_BRANCH(tmp);
|
||||
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
|
||||
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST);
|
||||
return result_type(Handle(new Lazy_rep_0<AT, ET, E2A> (ec(CGAL::exact(l)...))));
|
||||
}
|
||||
|
||||
// arity 1-8
|
||||
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
|
||||
|
||||
// nullary
|
||||
decltype(auto)
|
||||
|
|
@ -2218,10 +2192,6 @@ struct Lazy_construction<LK, AC, EC, E2A_, false>
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
#undef CGAL_TYPEMAP_AC
|
||||
#undef CGAL_TYPEMAP_EC
|
||||
#undef CGAL_LEXACT
|
||||
#undef CGAL_LARGS
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
\cgalPkgPicture{heat-method-small.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Keenan Crane, Christina Vaz, Andreas Fabri}
|
||||
\cgalPkgAuthors{Keenan Crane, Christina Vaz, and Andreas Fabri}
|
||||
\cgalPkgDesc{The package provides an algorithm that solves the single- or
|
||||
multiple-source shortest path problem by returning an approximation of the geodesic distance
|
||||
for all vertices of a triangle mesh to the closest vertex in a given set of
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public:
|
|||
PlaneH3() {}
|
||||
|
||||
PlaneH3(const Point_3&, const Point_3&, const Point_3& );
|
||||
PlaneH3(Origin, const Point_3&, const Point_3& );
|
||||
PlaneH3(const RT& a, const RT& b,
|
||||
const RT& c, const RT& d );
|
||||
PlaneH3(const Point_3&, const Ray_3& );
|
||||
|
|
@ -175,6 +176,16 @@ PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
|
|||
const typename PlaneH3<R>::Point_3& r)
|
||||
{ new_rep(p,q,r); }
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
PlaneH3<R>::PlaneH3(Origin,
|
||||
const typename PlaneH3<R>::Point_3& q,
|
||||
const typename PlaneH3<R>::Point_3& r)
|
||||
{
|
||||
typename PlaneH3<R>::Point_3 p(0,0,0);
|
||||
new_rep(p,q,r);
|
||||
}
|
||||
|
||||
template < class R >
|
||||
CGAL_KERNEL_INLINE
|
||||
PlaneH3<R>::PlaneH3(const RT& a, const RT& b,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
\cgalPkgPicture{Hyperbolic_triangulation_2/fig/ht-120px.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Mikhail Bogdanov, Iordan Iordanov, and Monique Teillaud}
|
||||
\cgalPkgAuthors{Mikhail Bogdanov, Iordan Iordanov, and Monique Teillaud}
|
||||
\cgalPkgDesc{This package enables building and handling Delaunay triangulations of point sets
|
||||
in the Poincaré disk model of the hyperbolic plane. Triangulations are built incrementally and can be modified by insertion
|
||||
and removal of vertices; point location facilities are also offered, as well as primitives to
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ Release date: June 2023
|
|||
`CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`, and `CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()`
|
||||
which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters.
|
||||
|
||||
- added functions `CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces()` and `CGAL::Polygon_mesh_processing::detect_corners_of_regions()`
|
||||
that allow to have a partition into planar regions of a mesh using the region growing algorithm from the [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) package.
|
||||
|
||||
- Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh following the
|
||||
CGAL tetrahedral Delaunay refinement algorithm.
|
||||
|
||||
- Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh using
|
||||
the Delaunay refinement algorithm from the 3D Mesh Generation package.
|
||||
|
||||
|
|
@ -32,6 +38,26 @@ Release date: June 2023
|
|||
|
||||
- This new package wraps all the existing code that deals with a `MeshComplex_3InTriangulation_3` to describe 3D simplicial meshes, and makes the data structure independent from the tetrahedral mesh generation package.
|
||||
|
||||
### [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) (breaking change, major changes)
|
||||
|
||||
- **Breaking change**: The region growing part of the package have been reworked to fix design issues introduced with the handling `FaceGraph` models.
|
||||
In particular, the notion of `Item` has been introduced to reference an element in the input range of elements. Region maps now operates on `Item` and no longer on the value type
|
||||
of the input range.
|
||||
- **Breaking change**: The method `update()` in the concept `RegionType` returns now
|
||||
a `boolean` instead of `void` that is used inside the class `Region_growing` for detecting if
|
||||
the input conditions for the new region are satisfied. This change affects only user-defined
|
||||
types of regions.
|
||||
- **Breaking change**: The constructors of all models used together with the region growing algorithm now enable users
|
||||
to provide parameters through the named parameters mechanism.
|
||||
- All fitting classes in the region growing framework are now using better versions of the region
|
||||
conditions, more precise and faster, including the correct normal orientations.
|
||||
- Added new models of the concept `RegionType` for getting linear regions in a set of 2D and 3D
|
||||
segments and on 2D and 3D polylines.
|
||||
- Added the `Polyline_graph` class for extracting a set of polylines from a face graph, which splits
|
||||
this graph into a set of user-defined regions.
|
||||
- Added new shapes to the Region Growing algorithm on a point set: circles in 2D, spheres in 3D,
|
||||
and cylinders in 3D.
|
||||
|
||||
### [2D Arrangements](https://doc.cgal.org/5.6/Manual/packages.html#PkgArrangementOnSurface2)
|
||||
- Fixed some code that handles geodesic-curves on spheres that compare x- and y-coordinates on the boundary of the parameter space. It mainly effected the naive point-location.
|
||||
|
||||
|
|
|
|||
|
|
@ -2044,6 +2044,10 @@ namespace CommonKernelFunctors {
|
|||
operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r) const
|
||||
{ return Rep(p, q, r); }
|
||||
|
||||
Rep // Plane_3
|
||||
operator()(Return_base_tag, Origin o, const Point_3& q, const Point_3& r) const
|
||||
{ return Rep(o, q, r); }
|
||||
|
||||
Rep // Plane_3
|
||||
operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const
|
||||
{ return Rep(p, d); }
|
||||
|
|
|
|||
|
|
@ -73,6 +73,9 @@ public:
|
|||
Plane_3(const Point_3& p, const Point_3& q, const Point_3& r)
|
||||
: Rep(typename R::Construct_plane_3()(Return_base_tag(), p, q, r)) {}
|
||||
|
||||
Plane_3(Origin o, const Point_3& q, const Point_3& r)
|
||||
: Rep(typename R::Construct_plane_3()(Return_base_tag(), o, q, r)) {}
|
||||
|
||||
Plane_3(const Point_3& p, const Direction_3& d)
|
||||
: Rep(typename R::Construct_plane_3()(Return_base_tag(), p, d)) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
'''Python module to create and publish CGAL releases from a branch'''
|
||||
|
||||
import os
|
||||
|
||||
class Release:
|
||||
'''class to create a CGAL release from a branch
|
||||
optionally, the release can be internal
|
||||
'''
|
||||
|
||||
def __init__(self, branch, internal=False) :
|
||||
self.branch = branch
|
||||
self.internal = internal
|
||||
self.cwd = f'$HOME/CGAL/create_internal_release-{self.branch}-branch'
|
||||
self.repo = f'$HOME/CGAL/branches/CGAL-{self.branch}-branch.git'
|
||||
self.extra_options = ' --public'
|
||||
|
||||
def command(self):
|
||||
'''return the command to create and publish the release'''
|
||||
return f"PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin; cd {self.cwd} && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release {self.repo}{self.extra_options} --do-it"
|
||||
|
||||
def __str__(self) :
|
||||
msg = f"{'internal ' if self.internal else ''}release from {self.branch}\n" \
|
||||
f"cwd: {self.cwd}\nrepo: {self.repo}\n" \
|
||||
f"command:\n{self.command()}"
|
||||
return msg
|
||||
|
||||
def __call__(self) :
|
||||
if os.system(self.command()) != 0 :
|
||||
raise RuntimeError(f"Error while creating {'internal ' if self.internal else ''}release from {self.branch}")
|
||||
|
||||
INTERNAL = True
|
||||
|
||||
class InternalRelease(Release) :
|
||||
'''class to create an internal CGAL release from a branch'''
|
||||
def __init__(self, branch) :
|
||||
super().__init__(branch, Release.INTERNAL)
|
||||
self.extra_options = ' --integration'
|
||||
|
||||
integration = InternalRelease("integration")
|
||||
integration.repo = '$HOME/CGAL/branches/integration.git'
|
||||
integration.cwd = '$HOME/CGAL/create_internal_release'
|
||||
master = Release("master")
|
||||
master.repo = '$HOME/CGAL/branches/master.git'
|
||||
master.cwd = '$HOME/CGAL/create_internal_release'
|
||||
|
||||
def release(branch) :
|
||||
'''Convenience function to create a release from a branch'''
|
||||
return Release(branch)
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("This file is a Python module. Use create_internal_release_of_the_day.py instead.")
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#! /bin/python3
|
||||
|
||||
'''This script is called by a cron job every day.
|
||||
It creates and publish a release tarball.
|
||||
'''
|
||||
|
||||
import sys
|
||||
import os
|
||||
import datetime
|
||||
import locale
|
||||
from pathlib import Path
|
||||
sys.path.append(Path(__file__))
|
||||
from cgal_release import release, integration, master
|
||||
|
||||
# Define a dictionary that maps day of the week to an action
|
||||
actions = {
|
||||
"Monday": integration,
|
||||
"Tuesday": integration,
|
||||
"Wednesday": integration,
|
||||
"Thursday": integration,
|
||||
"Friday": release("5.5"),
|
||||
"Saturday": release("5.4"),
|
||||
"Sunday": master
|
||||
}
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Get the current day of the week, or get it from the command line
|
||||
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
|
||||
try:
|
||||
DAY_OF_THE_WEEK = sys.argv[1]
|
||||
except IndexError:
|
||||
DAY_OF_THE_WEEK = datetime.datetime.now().strftime("%A")
|
||||
|
||||
# Look up the action for the current day of the week in the dictionary
|
||||
create_release = actions[DAY_OF_THE_WEEK]
|
||||
|
||||
# Then create the release tarball
|
||||
if os.system(create_release.command()) != 0 :
|
||||
raise RuntimeError(f"ERROR while creating release tarball")
|
||||
|
|
@ -16,19 +16,19 @@ LC_CTYPE=en_US.UTF-8
|
|||
5,15,25,35,45,55 * * * * cd $HOME/CGAL/collect_and_public_testresults; ./treat_result_collection || echo ERROR
|
||||
|
||||
# Create internal release
|
||||
# The script also updates the manual tools.
|
||||
|
||||
# "master" alone
|
||||
0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --public || echo ERROR
|
||||
# "integration"
|
||||
0 21 * * Mon,Tue,Wed cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR
|
||||
# from branch 5.5
|
||||
0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.5-branch.git --public --do-it || echo ERROR
|
||||
# from branch 5.4
|
||||
0 21 * * Sat,Thu cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR
|
||||
|
||||
0 21 * * * python3 /home/lrineau/CGAL/branches/local-master.git/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py
|
||||
|
||||
## Older stuff
|
||||
|
||||
## "master" alone
|
||||
#0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --public || echo ERROR
|
||||
## "integration"
|
||||
#0 21 * * Mon,Tue,Wed cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR
|
||||
## from branch 5.5
|
||||
#0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.5-branch.git --public --do-it || echo ERROR
|
||||
## from branch 5.4
|
||||
#0 21 * * Sat,Thu cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR
|
||||
|
||||
# from branch 5.3
|
||||
#0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.3-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.3-branch.git --public --do-it || echo ERROR
|
||||
# from branch 5.2
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
\cgalPkgDescriptionBegin{3D Mesh Generation,PkgMesh3}
|
||||
\cgalPkgPicture{Mesh_3/fig/multilabel_mesher_small.jpg}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Clément Jamin, Laurent Rineau, Stéphane Tayeb, Jane Tournois, Mariette Yvinec}
|
||||
\cgalPkgAuthors{Pierre Alliez, Clément Jamin, Laurent Rineau, Stéphane Tayeb, Jane Tournois, and Mariette Yvinec}
|
||||
\cgalPkgDesc{This package is devoted to the generation of isotropic simplicial meshes discretizing 3D domains. The domain to be meshed is a region of 3D space that has to be bounded. The region may be connected or composed of multiple components and/or subdivided in several subdomains. The domain is input as an oracle able to answer queries, of a few different types, on the domain. Boundary and subdivision surfaces are either smooth or piecewise smooth surfaces, formed with planar or curved surface patches. Surfaces may exhibit 1-dimensional features (e.g. crease edges) and 0-dimensional features (e.g. singular points as corners tips, cusps or darts), that have to be fairly approximated in the mesh. Optionally, the algorithms support multi-core shared-memory architectures to take advantage of available parallelism.}
|
||||
\cgalPkgManuals{Chapter_3D_Mesh_Generation,PkgMesh3Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace CGAL {
|
|||
* \note This function requires the \ref thirdpartyEigen library.
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Mesh_optimization_return_code lloyd_optimize_mesh_3(C3T3& c3t3, MeshDomain& domain,const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
Mesh_optimization_return_code lloyd_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain,const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -153,7 +153,7 @@ template<typename C3T3, typename MeshDomain,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
Mesh_optimization_return_code lloyd_optimize_mesh_3(C3T3& c3t3,MeshDomain& domain, const CGAL_NP_CLASS_1& np1, const CGAL_NP_CLASS_2& np2, const NP& ... nps)
|
||||
Mesh_optimization_return_code lloyd_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS_1& np1, const CGAL_NP_CLASS_2& np2, const NP& ... nps)
|
||||
{
|
||||
return lloyd_optimize_mesh_3(c3t3,domain, internal_np::combine_named_parameters(np1, np2, nps...));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ struct C3t3_initializer < C3T3, MD, MC, true, CGAL::Tag_false >
|
|||
* \sa `odt_optimize_mesh_3()`
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
C3T3 make_mesh_3(MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
C3T3 make_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -443,7 +443,7 @@ template<typename C3T3, typename MeshDomain, typename MeshCriteria,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
C3T3 make_mesh_3(MeshDomain& domain, MeshCriteria& criteria,
|
||||
C3T3 make_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ namespace CGAL {
|
|||
* \sa `CGAL::lloyd_optimize_mesh_3()`
|
||||
*/
|
||||
template<typename C3T3,typename MeshDomain,typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Mesh_optimization_return_code odt_optimize_mesh_3(C3T3& c3t3, MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
Mesh_optimization_return_code odt_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -148,7 +148,7 @@ template<typename C3T3, typename MeshDomain,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
Mesh_optimization_return_code odt_optimize_mesh_3(C3T3& c3t3, MeshDomain& domain,
|
||||
Mesh_optimization_return_code odt_optimize_mesh_3(C3T3& c3t3, const MeshDomain& domain,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ namespace CGAL {
|
|||
*
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Mesh_optimization_return_code perturb_mesh_3(C3T3& c3t3, MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
Mesh_optimization_return_code perturb_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -120,7 +120,7 @@ template<typename C3T3, typename MeshDomain,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
Mesh_optimization_return_code perturb_mesh_3(C3T3& c3t3, MeshDomain& domain,
|
||||
Mesh_optimization_return_code perturb_mesh_3(C3T3& c3t3, const MeshDomain& domain,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ private:
|
|||
* \sa `CGAL::parameters::no_odt()`
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
void refine_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
void refine_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -291,7 +291,7 @@ template<typename C3T3, typename MeshDomain, typename MeshCriteria,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
void refine_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria,
|
||||
void refine_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace CGAL {
|
|||
\ingroup PkgMinkowskiSum2Ref
|
||||
|
||||
The `Polygon_vertical_decomposition_2` class implements a convex
|
||||
decompistion of a polygon or a polygon with holes into pseudo trapezoids
|
||||
decomposition of a polygon or a polygon with holes into pseudo trapezoids
|
||||
utilizing the CGAL::decompose() free function of the
|
||||
\ref chapterArrangement_on_surface_2 "2D Arrangements" package.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
\cgalPkgDescriptionBegin{2D Minkowski Sums,PkgMinkowskiSum2}
|
||||
\cgalPkgPicture{Minkowski_sum_2/fig/Minkowski_sum_2.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Ron Wein, Alon Baram, Eyal Flato, Efi Fogel, Michael Hemmer, Sebastian Morr}
|
||||
\cgalPkgAuthors{Ron Wein, Alon Baram, Eyal Flato, Efi Fogel, Michael Hemmer, and Sebastian Morr}
|
||||
\cgalPkgDesc{This package consists of functions that compute the Minkowski sum of two simple straight-edge polygons in the plane. It also contains functions for computing the Minkowski sum of a polygon and a disc, an operation known as <I>offsetting</I> or <I>dilating</I> a polygon. The package can compute the exact representation of the offset polygon, or provide a guaranteed approximation of the offset.}
|
||||
\cgalPkgManuals{Chapter_2D_Minkowski_Sums,PkgMinkowskiSum2Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ static const char* strategy_names[] = {
|
|||
"small-side angle-bisector decomposition",
|
||||
"optimal convex decomposition",
|
||||
"Hertel-Mehlhorn decomposition",
|
||||
"Greene decomosition",
|
||||
"Greene decomposition",
|
||||
"Triangulation",
|
||||
"Vertical decomosition"
|
||||
"Vertical decomposition"
|
||||
};
|
||||
|
||||
Polygon_with_holes_2 compute_minkowski_sum_2(Polygon_2& p, Polygon_2& q,
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ check_boundary_is_clockwise_weakly_polygon() const
|
|||
} while (hvit != hend);
|
||||
// now e_boundary_at_v_min is highest starting edge in bundle!!
|
||||
|
||||
int winding_around_globally=0;
|
||||
CGAL_assertion_code(int winding_around_globally=0);
|
||||
Halfedge_around_face_const_circulator
|
||||
hfit(e_boundary_at_v_min),hstart(hfit);
|
||||
Halfedge_const_handle e_prev = next(e_boundary_at_v_min);
|
||||
|
|
@ -229,7 +229,7 @@ check_boundary_is_clockwise_weakly_polygon() const
|
|||
Direction d_prev = direction(e_prev);
|
||||
CGAL_For_all_backwards(hstart,hfit) {
|
||||
Direction d_curr = direction(hfit);
|
||||
if ( d_curr < d_prev ) ++winding_around_globally;
|
||||
CGAL_assertion_code(if ( d_curr < d_prev ) ++winding_around_globally);
|
||||
d_prev = d_curr;
|
||||
}
|
||||
CGAL_assertion(winding_around_globally == 1);
|
||||
|
|
@ -262,10 +262,10 @@ check_is_triangulation() const
|
|||
for( eit = this->halfedges_begin(); eit != this->halfedges_end(); ++eit) {
|
||||
if (on_boundary[eit]) continue;
|
||||
hit = hend = eit;
|
||||
int edges_in_face_cycle=0;
|
||||
CGAL_assertion_code(int edges_in_face_cycle=0);
|
||||
CGAL_For_all(hit,hend) {
|
||||
error_status << PE(hit);
|
||||
++edges_in_face_cycle;
|
||||
CGAL_assertion_code(++edges_in_face_cycle);
|
||||
}
|
||||
CGAL_assertion_msg(edges_in_face_cycle==3,error_status.str().c_str());
|
||||
CGAL_assertion_msg(
|
||||
|
|
|
|||
|
|
@ -23,13 +23,11 @@
|
|||
#include <CGAL/Nef_3/SNC_iteration.h>
|
||||
#include <CGAL/Lazy_kernel.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
|
||||
#include <boost/container/deque.hpp>
|
||||
|
||||
|
||||
#include <deque>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#undef CGAL_NEF_DEBUG
|
||||
#define CGAL_NEF_DEBUG 503
|
||||
|
|
|
|||
|
|
@ -299,13 +299,13 @@ check_integrity_and_topological_planarity(bool faces) const
|
|||
EI(shalfedges_begin(),shalfedges_end(),'e');
|
||||
#endif
|
||||
SVertex_const_handle v;
|
||||
int iso_vert_num=0;
|
||||
CGAL_assertion_code(int iso_vert_num=0);
|
||||
/* check the source links of out edges and count isolated vertices */
|
||||
CGAL_forall_svertices(v,*this) {
|
||||
if ( is_isolated(v) ) {
|
||||
if ( faces )
|
||||
CGAL_assertion_msg(v->incident_sface() != SFace_const_handle(), get_svertex_index(v).c_str());
|
||||
++iso_vert_num;
|
||||
CGAL_assertion_code(++iso_vert_num);
|
||||
} else {
|
||||
CGAL_assertion_code(SHalfedge_const_handle e=first_out_edge(v));
|
||||
CGAL_assertion_msg(e != SHalfedge_const_handle(), get_svertex_index(v).c_str());
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ Sphere_circle() : Base() {}
|
|||
/*{\Mcreate creates some great circle.}*/
|
||||
|
||||
Sphere_circle(const Sphere_point<R>& p, const Sphere_point<R>&q)
|
||||
: Base(Point_3(0,0,0),p,q)
|
||||
: Base(CGAL::ORIGIN,p,q)
|
||||
/*{\Mcreate creates a great circle through $p$ and $q$. If $p$ and
|
||||
$q$ are not antipodal on $S_2$, then this circle is unique and oriented
|
||||
such that a walk along |\Mvar| meets $p$ just before the shorter segment
|
||||
|
|
@ -104,9 +104,9 @@ Sphere_circle(Sphere_circle<R> c, const Sphere_point<R>& p)
|
|||
{ CGAL_assertion(!c.has_on(p));
|
||||
if ( c.has_on_negative_side(p) ) c=c.opposite();
|
||||
if ( p == c.orthogonal_pole() )
|
||||
*this = Sphere_circle<R>(Base(Point_3(0,0,0),p,CGAL::ORIGIN+c.base1()));
|
||||
*this = Sphere_circle<R>(Base(CGAL::ORIGIN,p,CGAL::ORIGIN+c.base1()));
|
||||
else
|
||||
*this = Sphere_circle<R>(Base(Point_3(0,0,0),p,c.orthogonal_pole()));
|
||||
*this = Sphere_circle<R>(Base(CGAL::ORIGIN,p,c.orthogonal_pole()));
|
||||
}
|
||||
|
||||
/*{\Moperations 4 2}*/
|
||||
|
|
|
|||
|
|
@ -51,14 +51,14 @@ Sphere_direction(const Sphere_circle<R>& c)
|
|||
: Base(c) {}
|
||||
|
||||
Sphere_direction(const Sphere_point<R>& p, const Sphere_point<R>&q)
|
||||
: Base(Point_3(0,0,0),p,q)
|
||||
: Base(CGAL::ORIGIN,p,q)
|
||||
/*{\Mcreate creates a direction that describes the orientation of
|
||||
the great circle through $p$ and $q$ (oriented such that the segment
|
||||
$pq$ is the shorter one of the two possible ones. \precond $p$ and $q$
|
||||
are not opposite on $S_2$.}*/
|
||||
{ CGAL_assertion(p!=q.opposite());
|
||||
Point_3 p1(0,0,0), p4 = CGAL::ORIGIN + ((Base*) this)->orthogonal_vector();
|
||||
if ( CGAL::orientation(p1,p,q,p4) != CGAL::POSITIVE )
|
||||
Point_3 p4 = CGAL::ORIGIN + ((Base*) this)->orthogonal_vector();
|
||||
if ( R().orientation_3_object()(CGAL::ORIGIN,p,q,p4) != CGAL::POSITIVE )
|
||||
*this = Sphere_direction(opposite());
|
||||
}
|
||||
|
||||
|
|
@ -95,18 +95,20 @@ bool strictly_ordered_ccw_at(const Sphere_point<R>& p,
|
|||
const Sphere_direction<R>& d2,
|
||||
const Sphere_direction<R>& d3)
|
||||
{ CGAL_assertion(d1.has_on(p) && d2.has_on(p) && d3.has_on(p));
|
||||
typename R::Point_3 p0(0,0,0);
|
||||
typename R::Point_3 p1(CGAL::ORIGIN + d1.orthogonal_vector());
|
||||
typename R::Point_3 p2(CGAL::ORIGIN + d2.orthogonal_vector());
|
||||
typename R::Point_3 p3(CGAL::ORIGIN + d3.orthogonal_vector());
|
||||
typedef typename R::Vector_3 Vector_3;
|
||||
Vector_3 v0 = p - CGAL::ORIGIN;
|
||||
Vector_3 v1 = d1.orthogonal_vector();
|
||||
Vector_3 v2 = d2.orthogonal_vector();
|
||||
Vector_3 v3 = d3.orthogonal_vector();
|
||||
|
||||
if ( d1 == d3 ) return false;
|
||||
if ( CGAL::orientation(p0,p,p1,p3) == CGAL::POSITIVE ) {
|
||||
return CGAL::orientation(p0,p,p1,p2) == CGAL::POSITIVE &&
|
||||
CGAL::orientation(p0,p,p3,p2) == CGAL::NEGATIVE;
|
||||
typename R::Orientation_3 orientation = R().orientation_3_object();
|
||||
if ( orientation(v0,v1,v3) == CGAL::POSITIVE ) {
|
||||
return orientation(v0,v1,v2) == CGAL::POSITIVE &&
|
||||
orientation(v0,v3,v2) == CGAL::NEGATIVE;
|
||||
} else {
|
||||
return CGAL::orientation(p0,p,p1,p2) == CGAL::POSITIVE ||
|
||||
CGAL::orientation(p0,p,p3,p2) == CGAL::NEGATIVE;
|
||||
return orientation(v0,v1,v2) == CGAL::POSITIVE ||
|
||||
orientation(v0,v3,v2) == CGAL::NEGATIVE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
\cgalPkgDescriptionBegin{Optimal Bounding Box,PkgOptimalBoundingBox}
|
||||
\cgalPkgPicture{optimal_bounding_box.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Konstantinos Katrioplas, Mael Rouxel-Labbé}
|
||||
\cgalPkgAuthors{Konstantinos Katrioplas and Mael Rouxel-Labbé}
|
||||
\cgalPkgDesc{This package provides functions to compute tight oriented bounding boxes around a point set or a polygon mesh.}
|
||||
\cgalPkgManuals{Chapter_Building_Optimal_Bounding_Box,PkgOptimalBoundingBoxRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -432,10 +432,10 @@ public:
|
|||
|
||||
m_pwsrec->list_output(std::back_inserter(isolated_points), std::back_inserter(edges));
|
||||
|
||||
int vertex_count = 0;
|
||||
CGAL_assertion_code(int vertex_count = 0);
|
||||
for (std::vector<Point>::iterator it = isolated_points.begin();
|
||||
it != isolated_points.end(); it++) {
|
||||
vertex_count++;
|
||||
CGAL_assertion_code(vertex_count++);
|
||||
std::cout << *it << std::endl;
|
||||
}
|
||||
CGAL_assertion(vertex_count == 18);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
\cgalPkgDescriptionBegin{Optimal Transportation Curve Reconstruction, PkgOptimalTransportationReconstruction2}
|
||||
\cgalPkgPicture{RS_2_small.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Pierre Alliez, David Cohen-Steiner, Fernando de Goes, Clément Jamin, Ivo Vigan}
|
||||
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Fernando de Goes, Clément Jamin, and Ivo Vigan}
|
||||
\cgalPkgDesc{This package provides an algorithm to reconstruct and simplify a shape from a point set in the plane, possibly hampered with noise and outliers. It generates as output a set of line segments and isolated points, which approximate the input point set.}
|
||||
\cgalPkgManuals{Chapter_Optimal_Transportation_Curve_Reconstruction, PkgOptimalTransportationReconstruction2Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
\cgalPkgDescriptionBegin{Quadtrees\, Octrees\, and Orthtrees,PkgOrthtree}
|
||||
\cgalPkgPicture{octree_thumbnail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Jackson Campolattaro, Simon Giraudot, Cédric Portaneri, Tong Zhao, Pierre Alliez}
|
||||
\cgalPkgAuthors{Jackson Campolattaro, Simon Giraudot, Cédric Portaneri, Tong Zhao, and Pierre Alliez}
|
||||
\cgalPkgDesc{The Orthtree package provides a data structure that subdivides space, with specializations for 2D (Quadtree) and 3D (Octree), along with a collection of algorithms for operating on these structures.}
|
||||
\cgalPkgManuals{Chapter_Orthtree,PkgOrthtreeRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ struct C3t3_initializer<C3T3, MeshDomain, MeshCriteria, true, CGAL::Tag_true>
|
|||
* \sa `odt_optimize_mesh_3()`
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
C3T3 make_periodic_3_mesh_3(MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
C3T3 make_periodic_3_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -339,7 +339,7 @@ template<typename C3T3, typename MeshDomain, typename MeshCriteria,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
C3T3 make_periodic_3_mesh_3(MeshDomain& domain, MeshCriteria& criteria,
|
||||
C3T3 make_periodic_3_mesh_3(const MeshDomain& domain, const MeshCriteria& criteria,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace CGAL {
|
|||
* Further information can be found in the documentation of the function `perturb_mesh_3()`.
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Mesh_optimization_return_code perturb_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
Mesh_optimization_return_code perturb_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -50,7 +50,7 @@ template<typename C3T3, typename MeshDomain,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
Mesh_optimization_return_code perturb_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain,
|
||||
Mesh_optimization_return_code perturb_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
@ -131,7 +131,7 @@ Mesh_optimization_return_code exude_periodic_3_mesh_3(const CGAL_NP_CLASS_1& np
|
|||
* Further information can be found in the documentation of the function `odt_optimize_mesh_3()`.
|
||||
*/
|
||||
template<typename C3T3,typename MeshDomain,typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -148,7 +148,7 @@ template<typename C3T3, typename MeshDomain,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain,
|
||||
Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
@ -180,7 +180,7 @@ Mesh_optimization_return_code odt_optimize_periodic_3_mesh_3(const CGAL_NP_CLASS
|
|||
* \note This function requires the \ref thirdpartyEigen library.
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
Mesh_optimization_return_code lloyd_optimize_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain,const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
Mesh_optimization_return_code lloyd_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain,const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -197,7 +197,7 @@ template<typename C3T3, typename MeshDomain,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
Mesh_optimization_return_code lloyd_optimize_periodic_3_mesh_3(C3T3& c3t3,MeshDomain& domain,
|
||||
Mesh_optimization_return_code lloyd_optimize_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ void project_points(C3T3& c3t3,
|
|||
* \sa `odt_optimize_periodic_3_mesh_3()`
|
||||
*/
|
||||
template<typename C3T3, typename MeshDomain, typename MeshCriteria, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
void refine_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
void refine_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
using parameters::choose_parameter;
|
||||
using parameters::get_parameter;
|
||||
|
|
@ -328,7 +328,7 @@ template<typename C3T3, typename MeshDomain, typename MeshCriteria,
|
|||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_1,
|
||||
typename CGAL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT_2,
|
||||
typename ... NP>
|
||||
void refine_periodic_3_mesh_3(C3T3& c3t3, MeshDomain& domain, MeshCriteria& criteria,
|
||||
void refine_periodic_3_mesh_3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria& criteria,
|
||||
const CGAL_NP_CLASS_1& np1,
|
||||
const CGAL_NP_CLASS_2& np2,
|
||||
const NP& ... nps)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
\cgalPkgPicture{Periodic_4_hyperbolic_triangulation_2/fig/new-triangulation-120px.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Iordan Iordanov and Monique Teillaud}
|
||||
\cgalPkgAuthors{Iordan Iordanov and Monique Teillaud}
|
||||
\cgalPkgDesc{This package enables building and handling triangulations of point sets on the two dimensional
|
||||
hyperbolic Bolza surface. Triangulations are built incrementally and can be modified by insertion or
|
||||
removal of vertices. Point location facilities are also offered. The package provides Delaunay
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
\cgalPkgDescriptionBegin{3D Point Set, PkgPointSet3}
|
||||
\cgalPkgPicture{point_set_3.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Simon Giraudot}
|
||||
\cgalPkgAuthor{Simon Giraudot}
|
||||
\cgalPkgDesc{This component provides the user with a flexible 3D point set data structure. The user can define any additional property needed such as normal vectors, colors or labels. \cgal algorithms can be easily applied to this data structure.}
|
||||
\cgalPkgManuals{Chapter_Point_Set_3, PkgPointSet3Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -35,6 +35,49 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
template <typename Point,
|
||||
typename Vector = typename Kernel_traits<Point>::Kernel::Vector_3>
|
||||
class Point_set_3;
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
namespace internal {
|
||||
template<typename Point, typename Vector>
|
||||
class Point_set_3_index
|
||||
{
|
||||
public:
|
||||
#ifdef CGAL_POINT_SET_3_USE_STD_SIZE_T_AS_SIZE_TYPE
|
||||
typedef std::size_t size_type;
|
||||
#else
|
||||
typedef boost::uint32_t size_type;
|
||||
#endif
|
||||
typedef CGAL::Point_set_3<Point, Vector> Point_set_3;
|
||||
|
||||
private:
|
||||
friend class CGAL::Point_set_3<Point, Vector>;
|
||||
friend class Properties::Property_container<Point_set_3, Point_set_3_index>;
|
||||
template <class> friend class Properties::Property_array;
|
||||
template <class> friend struct Property_map;
|
||||
friend class std::vector<Point_set_3_index>;
|
||||
size_type value;
|
||||
|
||||
public:
|
||||
Point_set_3_index(const Point_set_3_index& index) : value(static_cast<size_type>(index)) { }
|
||||
Point_set_3_index(const std::size_t& value) : value(static_cast<size_type>(value)) { }
|
||||
Point_set_3_index() : value(static_cast<size_type>(-1)) { }
|
||||
Point_set_3_index operator= (const Point_set_3_index& index) { value = index.value; return *this; }
|
||||
|
||||
operator std::size_t() const { return static_cast<std::size_t>(value); }
|
||||
bool operator== (const Point_set_3_index& index) const { return value == index.value; }
|
||||
bool operator!= (const Point_set_3_index& index) const { return value != index.value; }
|
||||
bool operator< (const Point_set_3_index& index) const { return value < index.value; }
|
||||
Point_set_3_index& operator++ () { ++value; return *this; }
|
||||
Point_set_3_index& operator-- () { --value; return *this; }
|
||||
Point_set_3_index operator++ (int) { Point_set_3_index tmp(*this); ++value; return tmp; }
|
||||
Point_set_3_index operator-- (int) { Point_set_3_index tmp(*this); --value; return tmp; }
|
||||
};
|
||||
/// \endcond
|
||||
} // namespace internal
|
||||
|
||||
/*!
|
||||
|
||||
\ingroup PkgPointSet3Ref
|
||||
|
|
@ -75,7 +118,7 @@ namespace CGAL {
|
|||
*/
|
||||
|
||||
template <typename Point,
|
||||
typename Vector = typename Kernel_traits<Point>::Kernel::Vector_3>
|
||||
typename Vector>
|
||||
class Point_set_3
|
||||
{
|
||||
public:
|
||||
|
|
@ -85,7 +128,7 @@ public:
|
|||
typedef Vector Vector_type;
|
||||
typedef Point_set_3<Point, Vector> Point_set;
|
||||
|
||||
class Index;
|
||||
using Index = internal::Point_set_3_index<Point, Vector>;
|
||||
|
||||
typedef typename Properties::Property_container<Point_set, Index> Base;
|
||||
|
||||
|
|
@ -105,45 +148,15 @@ public:
|
|||
};
|
||||
/// \endcond
|
||||
|
||||
#ifdef DOXYGEN_RUNNING
|
||||
/*!
|
||||
\brief This represents a point with associated properties.
|
||||
\cgalModels `::Index`
|
||||
\cgalModels `LessThanComparable`
|
||||
\cgalModels `Hashable`
|
||||
*/
|
||||
class Index
|
||||
{
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
public:
|
||||
#ifdef CGAL_POINT_SET_3_USE_STD_SIZE_T_AS_SIZE_TYPE
|
||||
typedef std::size_t size_type;
|
||||
#else
|
||||
typedef boost::uint32_t size_type;
|
||||
class Index;
|
||||
#endif
|
||||
private:
|
||||
friend class Point_set_3;
|
||||
friend class Properties::Property_container<Point_set_3, Index>;
|
||||
template <class> friend class Properties::Property_array;
|
||||
template <class> friend struct Property_map;
|
||||
friend class std::vector<Index>;
|
||||
size_type value;
|
||||
|
||||
public:
|
||||
Index (const Index& index) : value (static_cast<size_type>(index)) { }
|
||||
Index (const std::size_t& value) : value (static_cast<size_type>(value)) { }
|
||||
Index () : value (static_cast<size_type>(-1)) { }
|
||||
Index operator= (const Index& index) { value = index.value; return *this; }
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
operator std::size_t() const { return static_cast<std::size_t>(value); }
|
||||
bool operator== (const Index& index) const { return value == index.value; }
|
||||
bool operator!= (const Index& index) const { return value != index.value; }
|
||||
bool operator< (const Index& index) const { return value < index.value; }
|
||||
Index& operator++ () { ++ value; return *this; }
|
||||
Index& operator-- () { -- value; return *this; }
|
||||
Index operator++ (int) { Index tmp(*this); ++ value; return tmp; }
|
||||
Index operator-- (int) { Index tmp(*this); -- value; return tmp; }
|
||||
/// \endcond
|
||||
};
|
||||
|
||||
typedef Point Point_3; ///< The point type
|
||||
typedef Vector Vector_3; ///< The vector type
|
||||
|
|
@ -694,7 +707,6 @@ public:
|
|||
\sa `number_of_removed_points()`
|
||||
*/
|
||||
std::size_t garbage_size () const { return number_of_removed_points(); }
|
||||
/// \endcond
|
||||
|
||||
/*! \brief returns `true` if there are elements marked as removed,
|
||||
`false` otherwise.
|
||||
|
|
@ -1275,9 +1287,6 @@ private:
|
|||
|
||||
}; // end of class Point_set_3
|
||||
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
|
||||
\brief Append `other` at the end of `ps`.
|
||||
|
|
@ -1303,8 +1312,8 @@ Point_set_3<Point, Vector>& operator+=(Point_set_3<Point, Vector>& ps,
|
|||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// specialization for default named parameters
|
||||
template <typename Point, typename Vector, typename NamedParameters, typename NP_TAG>
|
||||
struct Point_set_processing_3_np_helper<Point_set_3<Point, Vector>, NamedParameters, NP_TAG>
|
||||
template <typename Point, typename Vector, typename NamedParameters, typename DPM, typename DVM>
|
||||
struct Point_set_processing_3_np_helper<Point_set_3<Point, Vector>, NamedParameters, DPM, DVM>
|
||||
{
|
||||
typedef typename std::iterator_traits<typename Point_set_3<Point, Vector>::iterator>::value_type Value_type;
|
||||
|
||||
|
|
@ -1313,9 +1322,9 @@ struct Point_set_processing_3_np_helper<Point_set_3<Point, Vector>, NamedParamet
|
|||
typedef typename Point_set_3<Point, Vector>::template Property_map<Point> DefaultPMap;
|
||||
typedef const typename Point_set_3<Point, Vector>::template Property_map<Point> DefaultConstPMap;
|
||||
|
||||
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
|
||||
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
|
||||
NamedParameters,DefaultPMap> ::type Point_map; // public
|
||||
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
|
||||
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
|
||||
NamedParameters,DefaultConstPMap> ::type Const_point_map; // public
|
||||
|
||||
typedef typename internal_np::Lookup_named_param_def <
|
||||
|
|
@ -1374,5 +1383,23 @@ struct Point_set_processing_3_np_helper<Point_set_3<Point, Vector>, NamedParamet
|
|||
|
||||
} // namespace CGAL
|
||||
|
||||
namespace boost {
|
||||
template <typename Point, typename Vector>
|
||||
std::size_t hash_value(const typename CGAL::internal::Point_set_3_index<Point, Vector>& i)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
namespace std {
|
||||
template <typename Point, typename Vector>
|
||||
struct hash< CGAL::internal::Point_set_3_index<Point, Vector> > {
|
||||
std::size_t operator()(const CGAL::internal::Point_set_3_index<Point, Vector>& i) const
|
||||
{
|
||||
std::size_t ret = i;
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
#endif // CGAL_POINT_SET_3_H
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include <CGAL/Point_set_3.h>
|
||||
#include <CGAL/grid_simplify_point_set.h>
|
||||
|
||||
#include <boost/unordered_set.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <limits>
|
||||
|
||||
|
|
@ -126,6 +128,9 @@ int main (int, char**)
|
|||
|
||||
test (p_before == p_after, "points should not change when clearing properties.");
|
||||
|
||||
std::unordered_set<Point_set::Index> std_hash;
|
||||
boost::unordered_set<Point_set::Index> boost_hash;
|
||||
|
||||
std::cerr << nb_success << "/" << nb_test << " test(s) succeeded." << std::endl;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ format.
|
|||
\cgalPkgDescriptionBegin{Point Set Processing,PkgPointSetProcessing3}
|
||||
\cgalPkgPicture{point_set_processing_detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Simon Giraudot, Clément Jamin, Florent Lafarge, Quentin Mérigot, Jocelyn Meyron, Laurent Saboret, Nader Salman, Shihao Wu, Necip Fazil Yildiran}
|
||||
\cgalPkgAuthors{Pierre Alliez, Simon Giraudot, Clément Jamin, Florent Lafarge, Quentin Mérigot, Jocelyn Meyron, Laurent Saboret, Nader Salman, Shihao Wu, and Necip Fazil Yildiran}
|
||||
\cgalPkgDesc{This \cgal component implements methods to analyze and process unorganized point sets. The input is an unorganized point set, possibly with normal attributes (unoriented or oriented). The point set can be analyzed to measure its average spacing, and processed through functions devoted to the simplification, outlier removal, smoothing, normal estimation, normal orientation, feature edges estimation and registration.}
|
||||
\cgalPkgManuals{Chapter_Point_Set_Processing,PkgPointSetProcessing3Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
\cgalPkgDescriptionBegin{Poisson Surface Reconstruction,PkgPoissonSurfaceReconstruction3}
|
||||
\cgalPkgPicture{surface_reconstruction_points_detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Laurent Saboret, Gaël Guennebaud}
|
||||
\cgalPkgAuthors{Pierre Alliez, Laurent Saboret, and Gaël Guennebaud}
|
||||
\cgalPkgDesc{This package implements a surface reconstruction method: Poisson Surface Reconstruction. It takes as input a set of points with oriented normals and computes an implicit function. The \cgal surface mesh generator can then be used to extract an iso-surface from this function. }
|
||||
\cgalPkgManuals{Chapter_Poisson_Surface_Reconstruction,PkgPoissonSurfaceReconstruction3Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ WARN_IF_UNDOCUMENTED = false
|
|||
|
||||
INPUT += ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h
|
||||
INPUT += ${CGAL_Mesh_3_INCLUDE_DIR}/CGAL/Polygon_mesh_processing/surface_Delaunay_remeshing.h \
|
||||
${CGAL_Mesh_3_INCLUDE_DIR}/CGAL/Mesh_facet_topology.h
|
||||
${CGAL_Mesh_3_INCLUDE_DIR}/CGAL/Mesh_facet_topology.h \
|
||||
${CGAL_Shape_detection_INCLUDE_DIR}/CGAL/Polygon_mesh_processing/region_growing.h
|
||||
STRIP_FROM_PATH += ${CGAL_Mesh_3_INCLUDE_DIR}
|
||||
STRIP_FROM_PATH += ${CGAL_Shape_detection_INCLUDE_DIR}
|
||||
|
||||
# macros to be used inside the code
|
||||
ALIASES += "cgalDescribePolylineType=A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed."
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
\cgalPkgPicture{hole_filling_ico.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Sébastien Loriot, Mael Rouxel-Labbé, Jane Tournois, Ilker %O. Yaz}
|
||||
\cgalPkgAuthors{Sébastien Loriot, Mael Rouxel-Labbé, Jane Tournois, and Ilker %O. Yaz}
|
||||
\cgalPkgDesc{This package provides a collection of methods and classes for polygon mesh processing,
|
||||
ranging from basic operations on simplices, to complex geometry processing algorithms such as
|
||||
Boolean operations, remeshing, repairing, collision and intersection detection, and more.}
|
||||
|
|
@ -248,6 +248,8 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage.
|
|||
- `CGAL::Polygon_mesh_processing::extract_boundary_cycles()`
|
||||
- `CGAL::Polygon_mesh_processing::transform()`
|
||||
- `CGAL::Polygon_mesh_processing::triangle()`
|
||||
- `CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces()`
|
||||
- `CGAL::Polygon_mesh_processing::detect_corners_of_regions()`
|
||||
|
||||
\cgalCRPSection{I/O Functions}
|
||||
- \link PMP_IO_grp `CGAL::Polygon_mesh_processing::IO::read_polygon_mesh()`\endlink
|
||||
|
|
|
|||
|
|
@ -16,5 +16,6 @@ Surface_mesh_deformation
|
|||
Surface_mesh_simplification
|
||||
Triangulation_2
|
||||
Mesh_3
|
||||
Shape_detection
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ public:
|
|||
Border_edge_map<TriangleMesh> is_marked_1(intersection_edges1, tm1);
|
||||
std::size_t nb_patches_tm1 =
|
||||
connected_components(tm1,
|
||||
bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0])),
|
||||
make_compose_property_map(fids1,make_property_map(&tm1_patch_ids[0])),
|
||||
parameters::edge_is_constrained_map(is_marked_1)
|
||||
.face_index_map(fids1));
|
||||
|
||||
|
|
@ -720,7 +720,7 @@ public:
|
|||
Border_edge_map<TriangleMesh> is_marked_2(intersection_edges2, tm2);
|
||||
std::size_t nb_patches_tm2 =
|
||||
connected_components(tm2,
|
||||
bind_property_maps(fids2,make_property_map(&tm2_patch_ids[0])),
|
||||
make_compose_property_map(fids2,make_property_map(&tm2_patch_ids[0])),
|
||||
parameters::edge_is_constrained_map(is_marked_2)
|
||||
.face_index_map(fids2));
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public:
|
|||
|
||||
std::size_t nb_patches_tm1 =
|
||||
connected_components(tm1,
|
||||
bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0])),
|
||||
make_compose_property_map(fids1,make_property_map(&tm1_patch_ids[0])),
|
||||
parameters::edge_is_constrained_map(ecm1)
|
||||
.face_index_map(fids1));
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
keep_connected_components(tm1, cc_to_keep, bind_property_maps(fids1,make_property_map(&tm1_patch_ids[0])));
|
||||
keep_connected_components(tm1, cc_to_keep, make_compose_property_map(fids1,make_property_map(&tm1_patch_ids[0])));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ public:
|
|||
is_intersection(intersection_edges);
|
||||
std::size_t nb_patches =
|
||||
connected_components(tm,
|
||||
bind_property_maps(fids,make_property_map(patch_ids)),
|
||||
make_compose_property_map(fids,make_property_map(patch_ids)),
|
||||
parameters::edge_is_constrained_map(is_intersection)
|
||||
.face_index_map(fids));
|
||||
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ struct Side_of_helper
|
|||
|
||||
typedef CGAL::Pointer_property_map<CGAL::Bbox_3>::type Id_to_box;
|
||||
Id_to_box id_to_box = CGAL::make_property_map(face_bboxes);
|
||||
typedef Property_map_binder<FaceIdMap, Id_to_box> BPM;
|
||||
typedef Compose_property_map<FaceIdMap, Id_to_box> BPM;
|
||||
BPM bpm(fid, id_to_box);
|
||||
Compute_bbox<BPM> compute_bbox(bpm);
|
||||
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ void simplify_range(HalfedgeRange& halfedge_range,
|
|||
std::set<halfedge_descriptor> edges_to_test(halfedge_range.begin(), halfedge_range.end());
|
||||
|
||||
int collapsed_n = 0;
|
||||
|
||||
while(!edges_to_test.empty())
|
||||
{
|
||||
const halfedge_descriptor h = *(edges_to_test.begin());
|
||||
|
|
@ -165,12 +166,11 @@ void simplify_range(HalfedgeRange& halfedge_range,
|
|||
edges_to_test.insert(prev_h);
|
||||
if(next_h!=opoh && get(range_halfedges, next_h))
|
||||
edges_to_test.insert(next_h);
|
||||
|
||||
++collapsed_n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CGAL_USE(collapsed_n);
|
||||
#ifdef CGAL_PMP_SNAP_DEBUG
|
||||
std::cout << "collapsed " << collapsed_n << " edges" << std::endl;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ void orient(TriangleMesh& tm,
|
|||
|
||||
// set the connected component id of each face
|
||||
std::size_t nb_cc = connected_components(tm,
|
||||
bind_property_maps(fid_map,make_property_map(face_cc)),
|
||||
make_compose_property_map(fid_map,make_property_map(face_cc)),
|
||||
parameters::face_index_map(fid_map));
|
||||
|
||||
// extract a vertex with max z coordinate for each connected component
|
||||
|
|
@ -844,7 +844,7 @@ volume_connected_components(const TriangleMesh& tm,
|
|||
|
||||
// set the connected component id of each face
|
||||
const std::size_t nb_cc = connected_components(tm,
|
||||
bind_property_maps(fid_map,make_property_map(face_cc)),
|
||||
make_compose_property_map(fid_map,make_property_map(face_cc)),
|
||||
parameters::face_index_map(fid_map));
|
||||
|
||||
// contains for each CC the CC that are in its bounded side
|
||||
|
|
@ -1354,6 +1354,8 @@ void orient_to_bound_a_volume(TriangleMesh& tm,
|
|||
typedef typename GetGeomTraits<TriangleMesh, NamedParameters>::type GT;
|
||||
typedef typename GetInitializedFaceIndexMap<TriangleMesh, NamedParameters>::type FaceIndexMap;
|
||||
|
||||
if (is_empty(tm)) return;
|
||||
|
||||
CGAL_precondition(is_closed(tm));
|
||||
CGAL_precondition(is_triangle_mesh(tm));
|
||||
|
||||
|
|
@ -1376,7 +1378,7 @@ void orient_to_bound_a_volume(TriangleMesh& tm,
|
|||
parameters::vertex_point_map(vpm)
|
||||
.geom_traits(gt)
|
||||
.nesting_levels(boost::ref(nesting_levels))
|
||||
.face_connected_component_map(bind_property_maps(fid_map,make_property_map(face_cc)))
|
||||
.face_connected_component_map(make_compose_property_map(fid_map,make_property_map(face_cc)))
|
||||
.i_used_for_volume_orientation(true)
|
||||
.do_orientation_tests(true)
|
||||
.is_cc_outward_oriented(boost::ref(is_cc_outward_oriented))
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@ public:
|
|||
|
||||
std::size_t nb_cc =
|
||||
Polygon_mesh_processing::connected_components(
|
||||
tm, bind_property_maps(fid_map, make_property_map(cc_ids)),
|
||||
tm, make_compose_property_map(fid_map, make_property_map(cc_ids)),
|
||||
parameters::face_index_map(fid_map));
|
||||
if (nb_cc != 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ bool test_orientation(const TriangleMesh& tm, bool is_positive, const NamedParam
|
|||
|
||||
// set the connected component id of each face
|
||||
std::size_t nb_cc = PMP::connected_components(tm,
|
||||
CGAL::bind_property_maps(fid_map,CGAL::make_property_map(face_cc)),
|
||||
CGAL::make_compose_property_map(fid_map,CGAL::make_property_map(face_cc)),
|
||||
CGAL::parameters::face_index_map(fid_map));
|
||||
|
||||
// extract a vertex with max z coordinate for each connected component
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
\cgalPkgPicture{polyfit.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Liangliang Nan}
|
||||
\cgalPkgAuthor{Liangliang Nan}
|
||||
\cgalPkgDesc{This package provides a method for piecewise planar object reconstruction from point clouds.
|
||||
The method takes as input an unordered point set (and optionally planar segments) of a piecewise planar
|
||||
object and outputs a lightweight and watertight surface mesh interpolating the input point set. The
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Sphere_neighbor_query<Kernel, Point_vector, Point_map> Neighbor_query;
|
|||
typedef CGAL::Shape_detection::Point_set::
|
||||
Least_squares_plane_fit_region<Kernel, Point_vector, Point_map, Normal_map> Region_type;
|
||||
typedef CGAL::Shape_detection::
|
||||
Region_growing<Point_vector, Neighbor_query, Region_type> Region_growing;
|
||||
Region_growing<Neighbor_query, Region_type> Region_growing;
|
||||
|
||||
typedef CGAL::Surface_mesh<Point> Surface_mesh;
|
||||
typedef CGAL::Polygonal_surface_reconstruction<Kernel> Polygonal_surface_reconstruction;
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag)
|
|||
std::make_pair(QSharedPointer<Mesh_sizing_field>(sizing_field_ptr),
|
||||
QSharedPointer<Patches_ids_vector>(patches_ids_vector_p));
|
||||
|
||||
std::cerr << "USE SIZING FIELD!\n";
|
||||
std::cerr << "Note: Mesh_3 is using a sizing field based on AABB tree.\n";
|
||||
return Edge_criteria(*sizing_field_ptr);
|
||||
} else {
|
||||
return Edge_criteria(edge_size);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#include <CGAL/Shape_detection.h>
|
||||
#include <CGAL/Shape_regularization/regularize_planes.h>
|
||||
#include <CGAL/Shape_detection/Region_growing/Region_growing.h>
|
||||
#include <CGAL/Polygon_mesh_processing/region_growing.h>
|
||||
#include <CGAL/Delaunay_triangulation_2.h>
|
||||
#include <CGAL/Alpha_shape_2.h>
|
||||
#include <CGAL/Alpha_shape_face_base_2.h>
|
||||
|
|
@ -182,112 +184,76 @@ private:
|
|||
Scene_surface_mesh_item* sm_item,
|
||||
Point_set_demo_point_set_shape_detection_dialog& dialog) {
|
||||
|
||||
using Face_range = typename SMesh::Face_range;
|
||||
|
||||
using Neighbor_query =
|
||||
CGAL::Shape_detection::Polygon_mesh::One_ring_neighbor_query<SMesh>;
|
||||
using Region_type =
|
||||
CGAL::Shape_detection::Polygon_mesh::Least_squares_plane_fit_region<Kernel, SMesh>;
|
||||
|
||||
using Vertex_to_point_map = typename Region_type::Vertex_to_point_map;
|
||||
using Region_growing = CGAL::Shape_detection::Region_growing<Face_range, Neighbor_query, Region_type>;
|
||||
|
||||
CGAL::Random rand(static_cast<unsigned int>(time(nullptr)));
|
||||
const SMesh& mesh = *(sm_item->polyhedron());
|
||||
scene->setSelectedItem(-1);
|
||||
const Face_range face_range = faces(mesh);
|
||||
SMesh& mesh = *(sm_item->polyhedron());
|
||||
|
||||
// Set parameters.
|
||||
const double max_distance_to_plane =
|
||||
dialog.epsilon();
|
||||
const double max_accepted_angle =
|
||||
dialog.normal_tolerance();
|
||||
const std::size_t min_region_size =
|
||||
dialog.min_points();
|
||||
const double max_distance_to_plane = dialog.epsilon();
|
||||
const double max_accepted_angle = dialog.normal_tolerance();
|
||||
const std::size_t min_region_size = dialog.min_points();
|
||||
|
||||
// Region growing.
|
||||
Neighbor_query neighbor_query(mesh);
|
||||
const Vertex_to_point_map vertex_to_point_map(get(CGAL::vertex_point, mesh));
|
||||
Region_type region_type(
|
||||
std::vector<std::size_t> region_ids(num_faces(mesh));
|
||||
std::size_t nb_regions =
|
||||
CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces(
|
||||
mesh,
|
||||
max_distance_to_plane, max_accepted_angle, min_region_size,
|
||||
vertex_to_point_map);
|
||||
CGAL::make_property_map(region_ids),
|
||||
CGAL::parameters::
|
||||
maximum_distance(max_distance_to_plane).
|
||||
maximum_angle(max_accepted_angle).
|
||||
minimum_region_size(min_region_size));
|
||||
|
||||
Region_growing region_growing(
|
||||
face_range, neighbor_query, region_type);
|
||||
std::cerr << "* " << nb_regions << " regions have been found" << std::endl;
|
||||
|
||||
std::vector< std::vector<std::size_t> > regions;
|
||||
region_growing.detect(std::back_inserter(regions));
|
||||
|
||||
std::cerr << "* " << regions.size() <<
|
||||
" regions have been found"
|
||||
<< std::endl;
|
||||
typedef typename boost::property_map<SMesh, CGAL::face_patch_id_t<int> >::type Patch_id_pmap;
|
||||
Patch_id_pmap pidmap = get(CGAL::face_patch_id_t<int>(), mesh);
|
||||
|
||||
// Output result as a new colored item.
|
||||
Scene_surface_mesh_item *colored_item = new Scene_surface_mesh_item;
|
||||
colored_item->setName(QString("%1 (region growing)").arg(sm_item->name()));
|
||||
SMesh& fg = *(colored_item->polyhedron());
|
||||
|
||||
fg = mesh;
|
||||
const Face_range fr = faces(fg);
|
||||
|
||||
colored_item->setItemIsMulticolor(true);
|
||||
colored_item->computeItemColorVectorAutomatically(false);
|
||||
auto& color_vector = colored_item->color_vector();
|
||||
color_vector.clear();
|
||||
|
||||
for (std::size_t i = 0; i < regions.size(); ++i) {
|
||||
for (const std::size_t idx : regions[i]) {
|
||||
const auto fit = fr.begin() + idx;
|
||||
fg.property_map<face_descriptor, int>("f:patch_id").first[*fit] =
|
||||
static_cast<int>(i);
|
||||
}
|
||||
CGAL::Random rnd(static_cast<unsigned int>(i));
|
||||
color_vector.push_back(QColor(
|
||||
64 + rnd.get_int(0, 192),
|
||||
64 + rnd.get_int(0, 192),
|
||||
64 + rnd.get_int(0, 192)));
|
||||
}
|
||||
if(color_vector.empty())
|
||||
bool has_unassigned = false;
|
||||
for(SMesh::Face_index f : faces(mesh))
|
||||
{
|
||||
for(const auto& f : faces(fg))
|
||||
std::size_t region_id = region_ids[f];
|
||||
if (region_id != std::size_t(-1))
|
||||
put(pidmap, f, static_cast<int>(region_id)+1);
|
||||
else
|
||||
{
|
||||
fg.property_map<face_descriptor, int>("f:patch_id").first[f] =
|
||||
static_cast<int>(0);
|
||||
has_unassigned = true;
|
||||
put(pidmap, f, 0);
|
||||
}
|
||||
CGAL::Random rnd(static_cast<unsigned int>(0));
|
||||
color_vector.push_back(QColor(
|
||||
64 + rnd.get_int(0, 192),
|
||||
64 + rnd.get_int(0, 192),
|
||||
64 + rnd.get_int(0, 192)));
|
||||
}
|
||||
colored_item->invalidateOpenGLBuffers();
|
||||
scene->addItem(colored_item);
|
||||
|
||||
sm_item->setItemIsMulticolor(true);
|
||||
sm_item->computeItemColorVectorAutomatically(true);
|
||||
sm_item->invalidateOpenGLBuffers();
|
||||
scene->itemChanged(sm_item);
|
||||
|
||||
if (has_unassigned)
|
||||
{
|
||||
// hack to get unassigned as black
|
||||
sm_item->color_vector()[0]=QColor().black();
|
||||
sm_item->computeItemColorVectorAutomatically(false);
|
||||
sm_item->invalidateOpenGLBuffers();
|
||||
scene->itemChanged(sm_item);
|
||||
}
|
||||
}
|
||||
|
||||
void detect_shapes_with_region_growing (
|
||||
Scene_points_with_normal_item* item,
|
||||
Point_set_demo_point_set_shape_detection_dialog& dialog) {
|
||||
|
||||
using Point_map = typename Point_set::Point_map;
|
||||
using Normal_map = typename Point_set::Vector_map;
|
||||
|
||||
using Neighbor_query =
|
||||
CGAL::Shape_detection::Point_set::Sphere_neighbor_query<Kernel, Point_set, Point_map>;
|
||||
CGAL::Shape_detection::Point_set::Sphere_neighbor_query_for_point_set<Point_set>;
|
||||
using Sorting =
|
||||
CGAL::Shape_detection::Point_set::Least_squares_plane_fit_sorting_for_point_set<Point_set, Neighbor_query>;
|
||||
using Region_type =
|
||||
CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region<Kernel, Point_set, Point_map, Normal_map>;
|
||||
CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region_for_point_set<Point_set>;
|
||||
using Region_growing =
|
||||
CGAL::Shape_detection::Region_growing<Point_set, Neighbor_query, Region_type>;
|
||||
CGAL::Shape_detection::Region_growing<Neighbor_query, Region_type>;
|
||||
|
||||
// Set parameters.
|
||||
const double search_sphere_radius =
|
||||
dialog.cluster_epsilon();
|
||||
const double max_distance_to_plane =
|
||||
dialog.epsilon();
|
||||
const double max_accepted_angle =
|
||||
dialog.normal_tolerance();
|
||||
const std::size_t min_region_size =
|
||||
dialog.min_points();
|
||||
const double search_sphere_radius = dialog.cluster_epsilon();
|
||||
const double max_distance_to_plane = dialog.epsilon();
|
||||
const double max_accepted_angle = dialog.normal_tolerance();
|
||||
const std::size_t min_region_size = dialog.min_points();
|
||||
|
||||
// Get a point set.
|
||||
CGAL::Random rand(static_cast<unsigned int>(time(nullptr)));
|
||||
|
|
@ -336,18 +302,20 @@ private:
|
|||
QApplication::setOverrideCursor(Qt::BusyCursor);
|
||||
|
||||
// Region growing set up.
|
||||
Neighbor_query neighbor_query(
|
||||
*points,
|
||||
search_sphere_radius,
|
||||
points->point_map());
|
||||
|
||||
Region_type region_type(
|
||||
*points,
|
||||
max_distance_to_plane, max_accepted_angle, min_region_size,
|
||||
points->point_map(), points->normal_map());
|
||||
Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_sphere_neighbor_query(
|
||||
*points, CGAL::parameters::
|
||||
sphere_radius(search_sphere_radius));
|
||||
Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_region(
|
||||
*points, CGAL::parameters::
|
||||
maximum_distance(max_distance_to_plane).
|
||||
maximum_angle(max_accepted_angle).
|
||||
minimum_region_size(min_region_size));
|
||||
Sorting sorting = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_sorting(
|
||||
*points, neighbor_query);
|
||||
sorting.sort();
|
||||
|
||||
Region_growing region_growing(
|
||||
*points, neighbor_query, region_type);
|
||||
*points, sorting.ordered(), neighbor_query, region_type);
|
||||
|
||||
std::vector<Scene_group_item *> groups;
|
||||
groups.resize(1);
|
||||
|
|
@ -359,7 +327,7 @@ private:
|
|||
// The actual shape detection.
|
||||
CGAL::Real_timer t;
|
||||
t.start();
|
||||
std::vector< std::vector<std::size_t> > regions;
|
||||
std::vector<typename Region_growing::Primitive_and_region> regions;
|
||||
region_growing.detect(std::back_inserter(regions));
|
||||
t.stop();
|
||||
|
||||
|
|
@ -367,19 +335,28 @@ private:
|
|||
" shapes found in " << t.time() << " second(s)" << std::endl;
|
||||
|
||||
std::vector<Plane_3> planes;
|
||||
CGAL::Shape_detection::internal::create_planes_from_points(
|
||||
*points, points->point_map(), regions, planes);
|
||||
planes.reserve(regions.size());
|
||||
for (const auto& region : regions) {
|
||||
planes.push_back(region.first);
|
||||
}
|
||||
CGAL_precondition(planes.size() == regions.size());
|
||||
|
||||
const CGAL::Identity_property_map<Plane_3> plane_identity_map;
|
||||
CGAL::internal::Dynamic_property_map<Point_set::Index, std::size_t> plane_index_map;
|
||||
|
||||
for (Point_set::Index idx : *points)
|
||||
put(plane_index_map, idx, get(region_growing.region_map(), idx));
|
||||
|
||||
if (dialog.regularize()) {
|
||||
|
||||
std::cerr << "Regularization of planes... " << std::endl;
|
||||
CGAL::Shape_regularization::Planes::regularize_planes(
|
||||
planes,
|
||||
CGAL::Identity_property_map<Plane_3>(),
|
||||
plane_identity_map,
|
||||
*points,
|
||||
points->point_map(),
|
||||
CGAL::parameters::plane_index_map(
|
||||
CGAL::Shape_detection::RG::Point_to_shape_index_map(*points, regions)).
|
||||
CGAL::parameters::
|
||||
plane_index_map(plane_index_map).
|
||||
regularize_parallelism(true).
|
||||
regularize_orthogonality(true).
|
||||
regularize_coplanarity(true).
|
||||
|
|
@ -403,10 +380,10 @@ private:
|
|||
Scene_points_with_normal_item *point_item =
|
||||
new Scene_points_with_normal_item;
|
||||
|
||||
for (const std::size_t idx : regions[index]) {
|
||||
point_item->point_set()->insert(points->point(*(points->begin() + idx)));
|
||||
for (auto &item : regions[index].second) {
|
||||
point_item->point_set()->insert(points->point(item));
|
||||
if (dialog.add_property())
|
||||
shape_id[*(points->begin() + idx)] = index;
|
||||
shape_id[item] = index;
|
||||
}
|
||||
|
||||
unsigned char r, g, b;
|
||||
|
|
@ -417,9 +394,9 @@ private:
|
|||
|
||||
std::size_t nb_colored_pts = 0;
|
||||
if (dialog.generate_colored_point_set()) {
|
||||
for(std::size_t idx : regions[index]) {
|
||||
for(Point_set::Index item : regions[index].second) {
|
||||
auto it = colored_item->point_set()->insert(
|
||||
points->point(*(points->begin() + idx)));
|
||||
points->point(item));
|
||||
++nb_colored_pts;
|
||||
colored_item->point_set()->set_color(*it, r, g, b);
|
||||
}
|
||||
|
|
@ -463,8 +440,7 @@ private:
|
|||
Scene_surface_mesh_item* sm_item = nullptr;
|
||||
sm_item = new Scene_surface_mesh_item;
|
||||
|
||||
using Plane = CGAL::Shape_detection::RG::Plane<Kernel>;
|
||||
boost::shared_ptr<Plane> rg_plane(new Plane(*points, points->point_map(), regions[index], plane));
|
||||
boost::shared_ptr<Plane_3> rg_plane(boost::make_shared<Plane_3>(plane));
|
||||
build_alpha_shape(
|
||||
*(point_item->point_set()), rg_plane,
|
||||
sm_item, search_sphere_radius);
|
||||
|
|
@ -472,7 +448,7 @@ private:
|
|||
if (sm_item){
|
||||
sm_item->setColor(point_item->color ());
|
||||
sm_item->setName(QString("%1%2_alpha_shape").arg(QString::fromStdString(ss.str()))
|
||||
.arg(QString::number(regions[index].size())));
|
||||
.arg(QString::number(regions[index].second.size())));
|
||||
sm_item->setRenderingMode(Flat);
|
||||
sm_item->invalidateOpenGLBuffers();
|
||||
scene->addItem(sm_item);
|
||||
|
|
@ -481,7 +457,7 @@ private:
|
|||
scene->changeGroup(sm_item, groups[0]);
|
||||
}
|
||||
}
|
||||
ss << regions[index].size();
|
||||
ss << regions[index].second.size();
|
||||
|
||||
point_item->setName(QString::fromStdString(ss.str()));
|
||||
point_item->setRenderingMode(item->renderingMode());
|
||||
|
|
@ -515,14 +491,15 @@ private:
|
|||
Scene_points_with_normal_item *pts_full = new Scene_points_with_normal_item;
|
||||
pts_full->point_set()->add_normal_map();
|
||||
|
||||
|
||||
CGAL::structure_point_set(
|
||||
*points,
|
||||
planes,
|
||||
boost::make_function_output_iterator(build_from_pair((*(pts_full->point_set())))),
|
||||
search_sphere_radius,
|
||||
points->parameters().
|
||||
plane_map(CGAL::Identity_property_map<Plane_3>()).
|
||||
plane_index_map(CGAL::Shape_detection::RG::Point_to_shape_index_map(*points, regions)));
|
||||
plane_map(plane_identity_map).
|
||||
plane_index_map(plane_index_map));
|
||||
|
||||
if (pts_full->point_set()->empty())
|
||||
delete pts_full;
|
||||
|
|
@ -663,7 +640,8 @@ private:
|
|||
CGAL::Shape_detection::Plane_map<Traits>(),
|
||||
*points,
|
||||
points->point_map(),
|
||||
CGAL::parameters::plane_index_map(
|
||||
CGAL::parameters::
|
||||
plane_index_map(
|
||||
CGAL::Shape_detection::Point_to_shape_index_map<Traits>(*points, planes)).
|
||||
regularize_parallelism(true).
|
||||
regularize_orthogonality(true).
|
||||
|
|
@ -970,9 +948,7 @@ void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetectShapesSM_t
|
|||
dialog.groupBox_3->setEnabled(true);
|
||||
|
||||
// Update scene.
|
||||
scene->itemChanged(index);
|
||||
QApplication::restoreOverrideCursor();
|
||||
sm_item->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include <CGAL/Qt/qglviewer.h>
|
||||
|
||||
#include <boost/iterator/function_output_iterator.hpp>
|
||||
#include <boost/range/empty.hpp>
|
||||
|
||||
#include <CGAL/IO/io.h>
|
||||
#include <CGAL/AABB_tree.h>
|
||||
|
|
@ -304,6 +305,17 @@ void Scene_c3t3_item::compute_bbox() const
|
|||
}
|
||||
_bbox = Bbox(result.xmin(), result.ymin(), result.zmin(),
|
||||
result.xmax(), result.ymax(), result.zmax());
|
||||
|
||||
if (boost::empty(c3t3().cells_in_complex()))
|
||||
{
|
||||
for (Tr::Vertex_handle v : c3t3().triangulation().finite_vertex_handles())
|
||||
{
|
||||
if(v->in_dimension() != -1) //skip far points
|
||||
result += v->point().bbox();
|
||||
}
|
||||
_bbox = Bbox(result.xmin(), result.ymin(), result.zmin(),
|
||||
result.xmax(), result.ymax(), result.zmax());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -579,9 +579,9 @@ namespace CGAL
|
|||
{
|
||||
|
||||
// specialization for default named parameters
|
||||
template <typename Gt, typename NamedParameters, typename NP_TAG>
|
||||
struct Point_set_processing_3_np_helper<::Point_set_3<Gt>, NamedParameters, NP_TAG>
|
||||
: public Point_set_processing_3_np_helper<typename ::Point_set_3<Gt>::Base, NamedParameters, NP_TAG>
|
||||
template <typename Gt, typename NamedParameters, typename DPM, typename DVM>
|
||||
struct Point_set_processing_3_np_helper<::Point_set_3<Gt>, NamedParameters, DPM, DVM>
|
||||
: public Point_set_processing_3_np_helper<typename ::Point_set_3<Gt>::Base, NamedParameters, DPM, DVM>
|
||||
{};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
\cgalPkgDescriptionBegin{Principal Component Analysis,PkgPrincipalComponentAnalysisD}
|
||||
\cgalPkgPicture{teaserLeastSquaresFitting.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Sylvain Pion and Ankit Gupta}
|
||||
\cgalPkgAuthors{Pierre Alliez, Sylvain Pion, and Ankit Gupta}
|
||||
\cgalPkgDesc{This package provides functions to compute global information about the shape of a set of 2D or 3D objects. It provides the computation of axis-aligned bounding boxes for point sets, and barycenters of weighted point sets. In addition, it provides computation of centroids (center of mass) and linear least squares fitting for point sets as well as for sets of other bounded objects. More specifically, it is possible to fit 2D lines to 2D segments, circles, disks, iso rectangles and triangles, as well as to fit 3D lines or 3D planes to 3D segments, triangles, iso cuboids, tetrahedra, spheres and balls. The common interface to these functions takes an iterator range of objects.}
|
||||
\cgalPkgManuals{Chapter_Principal_Component_Analysis,PkgPrincipalComponentAnalysisDRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#include <CGAL/Cartesian_converter_fwd.h>
|
||||
#include <CGAL/Kernel_traits_fwd.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/Default.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
|
@ -101,49 +102,6 @@ make_OR_property_map(const PM1& pm1, const PM2& pm2)
|
|||
return OR_property_map<PM1, PM2>(pm1, pm2);
|
||||
}
|
||||
|
||||
// A property map that uses the result of a property map as key.
|
||||
template <class KeyMap, class ValueMap>
|
||||
struct Property_map_binder
|
||||
{
|
||||
typedef typename boost::property_traits<KeyMap>::key_type key_type;
|
||||
typedef typename boost::property_traits<ValueMap>::value_type value_type;
|
||||
typedef typename boost::property_traits<ValueMap>::reference reference;
|
||||
typedef boost::read_write_property_map_tag category;
|
||||
|
||||
KeyMap key_map;
|
||||
ValueMap value_map;
|
||||
|
||||
Property_map_binder(const KeyMap& key_map = KeyMap(),
|
||||
const ValueMap& value_map = ValueMap())
|
||||
: key_map(key_map), value_map(value_map)
|
||||
{ }
|
||||
|
||||
template <typename VM>
|
||||
Property_map_binder(const VM& value_map,
|
||||
std::enable_if_t<!std::is_same<KeyMap, VM>::value>* = nullptr)
|
||||
: value_map(value_map)
|
||||
{ }
|
||||
|
||||
friend
|
||||
reference get(const Property_map_binder& map, key_type k)
|
||||
{
|
||||
return get(map.value_map, get(map.key_map,k));
|
||||
}
|
||||
friend
|
||||
void put(const Property_map_binder& map, key_type k, const value_type& v)
|
||||
{
|
||||
put(map.value_map, get(map.key_map,k), v);
|
||||
}
|
||||
};
|
||||
|
||||
template <class KeyMap, class ValueMap>
|
||||
Property_map_binder<KeyMap, ValueMap>
|
||||
bind_property_maps(const KeyMap& src, const ValueMap& tgt)
|
||||
{
|
||||
return Property_map_binder<KeyMap, ValueMap>(src, tgt);
|
||||
}
|
||||
|
||||
|
||||
/// Property map that accesses a value from an iterator
|
||||
///
|
||||
/// \cgalModels `ReadablePropertyMap`
|
||||
|
|
@ -160,28 +118,192 @@ struct Input_iterator_property_map{
|
|||
/// Free function to use a get the value from an iterator using Input_iterator_property_map.
|
||||
inline friend
|
||||
reference
|
||||
get(Input_iterator_property_map<InputIterator>,InputIterator it){ return *it; }
|
||||
get(Input_iterator_property_map<InputIterator>, const InputIterator& it){ return *it; }
|
||||
};
|
||||
|
||||
#ifdef DOXYGEN_RUNNING
|
||||
/// \ingroup PkgPropertyMapRef
|
||||
/// Property map that composes two property maps,
|
||||
/// that is a call on an instance `Compose_property_map compose_property_map(key_map, value_map)` of `get(compose_property_map, k)` returns `get(value_map, get(key_map, k))`.
|
||||
template <class KeyMap, class ValueMap>
|
||||
struct Compose_property_map
|
||||
{
|
||||
///< Use the key type of `KeyMap` as keytype
|
||||
typedef typename boost::property_traits<KeyMap>::key_type key_type;
|
||||
///< Use the value type of `ValueMap` as value type
|
||||
typedef typename boost::property_traits<ValueMap>::value_type value_type;
|
||||
///< Use the reference type of `ValueMap` as reference
|
||||
typedef typename boost::property_traits<ValueMap>::reference reference;
|
||||
///< Use the category of the `ValueMap`
|
||||
typedef typename boost::property_traits<ValueMap>::category category;
|
||||
|
||||
/// Constructor
|
||||
Compose_property_map(KeyMap key_map = KeyMap(),
|
||||
ValueMap value_map = ValueMap());
|
||||
};
|
||||
#else
|
||||
template <class KeyMap, class ValueMap, class Category = typename boost::property_traits<ValueMap>::category>
|
||||
struct Compose_property_map;
|
||||
|
||||
template <class KeyMap, class ValueMap>
|
||||
struct Compose_property_map<KeyMap, ValueMap, boost::readable_property_map_tag>
|
||||
{
|
||||
typedef typename boost::property_traits<KeyMap>::key_type key_type;
|
||||
typedef typename boost::property_traits<ValueMap>::value_type value_type;
|
||||
typedef typename boost::property_traits<ValueMap>::reference reference;
|
||||
typedef typename boost::property_traits<ValueMap>::category category;
|
||||
|
||||
KeyMap key_map;
|
||||
ValueMap value_map;
|
||||
|
||||
Compose_property_map(KeyMap key_map = KeyMap(),
|
||||
ValueMap value_map = ValueMap())
|
||||
: key_map(key_map), value_map(value_map)
|
||||
{}
|
||||
|
||||
Compose_property_map(Default,
|
||||
ValueMap value_map = ValueMap())
|
||||
: value_map(value_map)
|
||||
{}
|
||||
|
||||
friend
|
||||
reference get(Compose_property_map map, const key_type& k)
|
||||
{
|
||||
return get(map.value_map, get(map.key_map,k));
|
||||
}
|
||||
};
|
||||
|
||||
template <class KeyMap, class ValueMap>
|
||||
struct Compose_property_map<KeyMap, ValueMap, boost::writable_property_map_tag>
|
||||
{
|
||||
typedef typename boost::property_traits<KeyMap>::key_type key_type;
|
||||
typedef typename boost::property_traits<ValueMap>::value_type value_type;
|
||||
typedef typename boost::property_traits<ValueMap>::reference reference;
|
||||
typedef typename boost::property_traits<ValueMap>::category category;
|
||||
|
||||
KeyMap key_map;
|
||||
ValueMap value_map;
|
||||
|
||||
Compose_property_map(KeyMap key_map = KeyMap(),
|
||||
ValueMap value_map = ValueMap())
|
||||
: key_map(key_map), value_map(value_map)
|
||||
{}
|
||||
|
||||
Compose_property_map(Default,
|
||||
ValueMap value_map = ValueMap())
|
||||
: value_map(value_map)
|
||||
{}
|
||||
|
||||
friend
|
||||
void put(Compose_property_map map, const key_type& k, const value_type& v)
|
||||
{
|
||||
put(map.value_map, get(map.key_map,k), v);
|
||||
}
|
||||
};
|
||||
|
||||
template <class KeyMap, class ValueMap>
|
||||
struct Compose_property_map<KeyMap, ValueMap, boost::read_write_property_map_tag>
|
||||
{
|
||||
typedef typename boost::property_traits<KeyMap>::key_type key_type;
|
||||
typedef typename boost::property_traits<ValueMap>::value_type value_type;
|
||||
typedef typename boost::property_traits<ValueMap>::reference reference;
|
||||
typedef typename boost::property_traits<ValueMap>::category category;
|
||||
|
||||
KeyMap key_map;
|
||||
ValueMap value_map;
|
||||
|
||||
Compose_property_map(KeyMap key_map = KeyMap(),
|
||||
ValueMap value_map = ValueMap())
|
||||
: key_map(key_map), value_map(value_map)
|
||||
{}
|
||||
|
||||
Compose_property_map(Default,
|
||||
ValueMap value_map = ValueMap())
|
||||
: value_map(value_map)
|
||||
{}
|
||||
|
||||
friend
|
||||
reference get(Compose_property_map map, const key_type& k)
|
||||
{
|
||||
return get(map.value_map, get(map.key_map,k));
|
||||
}
|
||||
|
||||
friend
|
||||
void put(const Compose_property_map& map, const key_type& k, const value_type& v)
|
||||
{
|
||||
put(map.value_map, get(map.key_map,k), v);
|
||||
}
|
||||
};
|
||||
|
||||
template <class KeyMap, class ValueMap>
|
||||
struct Compose_property_map<KeyMap, ValueMap, boost::lvalue_property_map_tag>
|
||||
{
|
||||
typedef typename boost::property_traits<KeyMap>::key_type key_type;
|
||||
typedef typename boost::property_traits<ValueMap>::value_type value_type;
|
||||
typedef typename boost::property_traits<ValueMap>::reference reference;
|
||||
typedef typename boost::property_traits<ValueMap>::category category;
|
||||
|
||||
KeyMap key_map;
|
||||
ValueMap value_map;
|
||||
|
||||
Compose_property_map(KeyMap key_map = KeyMap(),
|
||||
ValueMap value_map = ValueMap())
|
||||
: key_map(key_map), value_map(value_map)
|
||||
{}
|
||||
|
||||
Compose_property_map(Default,
|
||||
ValueMap value_map = ValueMap())
|
||||
: value_map(value_map)
|
||||
{}
|
||||
|
||||
friend
|
||||
reference get(Compose_property_map map, const key_type& k)
|
||||
{
|
||||
return get(map.value_map, get(map.key_map,k));
|
||||
}
|
||||
|
||||
friend
|
||||
void put(Compose_property_map map, key_type k, const value_type& v)
|
||||
{
|
||||
put(map.value_map, get(map.key_map,k), v);
|
||||
}
|
||||
|
||||
decltype(auto)
|
||||
operator[](const key_type& k) const
|
||||
{
|
||||
return value_map[get(key_map, k)];
|
||||
}
|
||||
};
|
||||
#endif
|
||||
/// \ingroup PkgPropertyMapRef
|
||||
/// \relates Compose_property_map
|
||||
/// returns `Compose_property_maps<KeyMap, ValueMap>(km,vm)`
|
||||
template <class KeyMap, class ValueMap>
|
||||
Compose_property_map<KeyMap, ValueMap>
|
||||
make_compose_property_map(const KeyMap& km, const ValueMap& vm)
|
||||
{
|
||||
return Compose_property_map<KeyMap, ValueMap>(km, vm);
|
||||
}
|
||||
|
||||
/// \ingroup PkgPropertyMapRef
|
||||
/// Property map that converts a `T*` pointer (or in general an iterator
|
||||
/// over `T` elements) to the `T` object.
|
||||
///
|
||||
/// \cgalModels `LvaluePropertyMap`
|
||||
template <typename T>
|
||||
template <typename T, typename Iter = T*>
|
||||
struct Dereference_property_map
|
||||
: public boost::put_get_helper<T&, Dereference_property_map<T> >
|
||||
: public boost::put_get_helper<typename std::iterator_traits<Iter>::reference, Dereference_property_map<T, Iter> >
|
||||
{
|
||||
typedef T* key_type; ///< typedef to 'T*'
|
||||
typedef T value_type; ///< typedef to 'T'
|
||||
typedef T& reference; ///< typedef to 'T&'
|
||||
typedef Iter key_type; ///< typedef to 'T*'
|
||||
typedef std::remove_const_t<T> value_type; ///< typedef to 'T'
|
||||
typedef typename std::iterator_traits<Iter>::reference reference; ///< typedef to 'T&'
|
||||
typedef boost::lvalue_property_map_tag category; ///< `boost::lvalue_property_map_tag`
|
||||
|
||||
/// Access a property map element.
|
||||
///
|
||||
/// @tparam Iter Type convertible to `key_type`.
|
||||
template <class Iter>
|
||||
value_type& operator[](Iter it) const { return *it; }
|
||||
template <class Iter_> // template kept for backward compatibility
|
||||
reference operator[](const Iter_& it) const { return *it; }
|
||||
};
|
||||
|
||||
/// Free function to create a `Dereference_property_map` property map.
|
||||
|
|
@ -211,11 +333,14 @@ struct Identity_property_map
|
|||
typedef T& reference;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
|
||||
value_type& operator[](key_type& k) const { return k; }
|
||||
T& operator[](T& k) const { return k; }
|
||||
const T& operator[](const T& k) const { return k; }
|
||||
T operator[](T&& k) const { return std::forward<T>(k); }
|
||||
|
||||
friend value_type& get(const Self&, key_type& k) { return k; }
|
||||
friend const value_type& get(const Self&, const key_type& k) { return k; }
|
||||
friend void put(const Self&, key_type& k, const value_type& v) { k = v; }
|
||||
friend T& get(const Self&, T& k) { return k; }
|
||||
friend const T& get(const Self&, const T& k) { return k; }
|
||||
friend T get(const Self&, T&& k) { return std::forward<T>(k); }
|
||||
friend void put(const Self&, T& k, const T& v) { k = v; }
|
||||
/// \endcond
|
||||
};
|
||||
|
||||
|
|
@ -600,6 +725,57 @@ make_cartesian_converter_property_map(Vpm vpm)
|
|||
return Cartesian_converter_property_map<GeomObject, Vpm>(vpm);
|
||||
}
|
||||
|
||||
/// \ingroup PkgPropertyMapRef
|
||||
/// A property map with `std::size_t` as key-type that can be used
|
||||
/// to access the i'th element in a container with random access.
|
||||
/// \cgalModels `LvaluePropertyMap`, constness being than of `Container`.
|
||||
template<typename Container>
|
||||
class Random_access_property_map
|
||||
{
|
||||
Container& m_container;
|
||||
|
||||
public:
|
||||
using Iterator = std::conditional_t<std::is_const<Container>::value,
|
||||
typename Container::const_iterator,
|
||||
typename Container::iterator>;
|
||||
typedef std::size_t key_type;
|
||||
typedef typename std::iterator_traits<Iterator>::value_type value_type;
|
||||
typedef typename std::iterator_traits<Iterator>::reference reference;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
|
||||
|
||||
Random_access_property_map(Container& container)
|
||||
: m_container(container){}
|
||||
|
||||
friend reference get (Random_access_property_map map, key_type index)
|
||||
{
|
||||
return map.m_container[index];
|
||||
}
|
||||
|
||||
template <class Key>
|
||||
friend void put (Random_access_property_map map, Key index, const value_type& value,
|
||||
std::enable_if_t<!std::is_const<Container>::value>* = 0)
|
||||
{
|
||||
map.m_container[index]=value;
|
||||
}
|
||||
|
||||
decltype(auto)
|
||||
operator[](key_type index) const
|
||||
{
|
||||
return m_container[index];
|
||||
}
|
||||
};
|
||||
|
||||
/// \ingroup PkgPropertyMapRef
|
||||
/// \relates Random_access_property_map
|
||||
/// returns `Random_access_property_map<Container>(container)`
|
||||
template <class Container>
|
||||
Random_access_property_map<Container>
|
||||
make_random_access_property_map(Container& container)
|
||||
{
|
||||
return Random_access_property_map<Container>(container);
|
||||
}
|
||||
|
||||
/// \cond SKIP_IN_MANUAL
|
||||
// Syntaxic sugar for transform_iterator+pmap_to_unary_function
|
||||
template <typename Iterator, typename Pmap>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
\cgalPkgPicture{knot_small.png}
|
||||
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Clément Jamin, Laurent Rineau, Stéphane Tayeb, Jane Tournois, Mariette Yvinec}
|
||||
\cgalPkgAuthors{Pierre Alliez, Clément Jamin, Laurent Rineau, Stéphane Tayeb, Jane Tournois, and Mariette Yvinec}
|
||||
\cgalPkgDesc{This package provides a data structure to store three-dimensional
|
||||
simplicial meshes and their subcomplexes.
|
||||
It provides an API for tetrahedral meshes generated with %CGAL or not,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <CGAL/memory.h>
|
||||
#include <boost/functional/hash.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -175,7 +174,6 @@ namespace internal {
|
|||
};
|
||||
|
||||
|
||||
|
||||
template <class T, class Alloc>
|
||||
std::size_t hash_value(const In_place_list_iterator<T,Alloc>& i)
|
||||
{
|
||||
|
|
@ -792,8 +790,7 @@ namespace std {
|
|||
|
||||
std::size_t operator()(const CGAL::internal::In_place_list_iterator<T, Alloc>& i) const
|
||||
{
|
||||
const T* ptr = i.operator->();
|
||||
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
|
||||
return CGAL::internal::hash_value(i);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -803,8 +800,7 @@ namespace std {
|
|||
|
||||
std::size_t operator()(const CGAL::internal::In_place_list_const_iterator<T, Alloc>& i) const
|
||||
{
|
||||
const T* ptr =i.operator->();
|
||||
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
|
||||
return CGAL::internal::hash_value(i);
|
||||
}
|
||||
};
|
||||
#endif // CGAL_CFG_NO_STD_HASH
|
||||
|
|
|
|||
|
|
@ -257,18 +257,21 @@ CGAL_add_named_parameter(reorient_bbox_t, reorient_bbox, reorient_bbox)
|
|||
CGAL_add_named_parameter(distance_tolerance_t, distance_tolerance, distance_tolerance)
|
||||
CGAL_add_named_parameter(angle_tolerance_t, angle_tolerance, angle_tolerance)
|
||||
CGAL_add_named_parameter(debug_t, debug, debug)
|
||||
|
||||
// region growing
|
||||
CGAL_add_named_parameter(k_neighbors_t, k_neighbors, k_neighbors)
|
||||
CGAL_add_named_parameter(distance_threshold_t, distance_threshold, distance_threshold)
|
||||
CGAL_add_named_parameter(angle_threshold_t, angle_threshold, angle_threshold)
|
||||
CGAL_add_named_parameter(min_region_size_t, min_region_size, min_region_size)
|
||||
CGAL_add_named_parameter(regularize_t, regularize, regularize)
|
||||
CGAL_add_named_parameter(graphcut_beta_t, graphcut_beta, graphcut_beta)
|
||||
|
||||
// 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_distance_t, maximum_distance, maximum_distance)
|
||||
CGAL_add_named_parameter(minimum_region_size_t, minimum_region_size, minimum_region_size)
|
||||
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(item_map_t, item_map, item_map)
|
||||
CGAL_add_named_parameter(cosine_of_maxium_angle_t, cosine_of_maxium_angle, cosine_of_maxium_angle)
|
||||
CGAL_add_named_parameter(minimum_radius_t, minimum_radius, minimum_radius)
|
||||
CGAL_add_named_parameter(maximum_radius_t, maximum_radius, maximum_radius)
|
||||
|
||||
// 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_angle_t, maximum_angle, maximum_angle)
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
|
|
@ -135,6 +136,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
template < class T, class Ref, class Ptr>
|
||||
std::size_t hash_value(const vector_iterator<T, Ref, Ptr>& i)
|
||||
{
|
||||
Ptr ptr = i.operator->();
|
||||
return reinterpret_cast<std::size_t>(ptr)/ sizeof(T);
|
||||
}
|
||||
|
||||
template < class T, class Ref, class Ptr> inline
|
||||
vector_iterator<T,Ref,Ptr>
|
||||
operator+( std::ptrdiff_t n, vector_iterator<T,Ref,Ptr> i) {
|
||||
|
|
@ -609,4 +617,31 @@ void vector<T, Alloc>::insert( iterator position, size_type n, const T& x) {
|
|||
|
||||
} //namespace CGAL
|
||||
|
||||
namespace std {
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4099) // For VC10 it is class hash
|
||||
#endif
|
||||
|
||||
#ifndef CGAL_CFG_NO_STD_HASH
|
||||
|
||||
template < class T, class Ref, class Ptr>
|
||||
struct hash<CGAL::internal::vector_iterator<T, Ref, Ptr> >
|
||||
: public CGAL::cpp98::unary_function<CGAL::internal::vector_iterator<T, Ref, Ptr>, std::size_t> {
|
||||
|
||||
std::size_t operator()(const CGAL::internal::vector_iterator<T, Ref, Ptr>& i) const
|
||||
{
|
||||
return CGAL::internal::hash_value(i);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CGAL_CFG_NO_STD_HASH
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // CGAL_VECTOR_H //
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
\cgalPkgDescriptionBegin{Scale-Space Surface Reconstruction,PkgScaleSpaceReconstruction3}
|
||||
\cgalPkgPicture{knot_thumb.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Thijs van Lankveld}
|
||||
\cgalPkgAuthor{Thijs van Lankveld}
|
||||
\cgalPkgDesc{This method allows to reconstruct a surface that interpolates a set of 3D points using either an alpha shape or the advancing front surface reconstruction method. The output interpolates the point set (as opposed to approximating the point set). How the surface connects the points depends on a scale variable, which can be estimated semi-automatically.}
|
||||
\cgalPkgManuals{Chapter_Scale_space_reconstruction,PkgScaleSpaceReconstruction3Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ public:
|
|||
#endif
|
||||
|
||||
#ifdef DOXYGEN_RUNNING
|
||||
typedef unspecified_type Facet_iterator; ///< defines an iterator over the points.
|
||||
typedef const unspecified_type Facet_const_iterator; ///< defines a constant iterator over the points.
|
||||
typedef unspecified_type Facet_iterator; ///< defines an iterator over the facets.
|
||||
typedef const unspecified_type Facet_const_iterator; ///< defines a constant iterator over the facets.
|
||||
#else
|
||||
typedef typename std::vector<Facet> Facet_vector;
|
||||
typedef typename Facet_vector::iterator Facet_iterator;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
#!/bin/bash
|
||||
echo "| repo | workflow | branch | event | runs on | status of last run | state | annotation | date | date since last runs | file |"
|
||||
echo "| :--: | :--------: | :----: | :---: | :------: | :------------------: | :---: | :--------: | :----: | :------------------: | :----: |"
|
||||
actualdate=$EPOCHSECONDS
|
||||
for repo in $(gh api orgs/CGAL/repos --jq '.[].full_name' | grep -v dev )
|
||||
do
|
||||
if [ "$repo" != "CGAL/CNRS" ] && [ "$repo" != "CGAL/GeometryFactory" ]
|
||||
then
|
||||
default_branch=$(gh api repos/$repo --jq '.default_branch')
|
||||
workflows=$(gh api repos/$repo/actions/workflows)
|
||||
workflows_count=$(jq '.total_count' <<< "$workflows")
|
||||
for ((i=0;i<workflows_count;i++))
|
||||
do
|
||||
workflow_id=$(jq '.workflows['$i'].id' <<< "$workflows")
|
||||
workflows_state=$(jq '.workflows['$i'].state' <<< "$workflows")
|
||||
workflow_runs=$(gh api repos/$repo/actions/workflows/$workflow_id/runs)
|
||||
workflows_name=$(jq -e '.workflow_runs[0].name' <<< "$workflow_runs")
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
workflows_status=$(jq -r '.workflow_runs[0].status' <<< "$workflow_runs")
|
||||
workflows_conclusion=$(jq -r '.workflow_runs[0].conclusion' <<< "$workflow_runs")
|
||||
workflows_start=$(jq -r '.workflow_runs[0].run_started_at' <<< "$workflow_runs")
|
||||
workflows_date=$( date --date="$workflows_start" +%s )
|
||||
workflows_on=$(jq -r '.workflow_runs[0].event' <<< "$workflow_runs")
|
||||
workflows_path=$(jq -r '.workflow_runs[0].path' <<< "$workflow_runs")
|
||||
workflows_branch=$(jq -r '.workflow_runs[0].head_branch' <<< "$workflow_runs")
|
||||
workflows_checksuite_id=$(jq -r '.workflow_runs[0].check_suite_id' <<< "$workflow_runs")
|
||||
workflows_check_runs=$(gh api repos/$repo/check-suites/$workflows_checksuite_id/check-runs)
|
||||
workflows_check_runs_id=$(jq -r '.check_runs[0].id' <<< "$workflows_check_runs")
|
||||
workflows_check_runs_annotation=$(gh api repos/$repo/check-runs/$workflows_check_runs_id/annotations)
|
||||
worfklows_annotation_level=$(jq -r '.[].annotation_level' <<< "$workflows_check_runs_annotation")
|
||||
if [ "$worfklows_annotation_level" == "" ]
|
||||
then
|
||||
worfklows_annotation_level+="-"
|
||||
fi
|
||||
workflows_event=""
|
||||
for trigger in $(curl --silent https://raw.githubusercontent.com/$repo/$default_branch/$workflows_path | yq '.on' | grep -v ' .*'); do
|
||||
if [ "${trigger}" != "-" ]
|
||||
then
|
||||
workflows_event+=${trigger}
|
||||
workflows_event+="<br/>"
|
||||
fi
|
||||
done
|
||||
echo "| $repo | $workflows_name | $workflows_branch | $workflows_event | $workflows_on | $workflows_status - $workflows_conclusion | $workflows_state | ***$worfklows_annotation_level*** | $workflows_start | $(((actualdate - workflows_date) / 86400 )) days | $repo/$workflows_path"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "| repo | dependabot |"
|
||||
echo "| :--: | :--------: |"
|
||||
for repo in $(gh api orgs/CGAL/repos --jq '.[].full_name' | grep -v dev )
|
||||
do
|
||||
if [ "$repo" != "CGAL/CNRS" ] && [ "$repo" != "CGAL/GeometryFactory" ]
|
||||
then
|
||||
default_branch=$(gh api repos/$repo --jq '.default_branch')
|
||||
workflows=$(gh api repos/$repo/actions/workflows)
|
||||
workflows_count=$(jq '.total_count' <<< "$workflows")
|
||||
if [ $workflows_count != 0 ]
|
||||
then
|
||||
dependabot=$(curl --silent https://raw.githubusercontent.com/$repo/$default_branch/.github/dependabot.yml)
|
||||
dependabotexist=""
|
||||
if [ "$dependabot" != "404: Not Found" ]
|
||||
then
|
||||
dependabotexist="yes"
|
||||
else
|
||||
dependabotexist="no"
|
||||
fi
|
||||
echo "| $repo | $dependabotexist |"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue