mirror of https://github.com/CGAL/cgal
Compare commits
131 Commits
d1d3ea5248
...
f503ce9359
| Author | SHA1 | Date |
|---|---|---|
|
|
f503ce9359 | |
|
|
85ef57ffa1 | |
|
|
aefbc23955 | |
|
|
7bf5687d5d | |
|
|
cda931ec46 | |
|
|
e98fa21cc9 | |
|
|
e0a720452d | |
|
|
c856e40662 | |
|
|
ef6f9d8c3c | |
|
|
18e5836373 | |
|
|
3e1a8c110d | |
|
|
3ebe9203a7 | |
|
|
9bd1705bf8 | |
|
|
0fc710e95d | |
|
|
dee5ed8cc2 | |
|
|
737bcb264e | |
|
|
2f9854b422 | |
|
|
e12a760f03 | |
|
|
1602be1348 | |
|
|
12445cc6e1 | |
|
|
12a0f67674 | |
|
|
07347da411 | |
|
|
d226e504c4 | |
|
|
097fc2c5ab | |
|
|
c751ee6bc9 | |
|
|
066159f792 | |
|
|
31734df2ef | |
|
|
3ef43324bb | |
|
|
3c7d507530 | |
|
|
ffda347171 | |
|
|
a9b369650a | |
|
|
faae741666 | |
|
|
9e36c6744b | |
|
|
05bf3c4ffc | |
|
|
25005a97d8 | |
|
|
2a5351cc0a | |
|
|
f508d6fe1d | |
|
|
3fe83c7ce0 | |
|
|
7f4703e248 | |
|
|
e13da7cbd4 | |
|
|
5cc8ec7d71 | |
|
|
b66ebf958b | |
|
|
c60cc5049d | |
|
|
80b4d1a1be | |
|
|
b5c3b5f895 | |
|
|
ab9e0ebc8a | |
|
|
6706e0468e | |
|
|
fd21dfb67d | |
|
|
bc42fb4a40 | |
|
|
07e0ea785d | |
|
|
edbc32959d | |
|
|
b068e62ffb | |
|
|
b85035ff87 | |
|
|
c48b4cb6c2 | |
|
|
d34201ed38 | |
|
|
15a155ec30 | |
|
|
e02c1495bf | |
|
|
28d6ac5e49 | |
|
|
adfcc7d102 | |
|
|
c5b5a54952 | |
|
|
5085762946 | |
|
|
b3cb80760c | |
|
|
098e05e134 | |
|
|
4d6541c3c4 | |
|
|
4ed4d096bf | |
|
|
712464b690 | |
|
|
7fe0100855 | |
|
|
e7ab5002a3 | |
|
|
940ac3d6e4 | |
|
|
3bfc5f32f5 | |
|
|
8746a29fa9 | |
|
|
b08f0a4aae | |
|
|
0cca10d79f | |
|
|
bc770242a5 | |
|
|
61013d5053 | |
|
|
d7faad95dd | |
|
|
a507911b09 | |
|
|
42068f6009 | |
|
|
bac2c06026 | |
|
|
75c2ac5a68 | |
|
|
b11e42c4a7 | |
|
|
7d9dbdafcd | |
|
|
21df7dad86 | |
|
|
3e77bff198 | |
|
|
754e57ac3c | |
|
|
4d3d2f4f03 | |
|
|
626675ea08 | |
|
|
71c2425b6e | |
|
|
c26c013b5a | |
|
|
89393e1b7c | |
|
|
ba10efcbe4 | |
|
|
2a815ff510 | |
|
|
10a9d44a10 | |
|
|
2f6e3defa7 | |
|
|
8c150b865c | |
|
|
d309bc89ce | |
|
|
f4aa383177 | |
|
|
b26b07a124 | |
|
|
2fd9aed0b6 | |
|
|
1536d9db5d | |
|
|
9cdaacb7d0 | |
|
|
4176a2a551 | |
|
|
b5a180d9df | |
|
|
757cc8525d | |
|
|
79cb90d5e7 | |
|
|
7df5c3a7bb | |
|
|
88f9f00922 | |
|
|
23e624b0e8 | |
|
|
3f088282c5 | |
|
|
44e3994c51 | |
|
|
1a2c061364 | |
|
|
f6ebe208e9 | |
|
|
5e80ca60bb | |
|
|
538c2721b3 | |
|
|
9a241b2a9d | |
|
|
ca5f64b973 | |
|
|
9726fb59bc | |
|
|
31901d0197 | |
|
|
7267b3a347 | |
|
|
9d08d4087d | |
|
|
489a9675dd | |
|
|
92fab37129 | |
|
|
c5ad5bb113 | |
|
|
2a8a32d6ad | |
|
|
0b2ebbc23e | |
|
|
0273049541 | |
|
|
e187dc03cb | |
|
|
ad20fa497a | |
|
|
4cfd48ba76 | |
|
|
b66c3743ec | |
|
|
5b2887240c |
|
|
@ -1,35 +1,63 @@
|
|||
---
|
||||
# CGAL clang-format configuration
|
||||
# This file defines the code formatting style for C++ files in the CGAL project.
|
||||
|
||||
Language: Cpp
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AllowShortFunctionsOnASingleLine: true
|
||||
BinPackParameters: false
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
|
||||
# Indentation
|
||||
AccessModifierOffset: -2 # Indent public:/private:/protected: 2 spaces to the left
|
||||
|
||||
# Function formatting
|
||||
AllowShortFunctionsOnASingleLine: Inline # Allow short inline/member functions on one line, but not free functions
|
||||
AlwaysBreakAfterReturnType: None # Don't force return type on separate line
|
||||
|
||||
# Parameter and argument formatting
|
||||
BinPackParameters: false # Put each parameter on its own line for better readability
|
||||
|
||||
# Constructor formatting
|
||||
BreakConstructorInitializers: BeforeComma # Put comma before each initializer: `MyClass() \n , member1(val1) \n , member2(val2)`
|
||||
|
||||
# Brace wrapping configuration
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterControlStatement: MultiLine
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: true
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: false
|
||||
ColumnLimit: 120
|
||||
# Force pointers to the type for C++.
|
||||
AfterCaseLabel: false # Don't put brace on new line after case labels
|
||||
AfterClass: true # Put opening brace on new line after class definition
|
||||
AfterControlStatement: MultiLine # Only break before braces if the control statement spans multiple lines
|
||||
AfterEnum: false # Don't break after enum
|
||||
AfterFunction: false # Don't break after function declaration (keep on same line)
|
||||
AfterNamespace: false # Don't break after namespace
|
||||
AfterObjCDeclaration: false # Objective-C related (not used in CGAL)
|
||||
AfterStruct: true # Put opening brace on new line after struct definition
|
||||
AfterUnion: false # Don't break after union
|
||||
AfterExternBlock: false # Don't break after extern "C" blocks
|
||||
BeforeCatch: false # Don't put catch on new line
|
||||
BeforeElse: false # Don't put else on new line
|
||||
BeforeLambdaBody: false # Don't break before lambda body
|
||||
BeforeWhile: false # Don't put while on new line (do-while loops)
|
||||
IndentBraces: false # Don't indent the braces themselves
|
||||
SplitEmptyFunction: false # Don't split empty functions across lines
|
||||
SplitEmptyRecord: false # Don't split empty classes/structs across lines
|
||||
SplitEmptyNamespace: false # Don't split empty namespaces across lines
|
||||
|
||||
# Line length
|
||||
ColumnLimit: 120 # Maximum line length of 120 characters
|
||||
|
||||
# Pointer and reference alignment
|
||||
# Force pointers and references to align with the type (e.g., `int* ptr` not `int *ptr`)
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
# Control the spaces around conditionals
|
||||
SpacesInConditionalStatement: false
|
||||
SpaceBeforeParens: false
|
||||
|
||||
# Spacing in control statements
|
||||
SpacesInConditionalStatement: false # No extra spaces inside conditionals: `if(condition)` not `if( condition )`
|
||||
SpaceBeforeParens: false # No space before parentheses: `if(` not `if (`
|
||||
|
||||
# Include directive handling
|
||||
SortIncludes: Never # Preserve the original order of #include statements (don't sort them)
|
||||
|
||||
# Preprocessor directive formatting
|
||||
IndentPPDirectives: None # Don't indent preprocessor directives (#ifdef, #include, etc.)
|
||||
|
||||
# Blank line handling
|
||||
MaxEmptyLinesToKeep: 2 # Keep up to 2 consecutive blank lines
|
||||
...
|
||||
|
|
|
|||
|
|
@ -509,7 +509,8 @@ the requirement for traversal of all faces in a graph.
|
|||
/// I/O Functions for the \ref IOStream3MF
|
||||
/// \ingroup PkgBGLIOFct
|
||||
|
||||
|
||||
/// \defgroup PkgBGLIOFctDeprecated I/O Functions (Deprecated)
|
||||
/// \ingroup PkgBGLIOFct
|
||||
|
||||
/*!
|
||||
\addtogroup PkgBGLPropertiesDynamic
|
||||
|
|
|
|||
|
|
@ -1543,10 +1543,10 @@ does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor
|
|||
*
|
||||
* After the collapse of edge `e` the following holds:
|
||||
* - The edge `e` is no longer in `g`.
|
||||
* - The faces incident to edge `e` are no longer in `g`.
|
||||
* - The triangle faces incident to edge `e` are no longer in `g`.
|
||||
* - `v0` is no longer in `g`.
|
||||
* - If `h` is not a border halfedge, `p_h` is no longer in `g` and is replaced by `o_n_h`.
|
||||
* - If the opposite of `h` is not a border halfedge, `p_o_h` is no longer in `g` and is replaced by `o_n_o_h`.
|
||||
* - If `h` is part of a triangle face, `p_h` is no longer in `g` and is replaced by `o_n_h`.
|
||||
* - If the opposite of `h` is part of a triangle face, `p_o_h` is no longer in `g` and is replaced by `o_n_o_h`.
|
||||
* - The halfedges kept in `g` that had `v0` as target and source now have `v1` as target and source, respectively.
|
||||
* - No other incidence information is changed in `g`.
|
||||
*
|
||||
|
|
@ -1575,9 +1575,8 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
|
|||
bool lBottomFaceExists = ! is_border(qp,g);
|
||||
bool lTopLeftFaceExists = lTopFaceExists && ! is_border(pt,g);
|
||||
bool lBottomRightFaceExists = lBottomFaceExists && ! is_border(qb,g);
|
||||
|
||||
CGAL_precondition( !lTopFaceExists || (lTopFaceExists && ( degree(target(pt, g), g) > 2 ) ) ) ;
|
||||
CGAL_precondition( !lBottomFaceExists || (lBottomFaceExists && ( degree(target(qb, g), g) > 2 ) ) ) ;
|
||||
bool lBottomIsTriangle = lBottomFaceExists && is_triangle(qp,g);
|
||||
bool lTopIsTriangle = lTopFaceExists && is_triangle(pq,g);
|
||||
|
||||
vertex_descriptor q = target(pq, g);
|
||||
vertex_descriptor p = source(pq, g);
|
||||
|
|
@ -1585,7 +1584,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
|
|||
|
||||
bool lP_Erased = false;
|
||||
|
||||
if ( lTopFaceExists )
|
||||
if ( lTopIsTriangle)
|
||||
{
|
||||
CGAL_precondition( ! is_border(opposite(pt, g),g) ) ; // p-q-t is a face of the mesh
|
||||
if ( lTopLeftFaceExists )
|
||||
|
|
@ -1612,7 +1611,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
|
|||
}
|
||||
}
|
||||
|
||||
if ( lBottomFaceExists )
|
||||
if ( lBottomIsTriangle)
|
||||
{
|
||||
CGAL_precondition( ! is_border(opposite(qb, g),g) ) ; // p-q-b is a face of the mesh
|
||||
if ( lBottomRightFaceExists )
|
||||
|
|
@ -1659,7 +1658,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
|
|||
* collapses an edge in a graph having non-collapsable edges.
|
||||
*
|
||||
* Let `h` be the halfedge of `e`, and let `v0` and `v1` be the source and target vertices of `h`.
|
||||
* Collapses the edge `e` replacing it with `v1`, as described in the paragraph above
|
||||
* Collapses the edge `e` replacing it with `v1`, as described in the other overload
|
||||
* and guarantees that an edge `e2`, for which `get(edge_is_constrained_map, e2)==true`,
|
||||
* is not removed after the collapse.
|
||||
*
|
||||
|
|
@ -1669,14 +1668,14 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
|
|||
*
|
||||
* \returns vertex `v1`.
|
||||
* \pre This function requires `g` to be an oriented 2-manifold with or without boundaries.
|
||||
* Furthermore, the edge `v0v1` must satisfy the link condition, which guarantees that the surface mesh is also 2-manifold after the edge collapse.
|
||||
* \pre `get(edge_is_constrained_map, v0v1)==false`.
|
||||
* Furthermore, the edge `e` must satisfy the link condition, which guarantees that the surface mesh is also 2-manifold after the edge collapse.
|
||||
* \pre `get(edge_is_constrained_map, e)==false`.
|
||||
* \pre `v0` and `v1` are not both incident to a constrained edge.
|
||||
*/
|
||||
|
||||
template<typename Graph, typename EdgeIsConstrainedMap>
|
||||
typename boost::graph_traits<Graph>::vertex_descriptor
|
||||
collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
||||
collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
|
||||
Graph& g,
|
||||
EdgeIsConstrainedMap Edge_is_constrained_map)
|
||||
{
|
||||
|
|
@ -1684,11 +1683,11 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
typedef typename Traits::vertex_descriptor vertex_descriptor;
|
||||
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
|
||||
|
||||
CGAL_precondition(is_valid_edge_descriptor(v0v1, g));
|
||||
CGAL_precondition(does_satisfy_link_condition(v0v1,g));
|
||||
CGAL_precondition(!get(Edge_is_constrained_map, v0v1));
|
||||
CGAL_precondition(is_valid_edge_descriptor(e, g));
|
||||
CGAL_precondition(does_satisfy_link_condition(e,g));
|
||||
CGAL_precondition(!get(Edge_is_constrained_map, e));
|
||||
|
||||
halfedge_descriptor pq = halfedge(v0v1,g);
|
||||
halfedge_descriptor pq = halfedge(e,g);
|
||||
|
||||
halfedge_descriptor qp = opposite(pq,g);
|
||||
halfedge_descriptor pt = opposite(prev(pq,g),g);
|
||||
|
|
@ -1698,6 +1697,8 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
|
||||
bool lTopFaceExists = ! is_border(pq,g) ;
|
||||
bool lBottomFaceExists = ! is_border(qp,g) ;
|
||||
bool lTopIsTriangle = lTopFaceExists && is_triangle(pq,g);
|
||||
bool lBottomIsTriangle = lBottomFaceExists && is_triangle(qp,g);
|
||||
|
||||
vertex_descriptor q = target(pq,g);
|
||||
vertex_descriptor p = source(pq,g);
|
||||
|
|
@ -1708,7 +1709,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
|
||||
// If the top facet exists, we need to choose one out of the two edges which one disappears:
|
||||
// p-t if it is not constrained and t-q otherwise
|
||||
if ( lTopFaceExists )
|
||||
if ( lTopIsTriangle )
|
||||
{
|
||||
if ( !get(Edge_is_constrained_map,edge(pt,g)) )
|
||||
{
|
||||
|
|
@ -1722,7 +1723,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
|
||||
// If the bottom facet exists, we need to choose one out of the two edges which one disappears:
|
||||
// q-b if it is not constrained and b-p otherwise
|
||||
if ( lBottomFaceExists )
|
||||
if ( lBottomIsTriangle )
|
||||
{
|
||||
if ( !get(Edge_is_constrained_map,edge(qb,g)) )
|
||||
{
|
||||
|
|
@ -1733,7 +1734,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
}
|
||||
}
|
||||
|
||||
if (lTopFaceExists && lBottomFaceExists)
|
||||
if (lTopIsTriangle && lBottomIsTriangle)
|
||||
{
|
||||
if ( face(edges_to_erase[0],g) == face(edges_to_erase[1],g)
|
||||
&& (! is_border(edges_to_erase[0],g)) )
|
||||
|
|
@ -1780,7 +1781,7 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (lTopFaceExists)
|
||||
if (lTopIsTriangle)
|
||||
{
|
||||
if (!(is_border(edges_to_erase[0],g))){
|
||||
join_face(edges_to_erase[0],g);
|
||||
|
|
@ -1795,21 +1796,32 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
|||
remove_face(opposite(edges_to_erase[0],g),g);
|
||||
return q;
|
||||
}
|
||||
|
||||
if (! (is_border(edges_to_erase[0],g))){
|
||||
// q will be removed, swap it with p
|
||||
internal::swap_vertices(p, q, g);
|
||||
join_face(edges_to_erase[0],g);
|
||||
join_vertex(qp,g);
|
||||
return q;
|
||||
}
|
||||
if(!is_border(opposite(next(qp,g),g),g))
|
||||
else
|
||||
{
|
||||
// q will be removed, swap it with p
|
||||
internal::swap_vertices(p, q, g);
|
||||
if (lBottomIsTriangle)
|
||||
{
|
||||
if (! (is_border(edges_to_erase[0],g))){
|
||||
// q will be removed, swap it with p
|
||||
internal::swap_vertices(p, q, g);
|
||||
join_face(edges_to_erase[0],g);
|
||||
CGAL_assertion(source(qp,g)==p);
|
||||
join_vertex(qp,g);
|
||||
return q;
|
||||
}
|
||||
if(!is_border(opposite(next(qp,g),g),g))
|
||||
{
|
||||
// q will be removed, swap it with p
|
||||
internal::swap_vertices(p, q, g);
|
||||
}
|
||||
remove_face(opposite(edges_to_erase[0],g),g);
|
||||
return q;
|
||||
}
|
||||
else
|
||||
{
|
||||
join_vertex(pq,g);
|
||||
return q;
|
||||
}
|
||||
}
|
||||
remove_face(opposite(edges_to_erase[0],g),g);
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -247,7 +247,36 @@ bool read_OFF(const std::string& fname,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(is, g, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::read_OFF(fname, g, np);
|
||||
}
|
||||
template <typename Graph>
|
||||
CGAL_DEPRECATED bool read_off(const std::string& fname, Graph& g)
|
||||
{
|
||||
return read_off(fname.c_str(), g, parameters::default_values());
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -424,6 +453,31 @@ bool write_OFF(const std::string& fname,
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_OFF(os, g, np);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_OFF(fname, g, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -529,7 +529,20 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_VTP()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_VTP(os, g, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,20 @@ bool write_WRL(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np
|
|||
|
||||
} // namespace IO
|
||||
|
||||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
/*!
|
||||
\ingroup PkgBGLIOFctDeprecated
|
||||
|
||||
\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_WRL()` should be used instead.
|
||||
*/
|
||||
template <typename Graph, typename CGAL_NP_TEMPLATE_PARAMETERS>
|
||||
CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values())
|
||||
{
|
||||
return IO::write_WRL(os, g, np);
|
||||
}
|
||||
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -871,54 +871,7 @@ private:
|
|||
*/
|
||||
template <typename Graph>
|
||||
class Face_around_face_circulator
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
: public boost::iterator_adaptor<
|
||||
Face_around_face_circulator<Graph> // Derived
|
||||
, Halfedge_around_face_circulator<Graph> // Base
|
||||
, typename boost::graph_traits<Graph>::face_descriptor // Value
|
||||
, Bidirectional_circulator_tag // CategoryOrTraversal
|
||||
, typename boost::graph_traits<Graph>::face_descriptor // Reference
|
||||
>
|
||||
#endif
|
||||
{
|
||||
internal::Opposite_face<Graph> fct;
|
||||
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
|
||||
|
||||
public:
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
typedef std::size_t size_type;
|
||||
#endif
|
||||
|
||||
Face_around_face_circulator()
|
||||
{}
|
||||
|
||||
Face_around_face_circulator(halfedge_descriptor h, const Graph& g)
|
||||
: Face_around_face_circulator::iterator_adaptor_(Halfedge_around_face_circulator<Graph>(h,g)), fct(g)
|
||||
{}
|
||||
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
|
||||
explicit operator bool() const
|
||||
{
|
||||
return (! (this->base_reference() == nullptr));
|
||||
}
|
||||
|
||||
bool operator== (void*) const
|
||||
{
|
||||
return this->base_reference()== nullptr;
|
||||
}
|
||||
|
||||
bool operator!= (void*) const
|
||||
{
|
||||
return this->base_reference()!= nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
friend class boost::iterator_core_access;
|
||||
typename boost::graph_traits<Graph>::face_descriptor dereference() const { return fct(*this->base_reference()); }
|
||||
#endif
|
||||
|
||||
};
|
||||
{};
|
||||
|
||||
/**
|
||||
* \ingroup PkgBGLIterators
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ create_single_source_cgal_program("test_graph_traits.cpp")
|
|||
create_single_source_cgal_program("test_Properties.cpp")
|
||||
create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp")
|
||||
create_single_source_cgal_program("graph_traits_inheritance.cpp" )
|
||||
create_single_source_cgal_program("test_deprecated_io.cpp")
|
||||
|
||||
find_package(OpenMesh QUIET)
|
||||
if(OpenMesh_FOUND)
|
||||
|
|
@ -68,6 +69,8 @@ if (VTK_FOUND AND VTK_LIBRARIES)
|
|||
message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
|
||||
target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
|
||||
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
|
||||
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
|
||||
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
|
||||
else()
|
||||
message(STATUS "Tests that use VTK will not be compiled.")
|
||||
endif() #VTK_FOUND
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
OFF
|
||||
25 13 0
|
||||
|
||||
0.39160239696502686 1.3864846229553223 4.8046874923102223e-08
|
||||
0.053782559931278229 1.3864846229553223 4.8046874923102223e-08
|
||||
-0.94644606113433838 1.6651756763458252 4.8046874923102223e-08
|
||||
-1.3082554340362549 1.7385153770446777 4.8046874923102223e-08
|
||||
-1.3033660650253296 1.1860226392745972 4.8046874923102223e-08
|
||||
1.61628258228302 -0.17601536214351654 4.8046874923102223e-08
|
||||
0.55834579467773438 -0.19216139614582062 4.8046874923102223e-08
|
||||
0.053782559931278229 -0.17601536214351654 4.8046874923102223e-08
|
||||
-0.24240998923778534 -0.22679123282432556 4.8046874923102223e-08
|
||||
-0.58168435096740723 -0.25845989584922791 4.8046874923102223e-08
|
||||
-1.2915089130401611 -0.17601536214351654 4.8046874923102223e-08
|
||||
-1.50871741771698 -0.17601536214351654 4.8046874923102223e-08
|
||||
1.61628258228302 -1.7385153770446777 4.8046874923102223e-08
|
||||
1.1978726387023926 -1.7385153770446777 4.8046874923102223e-08
|
||||
0.71942150592803955 -1.7385153770446777 4.8046874923102223e-08
|
||||
0.053782559931278229 -1.7385153770446777 4.8046874923102223e-08
|
||||
-0.73973840475082397 -1.7385153770446777 4.8046874923102223e-08
|
||||
1.61628258228302 0.36264327168464661 4.8046874923102223e-08
|
||||
-0.26156377792358398 0.45463424921035767 4.8046874923102223e-08
|
||||
-0.028661971911787987 -0.78840988874435425 4.8046874923102223e-08
|
||||
0.053782559931278229 -1.2213115692138672 4.8046874923102223e-08
|
||||
-1.5918357372283936 1.5331641435623169 4.8046874923102223e-08
|
||||
-1.6162823438644409 0.87338578701019287 4.8046874923102223e-08
|
||||
-1.50871741771698 -0.0072435899637639523 4.8046874923102223e-08
|
||||
-1.50871741771698 -1.3000825643539429 4.8046874923102223e-08
|
||||
7 18 2 3 4 22 9 8
|
||||
3 2 18 1
|
||||
7 18 7 6 5 17 0 1
|
||||
7 12 5 6 7 8 19 13
|
||||
6 11 24 16 15 20 10
|
||||
3 9 19 8
|
||||
4 10 20 19 9
|
||||
3 7 18 8
|
||||
3 14 20 15
|
||||
4 13 19 20 14
|
||||
3 3 21 4
|
||||
4 9 22 23 10
|
||||
3 10 23 11
|
||||
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <CGAL/boost/graph/Euler_operations.h>
|
||||
#include <CGAL/boost/graph/IO/OFF.h>
|
||||
|
||||
#include <boost/range/distance.hpp>
|
||||
|
||||
#include <string>
|
||||
|
|
@ -213,12 +212,30 @@ collapse_edge_test()
|
|||
assert(found == 2);
|
||||
CGAL::clear(test_mesh);
|
||||
}
|
||||
// Case 6 non pure triangle mesh
|
||||
{
|
||||
Mesh ref;
|
||||
if(!CGAL::IO::read_OFF("data/polygon_mesh_to_collapse.off", ref))
|
||||
{
|
||||
std::cout << "Error reading file: data/polygon_mesh_to_collapse.off" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
std::size_t nbe=halfedges(ref).size();
|
||||
for (std::size_t i=0; i< nbe; ++i)
|
||||
{
|
||||
Mesh m = ref;
|
||||
auto h = *std::next(halfedges(m).begin(), i);
|
||||
|
||||
if (CGAL::Euler::does_satisfy_link_condition(edge(h,m),m))
|
||||
CGAL::Euler::collapse_edge(edge(h,m), m);
|
||||
assert(CGAL::is_valid_polygon_mesh(m));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
collapse_edge_test<Polyhedron>();
|
||||
collapse_edge_test<SM>();
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ typedef GraphTraits::edge_descriptor edge_descriptor;
|
|||
typedef GraphTraits::out_edge_iterator out_edge_iterator;
|
||||
typedef GraphTraits::in_edge_iterator in_edge_iterator;
|
||||
|
||||
typedef CGAL::Face_around_face_circulator<Polyhedron> face_around_face_circulator;
|
||||
typedef CGAL::Halfedge_around_face_circulator<Polyhedron> halfedge_around_face_circulator;
|
||||
typedef CGAL::Halfedge_around_target_circulator<Polyhedron> halfedge_around_target_circulator;
|
||||
typedef CGAL::Vertex_around_target_circulator<Polyhedron> vertex_around_target_circulator;
|
||||
|
|
@ -33,7 +32,6 @@ typedef CGAL::Vertex_around_target_iterator<Polyhedron> vertex_around_target_ite
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
BOOST_CONCEPT_ASSERT((CGAL::Concepts::BidirectionalCirculator<face_around_face_circulator>));
|
||||
BOOST_CONCEPT_ASSERT((CGAL::Concepts::BidirectionalCirculator<halfedge_around_face_circulator>));
|
||||
BOOST_CONCEPT_ASSERT((CGAL::Concepts::BidirectionalCirculator<halfedge_around_target_circulator>));
|
||||
BOOST_CONCEPT_ASSERT((CGAL::Concepts::BidirectionalCirculator<vertex_around_target_circulator>));
|
||||
|
|
@ -64,14 +62,6 @@ int main(int argc, char* argv[])
|
|||
}while(hafc != done);
|
||||
}
|
||||
|
||||
{
|
||||
face_around_face_circulator fafc(hd,P), done(fafc);
|
||||
|
||||
do {
|
||||
++fafc;
|
||||
}while(fafc != done);
|
||||
}
|
||||
|
||||
{
|
||||
halfedge_around_target_circulator havc(hd,P), done(havc);
|
||||
vertex_descriptor vd = target(hd,P);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/boost/graph/generators.h>
|
||||
|
||||
#include <CGAL/boost/graph/IO/OFF.h>
|
||||
#include <CGAL/boost/graph/IO/VTK.h>
|
||||
#include <CGAL/boost/graph/IO/WRL.h>
|
||||
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> Kernel;
|
||||
typedef Kernel::Point_3 Point_3;
|
||||
typedef CGAL::Surface_mesh<Point_3> SM;
|
||||
|
||||
int main()
|
||||
{
|
||||
// OFF
|
||||
SM sm_in, sm_out;
|
||||
Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0);
|
||||
CGAL::make_triangle(p0, p1, p2, sm_out);
|
||||
bool ok = CGAL::write_off("tmp_deprecated.off", sm_out);
|
||||
assert(ok);
|
||||
ok = CGAL::read_off("tmp_deprecated.off", sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
sm_in.clear();
|
||||
|
||||
std::ofstream os("tmp_deprecated.off");
|
||||
ok = CGAL::write_off(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
std::ifstream is("tmp_deprecated.off");
|
||||
ok = CGAL::read_off(is, sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
is.close();
|
||||
sm_in.clear();
|
||||
#ifdef CGAL_USE_VTK
|
||||
//vtk
|
||||
os.open("tmp_deprecated.vtp");
|
||||
ok = CGAL::write_vtp(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
|
||||
ok = CGAL::IO::read_VTP("tmp_deprecated.vtp", sm_in);
|
||||
assert(ok);
|
||||
assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1);
|
||||
sm_in.clear();
|
||||
#endif
|
||||
//wrl
|
||||
os.open("tmp_deprecated.wrl");
|
||||
ok = CGAL::write_wrl(os, sm_out);
|
||||
assert(ok);
|
||||
os.close();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
# Created by the script cgal_create_cmake_script.
|
||||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
project(Barycentric_coordinates_2_Benchmarks)
|
||||
|
||||
cmake_minimum_required(VERSION 3.12...3.31)
|
||||
project(Barycentric_coordinates_2_Benchmarks)
|
||||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
|
|
@ -14,8 +12,9 @@ create_single_source_cgal_program("benchmark_polygon_16_vertices.cpp")
|
|||
create_single_source_cgal_program("benchmark_polygon_100_vertices.cpp")
|
||||
create_single_source_cgal_program("benchmark_mv_34_vertices.cpp")
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
|
||||
target_link_libraries(benchmark_hm_4_vertices PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ create_single_source_cgal_program("terrain_height_modeling.cpp")
|
|||
# this code is deprecated:
|
||||
create_single_source_cgal_program("deprecated_coordinates.cpp")
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program("affine_coordinates.cpp")
|
||||
target_link_libraries(affine_coordinates PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -42,8 +42,9 @@ create_single_source_cgal_program("test_wp_deprecated_api.cpp")
|
|||
create_single_source_cgal_program("test_mv_deprecated_api.cpp")
|
||||
create_single_source_cgal_program("test_dh_deprecated_api.cpp")
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program("test_hm_unit_square.cpp")
|
||||
target_link_libraries(test_hm_unit_square PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ project(Basic_viewer_Examples)
|
|||
|
||||
#CGAL_Qt6 is needed for the drawing.
|
||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6)
|
||||
find_package(Eigen3 3.1.0)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program("draw_lcc.cpp")
|
||||
|
|
|
|||
|
|
@ -1480,10 +1480,15 @@ protected:
|
|||
if(!m_scene.empty())
|
||||
{
|
||||
auto& bbox=m_scene.bounding_box();
|
||||
double d=CGAL::sqrt(CGAL::squared_distance
|
||||
(Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()),
|
||||
Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax())));
|
||||
double d=is_two_dimensional()
|
||||
?2.5
|
||||
: CGAL::sqrt(CGAL::squared_distance
|
||||
(Local_point(bbox.xmin(), bbox.ymin(), bbox.zmin()),
|
||||
Local_point(bbox.xmax(), bbox.ymax(), bbox.zmax())));
|
||||
// std::cout<<"Length of the diagonal: "<<d<<std::endl;
|
||||
// std::cout<<"width: "<< this->width() <<std::endl;
|
||||
// std::cout<<"height: "<< this->height() <<std::endl;
|
||||
|
||||
m_size_vertices=1.5*d;
|
||||
m_size_edges=d;
|
||||
m_size_rays=m_size_edges;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ project(Approximate_min_ellipsoid_d_Examples)
|
|||
find_package(CGAL REQUIRED)
|
||||
|
||||
# Use Eigen
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
# create a target per cppfile
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ project(Bounding_volumes_Tests)
|
|||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
# Use Eigen
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
# create a target per cppfile
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
|||
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
|
||||
return()
|
||||
|
|
|
|||
|
|
@ -23,8 +23,9 @@ if(NOT TARGET CGAL::Boost_iostreams_support)
|
|||
set(Classification_dependencies_met FALSE)
|
||||
endif()
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
|
||||
set(Classification_dependencies_met FALSE)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,9 @@ if(NOT TARGET CGAL::Boost_iostreams_support)
|
|||
set(Classification_dependencies_met FALSE)
|
||||
endif()
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
|
||||
set(Classification_dependencies_met FALSE)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
\cgalConcept
|
||||
|
||||
The concept `ConformingConstrainedDelaunayTriangulationCellBase_3` refines the concept
|
||||
`TriangulationCellBase_3` and and describes the requirements for a base cell class of
|
||||
`TriangulationCellBase_3` and describes the requirements for a base cell class of
|
||||
the `CGAL::Conforming_constrained_Delaunay_triangulation_3` class.
|
||||
|
||||
\cgalRefines{TriangulationCellBase_3, BaseWithTimeStamp}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include <CGAL/Constrained_triangulation_3/internal/config.h>
|
||||
|
||||
#include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h>
|
||||
#include <CGAL/Real_timer.h>
|
||||
#include <CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h>
|
||||
#include <CGAL/Triangulation_segment_traverser_3.h>
|
||||
#include <CGAL/unordered_flat_set.h>
|
||||
|
|
@ -34,8 +35,209 @@
|
|||
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
|
||||
#if CGAL_USE_ITT
|
||||
# include <ittnotify.h>
|
||||
#endif
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
namespace CDT_3 {
|
||||
|
||||
struct Debug_options {
|
||||
enum class Flags {
|
||||
Steiner_points = 0,
|
||||
conforming,
|
||||
input_faces,
|
||||
missing_region,
|
||||
regions,
|
||||
copy_triangulation_into_hole,
|
||||
validity,
|
||||
use_older_cavity_algorithm,
|
||||
debug_finite_edges_map,
|
||||
use_finite_edges_map,
|
||||
debug_subconstraints_to_conform,
|
||||
verbose_special_cases,
|
||||
debug_encroaching_vertices,
|
||||
debug_conforming_validation,
|
||||
debug_constraint_hierarchy,
|
||||
debug_geometric_errors,
|
||||
debug_polygon_insertion,
|
||||
display_statistics,
|
||||
nb_of_flags
|
||||
};
|
||||
|
||||
bool Steiner_points() const { return flags[static_cast<int>(Flags::Steiner_points)]; }
|
||||
void Steiner_points(bool b) { flags.set(static_cast<int>(Flags::Steiner_points), b); }
|
||||
|
||||
bool input_faces() const { return flags[static_cast<int>(Flags::input_faces)]; }
|
||||
void input_faces(bool b) { flags.set(static_cast<int>(Flags::input_faces), b); }
|
||||
|
||||
bool missing_region() const { return flags[static_cast<int>(Flags::missing_region)]; }
|
||||
void missing_region(bool b) { flags.set(static_cast<int>(Flags::missing_region), b); }
|
||||
|
||||
bool regions() const { return flags[static_cast<int>(Flags::regions)]; }
|
||||
void regions(bool b) { flags.set(static_cast<int>(Flags::regions), b); }
|
||||
|
||||
bool copy_triangulation_into_hole() const { return flags[static_cast<int>(Flags::copy_triangulation_into_hole)]; }
|
||||
void copy_triangulation_into_hole(bool b) { flags.set(static_cast<int>(Flags::copy_triangulation_into_hole), b); }
|
||||
|
||||
bool validity() const { return flags[static_cast<int>(Flags::validity)]; }
|
||||
void validity(bool b) { flags.set(static_cast<int>(Flags::validity), b); }
|
||||
|
||||
bool use_older_cavity_algorithm() const { return flags[static_cast<int>(Flags::use_older_cavity_algorithm)]; }
|
||||
bool use_newer_cavity_algorithm() const { return !flags[static_cast<int>(Flags::use_older_cavity_algorithm)]; }
|
||||
void use_older_cavity_algorithm(bool b) { flags.set(static_cast<int>(Flags::use_older_cavity_algorithm), b); }
|
||||
|
||||
bool finite_edges_map() const { return flags[static_cast<int>(Flags::debug_finite_edges_map)]; }
|
||||
void finite_edges_map(bool b) { flags.set(static_cast<int>(Flags::debug_finite_edges_map), b); }
|
||||
|
||||
bool subconstraints_to_conform() const { return flags[static_cast<int>(Flags::debug_subconstraints_to_conform)]; }
|
||||
void subconstraints_to_conform(bool b) { flags.set(static_cast<int>(Flags::debug_subconstraints_to_conform), b); }
|
||||
|
||||
bool use_finite_edges_map_flag() const { return flags[static_cast<int>(Flags::use_finite_edges_map)]; }
|
||||
void use_finite_edges_map(bool b) { flags.set(static_cast<int>(Flags::use_finite_edges_map), b); }
|
||||
|
||||
bool verbose_special_cases() const { return flags[static_cast<int>(Flags::verbose_special_cases)]; }
|
||||
void verbose_special_cases(bool b) { flags.set(static_cast<int>(Flags::verbose_special_cases), b); }
|
||||
|
||||
bool encroaching_vertices() const { return flags[static_cast<int>(Flags::debug_encroaching_vertices)]; }
|
||||
void encroaching_vertices(bool b) { flags.set(static_cast<int>(Flags::debug_encroaching_vertices), b); }
|
||||
|
||||
bool conforming_validation() const { return flags[static_cast<int>(Flags::debug_conforming_validation)]; }
|
||||
void conforming_validation(bool b) { flags.set(static_cast<int>(Flags::debug_conforming_validation), b); }
|
||||
|
||||
bool constraint_hierarchy() const { return flags[static_cast<int>(Flags::debug_constraint_hierarchy)]; }
|
||||
void constraint_hierarchy(bool b) { flags.set(static_cast<int>(Flags::debug_constraint_hierarchy), b); }
|
||||
|
||||
bool geometric_errors() const { return flags[static_cast<int>(Flags::debug_geometric_errors)]; }
|
||||
void geometric_errors(bool b) { flags.set(static_cast<int>(Flags::debug_geometric_errors), b); }
|
||||
|
||||
bool polygon_insertion() const { return flags[static_cast<int>(Flags::debug_polygon_insertion)]; }
|
||||
void polygon_insertion(bool b) { flags.set(static_cast<int>(Flags::debug_polygon_insertion), b); }
|
||||
|
||||
bool display_statistics() const { return flags[static_cast<int>(Flags::display_statistics)]; }
|
||||
void display_statistics(bool b) { flags.set(static_cast<int>(Flags::display_statistics), b); }
|
||||
|
||||
double segment_vertex_epsilon() const { return segment_vertex_epsilon_; }
|
||||
void set_segment_vertex_epsilon(double eps) { segment_vertex_epsilon_ = eps; }
|
||||
|
||||
double vertex_vertex_epsilon() const { return vertex_vertex_epsilon_; }
|
||||
void set_vertex_vertex_epsilon(double eps) { vertex_vertex_epsilon_ = eps; }
|
||||
|
||||
private:
|
||||
std::bitset<static_cast<int>(Flags::nb_of_flags)> flags{};
|
||||
double segment_vertex_epsilon_ = 0.0;
|
||||
double vertex_vertex_epsilon_ = 0.0;
|
||||
}; // end struct Debug_options
|
||||
|
||||
namespace internal {
|
||||
|
||||
auto& tasks_manager() {
|
||||
struct Tasks_manager {
|
||||
enum {
|
||||
READ_INPUT = 0,
|
||||
MERGE_FACETS,
|
||||
INSERT_VERTICES,
|
||||
COMPUTE_DISTANCES,
|
||||
CONFORMING,
|
||||
CDT,
|
||||
OUTPUT,
|
||||
VALIDATION,
|
||||
NB_TASKS
|
||||
};
|
||||
|
||||
#if CGAL_USE_ITT
|
||||
__itt_domain* cdt_3_domain = __itt_domain_create("org.cgal.CDT_3");
|
||||
const std::array<__itt_string_handle*, NB_TASKS> task_handles = {
|
||||
__itt_string_handle_create("CDT_3: read input file"),
|
||||
__itt_string_handle_create("CDT_3: merge facets"),
|
||||
__itt_string_handle_create("CDT_3: insert vertices"),
|
||||
__itt_string_handle_create("CDT_3: compute distances"),
|
||||
__itt_string_handle_create("CDT_3: conforming"),
|
||||
__itt_string_handle_create("CDT_3: cdt"),
|
||||
__itt_string_handle_create("CDT_3: outputs"),
|
||||
__itt_string_handle_create("CDT_3: validation")
|
||||
};
|
||||
#endif
|
||||
std::array<CGAL::Real_timer, NB_TASKS> timers{};
|
||||
struct Scope_guard {
|
||||
Tasks_manager *instance = nullptr;
|
||||
int task_id;
|
||||
Scope_guard(Tasks_manager *instance, int task_id) : instance(instance), task_id(task_id) {
|
||||
instance->timers[task_id].start();
|
||||
#if CGAL_USE_ITT
|
||||
__itt_task_begin(instance->cdt_3_domain, __itt_null, __itt_null, instance->task_handles[task_id]);
|
||||
#endif
|
||||
}
|
||||
auto time() const {
|
||||
return instance->timers[task_id].time();
|
||||
}
|
||||
auto time_ms() const {
|
||||
return instance->timers[task_id].time() / 1000.;
|
||||
}
|
||||
~Scope_guard() {
|
||||
instance->timers[task_id].stop();
|
||||
#if CGAL_USE_ITT
|
||||
__itt_task_end(instance->cdt_3_domain);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
Scope_guard make_task_scope_guard(int task_id) {
|
||||
return Scope_guard(this, task_id);
|
||||
}
|
||||
|
||||
Scope_guard READ_INPUT_TASK_guard() { return make_task_scope_guard(READ_INPUT); }
|
||||
Scope_guard MERGE_FACETS_TASK_guard() { return make_task_scope_guard(MERGE_FACETS); }
|
||||
Scope_guard INSERT_VERTICES_TASK_guard() { return make_task_scope_guard(INSERT_VERTICES); }
|
||||
Scope_guard COMPUTE_DISTANCES_TASK_guard() { return make_task_scope_guard(COMPUTE_DISTANCES); }
|
||||
Scope_guard CONFORMING_TASK_guard() { return make_task_scope_guard(CONFORMING); }
|
||||
Scope_guard CDT_TASK_guard() { return make_task_scope_guard(CDT); }
|
||||
Scope_guard OUTPUT_TASK_guard() { return make_task_scope_guard(OUTPUT); }
|
||||
Scope_guard VALIDATION_TASK_guard() { return make_task_scope_guard(VALIDATION); }
|
||||
|
||||
}; // end struct Intel_OneAPI_ITT_API
|
||||
|
||||
static Tasks_manager instance;
|
||||
return instance;
|
||||
} // end auto& tasks_manager()
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
} // end namespace CDT_3
|
||||
|
||||
inline auto CDT_3_READ_INPUT_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().READ_INPUT_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_MERGE_FACETS_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().MERGE_FACETS_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_INSERT_VERTICES_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().INSERT_VERTICES_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_COMPUTE_DISTANCES_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().COMPUTE_DISTANCES_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_CONFORMING_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().CONFORMING_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_CDT_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().CDT_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_OUTPUT_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().OUTPUT_TASK_guard();
|
||||
}
|
||||
|
||||
inline auto CDT_3_VALIDATION_TASK_guard() {
|
||||
return CDT_3::internal::tasks_manager().VALIDATION_TASK_guard();
|
||||
}
|
||||
|
||||
template <typename T_3>
|
||||
class Conforming_Delaunay_triangulation_3 : public T_3 {
|
||||
public:
|
||||
|
|
@ -50,9 +252,9 @@ public:
|
|||
using Line = typename T_3::Geom_traits::Line_3;
|
||||
using Locate_type = typename T_3::Locate_type;
|
||||
|
||||
inline static With_offset_tag with_offset{};
|
||||
inline static With_point_tag with_point{};
|
||||
inline static With_point_and_info_tag with_point_and_info{};
|
||||
inline static With_offset_tag with_offset{ -1 };
|
||||
inline static With_point_tag with_point{ {-1} };
|
||||
inline static With_point_and_info_tag with_point_and_info{ { {-1} } };
|
||||
|
||||
Conforming_Delaunay_triangulation_3(const Geom_traits& gt = Geom_traits())
|
||||
: T_3(gt)
|
||||
|
|
@ -110,7 +312,7 @@ protected:
|
|||
if(v1 > v2) std::swap(v1, v2);
|
||||
auto v1_index = v1->time_stamp();
|
||||
[[maybe_unused]] auto nb_erased = self->all_finite_edges[v1_index].erase(v2);
|
||||
if constexpr (cdt_3_can_use_cxx20_format()) if(self->debug_finite_edges_map() && nb_erased > 0) {
|
||||
if constexpr (cdt_3_can_use_cxx20_format()) if(self->debug().finite_edges_map() && nb_erased > 0) {
|
||||
std::cerr << cdt_3_format("erasing edge {} {}\n", self->display_vert((std::min)(v1, v2)),
|
||||
self->display_vert((std::max)(v1, v2)));
|
||||
}
|
||||
|
|
@ -169,18 +371,17 @@ protected:
|
|||
void add_to_subconstraints_to_conform(Vertex_handle va, Vertex_handle vb,
|
||||
Constrained_polyline_id id) {
|
||||
const auto pair = make_subconstraint(va, vb);
|
||||
#if CGAL_DEBUG_CDT_3 & 32
|
||||
std::cerr << "tr().subconstraints_to_conform.push("
|
||||
<< display_subcstr(pair) << ")\n";
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().subconstraints_to_conform()) {
|
||||
std::cerr << "tr().subconstraints_to_conform.push("
|
||||
<< display_subcstr(pair) << ")\n";
|
||||
}
|
||||
subconstraints_to_conform.push({pair, id});
|
||||
}
|
||||
|
||||
template <typename Visitor>
|
||||
Constrained_polyline_id insert_constrained_edge_impl(Vertex_handle va, Vertex_handle vb,
|
||||
Visitor&) {
|
||||
Constrained_polyline_id insert_constrained_edge_impl(Vertex_handle va, Vertex_handle vb, Visitor&) {
|
||||
if(va != vb) {
|
||||
if(segment_vertex_epsilon != 0.) {
|
||||
if(debug().segment_vertex_epsilon() != 0.) {
|
||||
auto [min_dist, min_vertex] = min_distance_and_vertex_between_constraint_and_encroaching_vertex(va, vb);
|
||||
check_segment_vertex_distance_or_throw(va, vb, min_vertex, CGAL::to_double(min_dist),
|
||||
Check_distance::NON_SQUARED_DISTANCE);
|
||||
|
|
@ -217,7 +418,7 @@ protected:
|
|||
if(tr().is_infinite(v1) || tr().is_infinite(v2))
|
||||
return;
|
||||
[[maybe_unused]] auto [_, inserted] = all_finite_edges[v1->time_stamp()].insert(v2);
|
||||
if constexpr (cdt_3_can_use_cxx20_format()) if (debug_finite_edges_map() && inserted) {
|
||||
if constexpr (cdt_3_can_use_cxx20_format()) if (debug().finite_edges_map() && inserted) {
|
||||
if(v2 < v1) std::swap(v1, v2);
|
||||
std::cerr << cdt_3_format("new_edge({}, {})\n", display_vert(v1), display_vert(v2));
|
||||
}
|
||||
|
|
@ -268,7 +469,7 @@ protected:
|
|||
if(use_finite_edges_map()) {
|
||||
new_vertex(v);
|
||||
all_finite_edges.clear();
|
||||
if (debug_finite_edges_map()) std::cerr << "all_finite_edges.clear()\n";
|
||||
if (debug().finite_edges_map()) std::cerr << "all_finite_edges.clear()\n";
|
||||
for(auto e: tr().all_edges()) {
|
||||
new_edge(e);
|
||||
}
|
||||
|
|
@ -304,7 +505,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
void update_max_bbox_edge_length() {
|
||||
void update_max_bbox_edge_length() const {
|
||||
double d_x = bbox.xmax() - bbox.xmin();
|
||||
double d_y = bbox.ymax() - bbox.ymin();
|
||||
double d_z = bbox.zmax() - bbox.zmin();
|
||||
|
|
@ -313,81 +514,15 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
void set_segment_vertex_epsilon(double epsilon) {
|
||||
segment_vertex_epsilon = epsilon;
|
||||
}
|
||||
CDT_3::Debug_options& debug() { return debug_options_; }
|
||||
const CDT_3::Debug_options& debug() const { return debug_options_; }
|
||||
|
||||
bool debug_Steiner_points() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::Steiner_points)];
|
||||
}
|
||||
|
||||
void debug_Steiner_points(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::Steiner_points), b);
|
||||
}
|
||||
|
||||
bool debug_input_faces() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::input_faces)];
|
||||
}
|
||||
|
||||
void debug_input_faces(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::input_faces), b);
|
||||
}
|
||||
|
||||
bool debug_missing_region() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::missing_region)];
|
||||
}
|
||||
|
||||
void debug_missing_region(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::missing_region), b);
|
||||
}
|
||||
|
||||
bool debug_regions() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::regions)];
|
||||
}
|
||||
|
||||
void debug_regions(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::regions), b);
|
||||
}
|
||||
|
||||
bool debug_copy_triangulation_into_hole() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::copy_triangulation_into_hole)];
|
||||
}
|
||||
|
||||
void debug_copy_triangulation_into_hole(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::copy_triangulation_into_hole), b);
|
||||
}
|
||||
|
||||
bool debug_validity() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::validity)];
|
||||
}
|
||||
|
||||
void debug_validity(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::validity), b);
|
||||
}
|
||||
|
||||
bool use_older_cavity_algorithm() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::use_older_cavity_algorithm)];
|
||||
}
|
||||
|
||||
void use_older_cavity_algorithm(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::use_older_cavity_algorithm), b);
|
||||
}
|
||||
|
||||
bool debug_finite_edges_map() const {
|
||||
return debug_flags[static_cast<int>(Debug_flags::debug_finite_edges_map)];
|
||||
}
|
||||
|
||||
void debug_finite_edges_map(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::debug_finite_edges_map), b);
|
||||
}
|
||||
|
||||
bool use_finite_edges_map() const {
|
||||
return update_all_finite_edges_ && debug_flags[static_cast<int>(Debug_flags::use_finite_edges_map)];
|
||||
}
|
||||
|
||||
void use_finite_edges_map(bool b) {
|
||||
debug_flags.set(static_cast<int>(Debug_flags::use_finite_edges_map), b);
|
||||
}
|
||||
// Backward compatibility wrappers (deprecated, use debug().method() instead)
|
||||
bool use_older_cavity_algorithm() const { return debug_options_.use_older_cavity_algorithm(); }
|
||||
bool use_newer_cavity_algorithm() const { return debug_options_.use_newer_cavity_algorithm(); }
|
||||
void use_older_cavity_algorithm(bool b) { debug_options_.use_older_cavity_algorithm(b); }
|
||||
bool use_finite_edges_map() const { return update_all_finite_edges_ && debug_options_.use_finite_edges_map_flag(); }
|
||||
void use_finite_edges_map(bool b) { debug_options_.use_finite_edges_map(b); }
|
||||
|
||||
Vertex_handle insert(const Point &p, Locate_type lt, Cell_handle c,
|
||||
int li, int lj)
|
||||
|
|
@ -415,14 +550,14 @@ public:
|
|||
|
||||
bool is_edge(Vertex_handle va, Vertex_handle vb) const {
|
||||
const bool is_edge_v1 =
|
||||
((debug_finite_edges_map() && use_finite_edges_map()) || !use_finite_edges_map()) && tr().tds().is_edge(va, vb);
|
||||
((debug().finite_edges_map() && use_finite_edges_map()) || !use_finite_edges_map()) && tr().tds().is_edge(va, vb);
|
||||
|
||||
if(use_finite_edges_map() && va > vb) std::swap(va, vb);
|
||||
const auto va_index = va->time_stamp();
|
||||
const bool is_edge_v2 =
|
||||
use_finite_edges_map() && all_finite_edges[va_index].find(vb) != all_finite_edges[va_index].end();
|
||||
|
||||
if(debug_finite_edges_map() && use_finite_edges_map() && is_edge_v1 != is_edge_v2) {
|
||||
if(debug().finite_edges_map() && use_finite_edges_map() && is_edge_v1 != is_edge_v2) {
|
||||
std::cerr << "!! Inconsistent edge status\n";
|
||||
std::cerr << " -> constraint " << display_vert(va) << " " << display_vert(vb) << '\n';
|
||||
std::cerr << " -> edge " << (is_edge_v1 ? "is" : "is not") << " in the triangulation\n";
|
||||
|
|
@ -442,12 +577,12 @@ public:
|
|||
[this](const auto &sc) {
|
||||
const auto [va, vb] = sc;
|
||||
const auto is_edge = this->is_edge(va, vb);
|
||||
#if CGAL_DEBUG_CDT_3 & 128 && CGAL_CAN_USE_CXX20_FORMAT
|
||||
std::cerr << cdt_3_format("is_conforming>> Edge is 3D: {} ({} , {})\n",
|
||||
is_edge,
|
||||
CGAL::IO::oformat(va, with_point_and_info),
|
||||
CGAL::IO::oformat(vb, with_point_and_info));
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if constexpr (cdt_3_can_use_cxx20_format()) if(debug().conforming_validation()) {
|
||||
std::cerr << cdt_3_format("is_conforming>> Edge is 3D: {} ({} , {})\n",
|
||||
is_edge,
|
||||
CGAL::IO::oformat(va, with_point_and_info),
|
||||
CGAL::IO::oformat(vb, with_point_and_info));
|
||||
}
|
||||
return is_edge;
|
||||
});
|
||||
}
|
||||
|
|
@ -458,14 +593,15 @@ public:
|
|||
Vertex_handle vb,
|
||||
Vertex_handle min_vertex,
|
||||
double min_dist,
|
||||
Check_distance option)
|
||||
Check_distance distance_type = Check_distance::NON_SQUARED_DISTANCE) const
|
||||
{
|
||||
if(!max_bbox_edge_length) {
|
||||
update_max_bbox_edge_length();
|
||||
}
|
||||
if((option == Check_distance::NON_SQUARED_DISTANCE && min_dist < segment_vertex_epsilon * *max_bbox_edge_length) ||
|
||||
(option == Check_distance::SQUARED_DISTANCE &&
|
||||
min_dist < CGAL::square(segment_vertex_epsilon * *max_bbox_edge_length)))
|
||||
if((distance_type == Check_distance::NON_SQUARED_DISTANCE &&
|
||||
min_dist < debug().segment_vertex_epsilon() * *max_bbox_edge_length) ||
|
||||
(distance_type == Check_distance::SQUARED_DISTANCE &&
|
||||
min_dist < CGAL::square(debug().segment_vertex_epsilon() * *max_bbox_edge_length)))
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss.precision(std::cerr.precision());
|
||||
|
|
@ -478,6 +614,26 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void check_vertex_vertex_distance_or_throw(Vertex_handle va,
|
||||
Vertex_handle vb,
|
||||
double min_dist) const
|
||||
{
|
||||
if(!max_bbox_edge_length) {
|
||||
update_max_bbox_edge_length();
|
||||
}
|
||||
if(min_dist < debug_options_.vertex_vertex_epsilon() * *max_bbox_edge_length)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss.precision(std::cerr.precision());
|
||||
ss << "Two vertices are too close to each other.\n";
|
||||
ss << " -> vertex " << display_vert(va) << '\n';
|
||||
ss << " -> vertex " << display_vert(vb) << '\n';
|
||||
ss << " -> distance = " << min_dist << '\n';
|
||||
ss << " -> max_bbox_edge_length = " << *max_bbox_edge_length << '\n';
|
||||
CGAL_error_msg(ss.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
auto ancestors_of_Steiner_vertex_on_edge(Vertex_handle v) const {
|
||||
std::pair<Vertex_handle, Vertex_handle> result;
|
||||
CGAL_precondition(v->ccdt_3_data().is_Steiner_vertex_on_edge());
|
||||
|
|
@ -583,10 +739,10 @@ protected:
|
|||
if(!constraint_hierarchy.is_subconstraint(va, vb)) {
|
||||
continue;
|
||||
}
|
||||
#if CGAL_DEBUG_CDT_3 & 32
|
||||
std::cerr << "tr().subconstraints_to_conform.pop()="
|
||||
<< display_subcstr(subconstraint) << "\n";
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().subconstraints_to_conform()) {
|
||||
std::cerr << "tr().subconstraints_to_conform.pop()="
|
||||
<< display_subcstr(subconstraint) << "\n";
|
||||
}
|
||||
conform_subconstraint(subconstraint, constrained_polyline_id, visitor);
|
||||
}
|
||||
}
|
||||
|
|
@ -629,7 +785,7 @@ protected:
|
|||
const auto& [steiner_pt, hint, ref_vertex] = construct_Steiner_point(constraint, subconstraint);
|
||||
[[maybe_unused]] const auto v =
|
||||
insert_Steiner_point_on_subconstraint(steiner_pt, hint, subconstraint, constraint, visitor);
|
||||
if(debug_Steiner_points()) {
|
||||
if(debug().Steiner_points()) {
|
||||
const auto [c_start, c_end] = constraint_extremities(constraint);
|
||||
std::cerr << "(" << IO::oformat(va, with_offset) << ", " << IO::oformat(vb, with_offset) << ")";
|
||||
std::cerr << ": [ " << display_vert(c_start) << " - " << display_vert(c_end) << " ] ";
|
||||
|
|
@ -665,10 +821,10 @@ protected:
|
|||
this->constraint_hierarchy.constraints_end(), c_id) != this->constraint_hierarchy.constraints_end());
|
||||
CGAL_assertion(this->constraint_hierarchy.vertices_in_constraint_begin(c_id) !=
|
||||
this->constraint_hierarchy.vertices_in_constraint_end(c_id));
|
||||
#if CGAL_DEBUG_CDT_3 & 8
|
||||
std::cerr << "constraint " << (void*) c_id.vl_ptr() << " has "
|
||||
<< c_id.vl_ptr()->skip_size() << " vertices\n";
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().constraint_hierarchy()) {
|
||||
std::cerr << "constraint " << static_cast<void*>(c_id.vl_ptr()) << " has "
|
||||
<< c_id.vl_ptr()->skip_size() << " vertices\n";
|
||||
}
|
||||
const auto begin = this->constraint_hierarchy.vertices_in_constraint_begin(c_id);
|
||||
const auto end = this->constraint_hierarchy.vertices_in_constraint_end(c_id);
|
||||
const auto c_va = *begin;
|
||||
|
|
@ -726,9 +882,9 @@ protected:
|
|||
encroaching_vertices.insert(v);
|
||||
};
|
||||
auto fill_encroaching_vertices = [&](const auto simplex) {
|
||||
#if CGAL_DEBUG_CDT_3 & 0x10
|
||||
std::cerr << " - " << IO::oformat(simplex, With_point_tag{}) << '\n';
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().encroaching_vertices()) {
|
||||
std::cerr << " - " << IO::oformat(simplex, With_point_tag{}) << '\n';
|
||||
}
|
||||
auto visit_cell = [&](Cell_handle cell) {
|
||||
for(int i = 0, end = this->tr().dimension() + 1; i < end; ++i) {
|
||||
const auto v = cell->vertex(i);
|
||||
|
|
@ -772,9 +928,9 @@ protected:
|
|||
std::cerr << "!! The constraint passes through a vertex!\n";
|
||||
std::cerr << " -> constraint " << display_vert(va) << " " << display_vert(vb) << '\n';
|
||||
std::cerr << " -> vertex " << display_vert(v) << '\n';
|
||||
#if CGAL_DEBUG_CDT_3
|
||||
debug_dump("bug-through-vertex");
|
||||
#endif
|
||||
if(debug().geometric_errors()) {
|
||||
debug_dump("bug-through-vertex");
|
||||
}
|
||||
CGAL_error();
|
||||
}
|
||||
} break;
|
||||
|
|
@ -784,14 +940,14 @@ protected:
|
|||
std::for_each(tr().segment_traverser_simplices_begin(va, vb), tr().segment_traverser_simplices_end(),
|
||||
fill_encroaching_vertices);
|
||||
auto vector_of_encroaching_vertices = encroaching_vertices.extract_sequence();
|
||||
#if CGAL_DEBUG_CDT_3 & 0x10
|
||||
std::cerr << " -> vector_of_encroaching_vertices (before filter):\n";
|
||||
std::for_each(vector_of_encroaching_vertices.begin(),
|
||||
vector_of_encroaching_vertices.end(),
|
||||
[this](Vertex_handle v){
|
||||
std::cerr << " " << this->display_vert(v) << '\n';
|
||||
});
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().encroaching_vertices()) {
|
||||
std::cerr << " -> vector_of_encroaching_vertices (before filter):\n";
|
||||
std::for_each(vector_of_encroaching_vertices.begin(),
|
||||
vector_of_encroaching_vertices.end(),
|
||||
[this](Vertex_handle v){
|
||||
std::cerr << " " << this->display_vert(v) << '\n';
|
||||
});
|
||||
}
|
||||
auto end = std::remove_if(vector_of_encroaching_vertices.begin(),
|
||||
vector_of_encroaching_vertices.end(),
|
||||
[va, vb, pa, pb, &angle_functor, this](Vertex_handle v) {
|
||||
|
|
@ -800,13 +956,13 @@ protected:
|
|||
this->tr().point(v),
|
||||
pb) == ACUTE;
|
||||
});
|
||||
#if CGAL_DEBUG_CDT_3 & 0x10
|
||||
std::cerr << " -> vector_of_encroaching_vertices (after filter):\n";
|
||||
std::for_each(vector_of_encroaching_vertices.begin(), end, [&](Vertex_handle v) {
|
||||
std::cerr << " " << this->display_vert(v) << " angle " << approximate_angle(pa, this->tr().point(v), pb)
|
||||
<< '\n';
|
||||
});
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().encroaching_vertices()) {
|
||||
std::cerr << " -> vector_of_encroaching_vertices (after filter):\n";
|
||||
std::for_each(vector_of_encroaching_vertices.begin(), end, [&](Vertex_handle v) {
|
||||
std::cerr << " " << this->display_vert(v) << " angle " << approximate_angle(pa, this->tr().point(v), pb)
|
||||
<< '\n';
|
||||
});
|
||||
}
|
||||
vector_of_encroaching_vertices.erase(end, vector_of_encroaching_vertices.end());
|
||||
return vector_of_encroaching_vertices;
|
||||
}
|
||||
|
|
@ -836,10 +992,10 @@ protected:
|
|||
return {midpoint_functor(pa, pb), va->cell(), va};
|
||||
}
|
||||
|
||||
#if CGAL_DEBUG_CDT_3 & 0x10
|
||||
std::cerr << "construct_Steiner_point( " << display_vert(va) << " , "
|
||||
<< display_vert(vb) << " )\n";
|
||||
#endif // CGAL_DEBUG_CDT_3
|
||||
if(debug().encroaching_vertices()) {
|
||||
std::cerr << "construct_Steiner_point( " << display_vert(va) << " , "
|
||||
<< display_vert(vb) << " )\n";
|
||||
}
|
||||
|
||||
const auto vector_of_encroaching_vertices = encroaching_vertices(va, vb);
|
||||
CGAL_assertion(vector_of_encroaching_vertices.size() > 0);
|
||||
|
|
@ -905,7 +1061,7 @@ protected:
|
|||
return return_orig_result_point(lambda, orig_pb, orig_pa);
|
||||
}
|
||||
} else {
|
||||
if(segment_vertex_epsilon > 0) {
|
||||
if(debug().segment_vertex_epsilon() > 0) {
|
||||
if(!max_bbox_edge_length) {
|
||||
update_max_bbox_edge_length();
|
||||
}
|
||||
|
|
@ -936,8 +1092,7 @@ protected:
|
|||
Constraint_hierarchy constraint_hierarchy = {comp};
|
||||
static_assert(CGAL::cdt_3_msvc_2019_or_older() || CGAL::is_nothrow_movable_v<Constraint_hierarchy>);
|
||||
Bbox_3 bbox{};
|
||||
double segment_vertex_epsilon = 1e-8;
|
||||
std::optional<double> max_bbox_edge_length;
|
||||
mutable std::optional<double> max_bbox_edge_length;
|
||||
using Pair_of_vertex_handles = std::pair<Vertex_handle, Vertex_handle>;
|
||||
boost::container::map<Pair_of_vertex_handles, Constrained_polyline_id> pair_of_vertices_to_cid;
|
||||
Insert_in_conflict_visitor insert_in_conflict_visitor = {this};
|
||||
|
|
@ -969,20 +1124,7 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
enum class Debug_flags {
|
||||
Steiner_points = 0,
|
||||
conforming,
|
||||
input_faces,
|
||||
missing_region,
|
||||
regions,
|
||||
copy_triangulation_into_hole,
|
||||
validity,
|
||||
use_older_cavity_algorithm,
|
||||
debug_finite_edges_map,
|
||||
use_finite_edges_map,
|
||||
nb_of_flags
|
||||
};
|
||||
std::bitset<static_cast<int>(Debug_flags::nb_of_flags)> debug_flags{};
|
||||
CDT_3::Debug_options debug_options_{};
|
||||
bool is_Delaunay = true;
|
||||
};
|
||||
|
||||
|
|
@ -990,6 +1132,5 @@ protected:
|
|||
|
||||
#endif // not DOXYGEN_RUNNING
|
||||
|
||||
#
|
||||
|
||||
#endif // CGAL_CONFORMING_DELAUNAY_TRIANGULATION_3_H
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -52,31 +52,33 @@ class Conforming_constrained_Delaunay_triangulation_cell_data_3 {
|
|||
void clear_mark(CDT_3_cell_marker m) { markers.reset(static_cast<unsigned>(m)); }
|
||||
void clear_marks() { markers.reset(); }
|
||||
|
||||
static unsigned int uint(int i) { return static_cast<unsigned int>(i); }
|
||||
|
||||
template <typename Facet_handle>
|
||||
void set_facet_constraint(int i, CDT_3_signed_index face_id,
|
||||
Facet_handle facet_2d)
|
||||
{
|
||||
this->face_id[unsigned(i)] = face_id;
|
||||
this->facet_2d[unsigned(i)] = static_cast<void*>(facet_2d == Facet_handle{} ? nullptr : std::addressof(*facet_2d));
|
||||
this->face_id[uint(i)] = face_id;
|
||||
this->facet_2d[uint(i)] = static_cast<void*>(facet_2d == Facet_handle{} ? nullptr : std::addressof(*facet_2d));
|
||||
}
|
||||
|
||||
template <typename CDT_2>
|
||||
auto face_2 (const CDT_2& cdt, int i) const {
|
||||
using Face = typename CDT_2::Face;
|
||||
auto ptr = static_cast<Face*>(facet_2d[unsigned(i)]);
|
||||
auto ptr = static_cast<Face*>(facet_2d[uint(i)]);
|
||||
return cdt.tds().faces().iterator_to(*ptr);
|
||||
}
|
||||
public:
|
||||
/// @{
|
||||
// @cond SKIP_IN_MANUAL
|
||||
bool is_facet_constrained(int i) const { return face_id[unsigned(i)] >= 0; }
|
||||
bool is_facet_constrained(int i) const { return face_id[uint(i)] >= 0; }
|
||||
|
||||
CDT_3_signed_index face_constraint_index(int i) const {
|
||||
return face_id[unsigned(i)];
|
||||
return face_id[uint(i)];
|
||||
}
|
||||
|
||||
void set_face_constraint_index(int i, CDT_3_signed_index index) {
|
||||
face_id[unsigned(i)] = index;
|
||||
face_id[uint(i)] = index;
|
||||
}
|
||||
/// @endcond
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/Constrained_triangulation_3/internal/config.h>
|
||||
#include <CGAL/Constrained_triangulation_3_types.h>
|
||||
|
||||
#include <bitset>
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ namespace CGAL {
|
|||
struct Conforming_constrained_Delaunay_triangulation_vertex_data_3 {};
|
||||
#else // DOXYGEN_RUNNING
|
||||
|
||||
enum class CDT_3_vertex_type { FREE, CORNER, STEINER_ON_EDGE, STEINER_IN_FACE };
|
||||
enum class CDT_3_vertex_type { FREE, CORNER, INPUT_VERTEX = CORNER, STEINER_ON_EDGE, STEINER_IN_FACE };
|
||||
|
||||
enum class CDT_3_vertex_marker {
|
||||
CLEAR = 0,
|
||||
|
|
@ -91,6 +92,8 @@ public:
|
|||
}
|
||||
|
||||
int number_of_incident_constraints() const {
|
||||
if(vertex_type() == CDT_3_vertex_type::STEINER_IN_FACE)
|
||||
return 0;
|
||||
CGAL_assertion(u.on_edge.nb_of_incident_constraints >= 0);
|
||||
return u.on_edge.nb_of_incident_constraints;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ decltype(auto) cdt_3_format(std::string_view fmt, const Args&... args) {
|
|||
|
||||
template <typename... Args>
|
||||
constexpr decltype(auto) cdt_3_format(Args&&...) {
|
||||
return "";
|
||||
return std::string{};
|
||||
}
|
||||
|
||||
constexpr bool cdt_3_can_use_cxx20_format() {
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@ create_single_source_cgal_program( "cdt_3_from_off_with_Epeck.cpp")
|
|||
target_link_libraries(cdt_3_from_off_with_Epeck PRIVATE CDT_3_dependencies)
|
||||
create_single_source_cgal_program( "snap_and_cdt3.cpp")
|
||||
|
||||
if(cxx_std_20 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||
add_executable(cdt_3_from_off_CGAL_DEBUG_CDT_3 cdt_3_from_off)
|
||||
target_compile_definitions(cdt_3_from_off_CGAL_DEBUG_CDT_3 PRIVATE CGAL_DEBUG_CDT_3=255)
|
||||
target_link_libraries(cdt_3_from_off_CGAL_DEBUG_CDT_3 PRIVATE CDT_3_dependencies)
|
||||
cgal_add_test(cdt_3_from_off_CGAL_DEBUG_CDT_3)
|
||||
endif()
|
||||
|
||||
add_executable(test_CDT_3_insert_constrained_edge_from_EDG_file cdt_test_insert_constrained_edge_from_EDG_file.cpp)
|
||||
target_link_libraries(test_CDT_3_insert_constrained_edge_from_EDG_file PRIVATE CDT_3_dependencies)
|
||||
target_compile_definitions(test_CDT_3_insert_constrained_edge_from_EDG_file PUBLIC CGAL_TEST_CDT_3_USE_CDT)
|
||||
|
|
@ -85,7 +78,7 @@ function(CGAL_add_cdt3_from_off_test_aux data_name data_dir)
|
|||
endfunction()
|
||||
|
||||
function(CGAL_add_cdt3_from_off_test data_name)
|
||||
CGAL_add_cdt3_from_off_test_aux(${data_name} ${CGAL_DATA_DIR}/meshes)
|
||||
CGAL_add_cdt3_from_off_test_aux(${data_name} ${CGAL_DATA_DIR}/meshes ${ARGN})
|
||||
endfunction()
|
||||
|
||||
CGAL_add_cdt3_from_off_test("cube")
|
||||
|
|
@ -95,9 +88,10 @@ CGAL_add_cdt3_from_off_test("mpi")
|
|||
CGAL_add_cdt3_from_off_test("3torus")
|
||||
CGAL_add_cdt3_from_off_test("cheese-selection")
|
||||
CGAL_add_cdt3_from_off_test("cheese-selection-2")
|
||||
CGAL_add_cdt3_from_off_test("non_manifold_face_graph")
|
||||
|
||||
function(CGAL_add_cdt3_from_local_off_test data_name)
|
||||
CGAL_add_cdt3_from_off_test_aux(${data_name} ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
||||
CGAL_add_cdt3_from_off_test_aux(${data_name} ${CMAKE_CURRENT_SOURCE_DIR}/data ${ARGN})
|
||||
endfunction()
|
||||
|
||||
CGAL_add_cdt3_from_local_off_test(cheese18)
|
||||
|
|
@ -130,17 +124,15 @@ if (CGAL_CDT_TEST_USE_THINGI)
|
|||
CGAL_add_cdt3_from_local_off_test(1514904-min8)
|
||||
CGAL_add_cdt3_from_local_off_test(1147177-min1)
|
||||
CGAL_add_cdt3_from_local_off_test(1452672-min1)
|
||||
CGAL_add_cdt3_from_local_off_test(135777-min3)
|
||||
CGAL_add_cdt3_from_local_off_test(196123-min3)
|
||||
CGAL_add_cdt3_from_local_off_test(200695-min3)
|
||||
CGAL_add_cdt3_from_local_off_test(285604-min8)
|
||||
CGAL_add_cdt3_from_local_off_test(error_mesh-p_not_equal_0-min2)
|
||||
|
||||
include(./Thingi10k-CDT.cmake)
|
||||
endif()
|
||||
|
||||
if(cxx_std_20 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||
add_test(NAME "execution of cdt_3_from_off_CGAL_DEBUG_CDT_3 3torus" COMMAND cdt_3_from_off_CGAL_DEBUG_CDT_3 ${CGAL_DATA_DIR}/meshes/3torus.off)
|
||||
cgal_add_compilation_test(cdt_3_from_off_CGAL_DEBUG_CDT_3)
|
||||
cgal_setup_test_properties("execution of cdt_3_from_off_CGAL_DEBUG_CDT_3 3torus" cdt_3_from_off_CGAL_DEBUG_CDT_3)
|
||||
endif()
|
||||
|
||||
get_directory_property(all_tests TESTS)
|
||||
foreach(test ${all_tests})
|
||||
if(test MATCHES cdt|CDT)
|
||||
|
|
|
|||
|
|
@ -109,6 +109,152 @@ set(thingi10k_FAILED_WITH_MERGE_FACETS_CTest_20240222_2201
|
|||
1514904.stl
|
||||
)
|
||||
|
||||
set(thingi10k_FAILED_WITH_SEGFAULT_CTest_20251002
|
||||
1439534.stl
|
||||
196123.stl
|
||||
200695.stl
|
||||
135777.stl
|
||||
285604.stl
|
||||
822697.stl
|
||||
)
|
||||
|
||||
set(thingi10k_FAILED_CTest_20251002
|
||||
100606.stl
|
||||
100644.stl
|
||||
101955.stl
|
||||
109130.stl
|
||||
116873.stl
|
||||
116876.stl
|
||||
135777.stl
|
||||
139737.stl
|
||||
1439534.stl
|
||||
145329.stl
|
||||
145330.stl
|
||||
1505036.stl
|
||||
1514900.stl
|
||||
196121.stl
|
||||
196122.stl
|
||||
196123.stl
|
||||
196126.stl
|
||||
196127.stl
|
||||
199814.stl
|
||||
199818.stl
|
||||
200695.stl
|
||||
215991.stl
|
||||
230152.stl
|
||||
230153.stl
|
||||
239188.stl
|
||||
276937.stl
|
||||
285604.stl
|
||||
285605.stl
|
||||
288352.stl
|
||||
288353.stl
|
||||
288354.stl
|
||||
288355.stl
|
||||
39182.stl
|
||||
39245.stl
|
||||
472050.stl
|
||||
55278.stl
|
||||
61418.stl
|
||||
622000.stl
|
||||
669962.stl
|
||||
67817.stl
|
||||
702204.stl
|
||||
723893.stl
|
||||
822697.stl
|
||||
904476.stl
|
||||
91474.stl
|
||||
95796.stl
|
||||
95797.stl
|
||||
97515.stl
|
||||
)
|
||||
|
||||
set(thingi10k_FAILED_WITH_MERGE_FACETS_CTest_20251028
|
||||
139765.stl
|
||||
1452677.stl
|
||||
1452678.stl
|
||||
1452679.stl
|
||||
145329.stl
|
||||
145330.stl
|
||||
145331.stl
|
||||
1505036.stl
|
||||
1514900.stl
|
||||
153100.stl
|
||||
1652975.stl
|
||||
1652976.stl
|
||||
1706457.stl
|
||||
186546.stl
|
||||
196121.stl
|
||||
196122.stl
|
||||
196123.stl
|
||||
196126.stl
|
||||
196127.stl
|
||||
196194.stl
|
||||
199814.stl
|
||||
199818.stl
|
||||
206318.stl
|
||||
215991.stl
|
||||
230152.stl
|
||||
230153.stl
|
||||
237632.stl
|
||||
239188.stl
|
||||
255657.stl
|
||||
255658.stl
|
||||
276937.stl
|
||||
285603.stl
|
||||
286161.stl
|
||||
288352.stl
|
||||
288446.stl
|
||||
360073.stl
|
||||
362398.stl
|
||||
37743.stl
|
||||
383022.stl
|
||||
39182.stl
|
||||
39245.stl
|
||||
39495.stl
|
||||
39499.stl
|
||||
40841.stl
|
||||
41521.stl
|
||||
42040.stl
|
||||
44025.stl
|
||||
44064.stl
|
||||
44901.stl
|
||||
472050.stl
|
||||
50659.stl
|
||||
51797.stl
|
||||
57811.stl
|
||||
61418.stl
|
||||
61431.stl
|
||||
622000.stl
|
||||
62592.stl
|
||||
62593.stl
|
||||
65144.stl
|
||||
65395.stl
|
||||
65402.stl
|
||||
669962.stl
|
||||
68255.stl
|
||||
702204.stl
|
||||
70381.stl
|
||||
71461.stl
|
||||
723893.stl
|
||||
72419.stl
|
||||
726665.stl
|
||||
77343.stl
|
||||
84624.stl
|
||||
90225.stl
|
||||
906183.stl
|
||||
91147.stl
|
||||
91474.stl
|
||||
93702.stl
|
||||
93703.stl
|
||||
95796.stl
|
||||
95797.stl
|
||||
97515.stl
|
||||
97590.stl
|
||||
97593.stl
|
||||
99895.stl
|
||||
)
|
||||
|
||||
function(CGAL_add_cdt3_test_from_Thingi10k data_name data_filename)
|
||||
set(options "ONLY_MERGE_FACETS")
|
||||
set(oneValueArgs TIMEOUT)
|
||||
|
|
@ -145,6 +291,15 @@ foreach(thingi_file_name ${thingi10k_max_10k_solid})
|
|||
if(thingi_file_name IN_LIST thingi10k_FAILED_WITH_MERGE_FACETS_CTest_20240222_2201)
|
||||
list(APPEND LABELS "CTest_20240222_2201_failed_merge_facets")
|
||||
endif()
|
||||
if(thingi_file_name IN_LIST thingi10k_FAILED_CTest_20251002)
|
||||
list(APPEND LABELS "CTest_20251002_failed")
|
||||
endif()
|
||||
if(thingi_file_name IN_LIST thingi10k_FAILED_WITH_SEGFAULT_CTest_20251002)
|
||||
list(APPEND LABELS "CTest_20251002_failed_segfault")
|
||||
endif()
|
||||
if(thingi_file_name IN_LIST thingi10k_FAILED_WITH_MERGE_FACETS_CTest_20251028)
|
||||
list(APPEND LABELS "CTest_20251028_failed_merge_facets")
|
||||
endif()
|
||||
get_filename_component(thingi_ID "${thingi_file_name}" NAME_WE)
|
||||
CGAL_add_cdt3_test_from_Thingi10k(Thingi10K_${thingi_ID} ${thingi_file_name}
|
||||
TIMEOUT 600 LABELS ${LABELS} ${MY_ONLY_MERGE_FACETS})
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,3 @@
|
|||
#if __has_include(<format>)
|
||||
#define CGAL_DEBUG_CDT_3 1
|
||||
#endif
|
||||
#define CGAL_TRIANGULATION_CHECK_EXPENSIVE 1
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Delaunay_triangulation_3.h>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
#if __has_include(<format>)
|
||||
#define CGAL_DEBUG_CDT_3 1
|
||||
#endif
|
||||
#define CGAL_TRIANGULATION_CHECK_EXPENSIVE 1
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Delaunay_triangulation_3.h>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
OFF
|
||||
42 23 0
|
||||
|
||||
9.4220000000000006 6.265949 1.2926169999999999
|
||||
9.4220000000000006 6.4378760000000002 0.4304
|
||||
9.4299999999999997 6.3669419999999999 1.3120000000000001
|
||||
9.4220000000000006 6.522742 1.2616000000000001
|
||||
9.4299999999999997 1.737943 2.867
|
||||
9.4299999999999997 1.310943 1.46
|
||||
9.4299999999999997 1.167238 0
|
||||
9.4299999999999997 5.7969429999999997 6.9269999999999996
|
||||
9.4299999999999997 16.167649999999998 0
|
||||
9.4299999999999997 4.499943 6.2329999999999997
|
||||
9.4299999999999997 3.3639420000000002 5.3010000000000002
|
||||
9.4299999999999997 2.4309430000000001 4.1639999999999997
|
||||
12.430999999999999 1.167238 0
|
||||
12.430999999999999 1.310943 1.46
|
||||
-7.2230889999999999 -5.1901419999999998 1.2724260000000001
|
||||
-7.2389999999999999 -5.1100570000000003 1.3959999999999999
|
||||
3.7330000000000001 -6.7590570000000003 0.79200000000000004
|
||||
-7.255185 -4.6623049999999999 0.88247529999999996
|
||||
-7.2552779999999997 -4.6682399999999999 0.88692839999999995
|
||||
3.7330000000000001 -6.2710569999999999 0.42699999999999999
|
||||
-7.262251 -4.5335140000000003 0.78721229999999998
|
||||
-7.7199999999999998 -4.2110570000000003 1.929
|
||||
-7.6440000000000001 -4.1590579999999999 1.6100000000000001
|
||||
-7.5739999999999998 -4.3940570000000001 1.726
|
||||
-7.5469999999999997 -3.6850580000000002 1.224
|
||||
-7.5369999999999999 -3.8630580000000001 1.3169999999999999
|
||||
-7.4050000000000002 -4.4780569999999997 1.4410000000000001
|
||||
-7.3220000000000001 -4.3380580000000002 1.022
|
||||
-7.4009999999999998 -4.689057 1.677
|
||||
-7.2534720000000004 -4.6835990000000001 0.89814380000000005
|
||||
9.4299999999999997 10.06494 1.929
|
||||
-7.2789999999999999 -4.0440569999999996 0.34699999999999998
|
||||
9.4299999999999997 6.3669419999999999 1.3120000000000001
|
||||
-7.2230889999999999 -5.1901419999999998 1.2724260000000001
|
||||
3.68716 -6.0934090000000003 0
|
||||
3.7330000000000001 -6.2710569999999999 0.42699999999999999
|
||||
3.7330000000000001 -6.2710569999999999 0.42699999999999999
|
||||
-7.262251 -4.5335140000000003 0.78721229999999998
|
||||
-7.6029999999999998 -4.5610569999999999 2.0139999999999998
|
||||
-7.4050000000000002 -4.4780569999999997 1.4410000000000001
|
||||
-7.3220000000000001 -4.3380580000000002 1.022
|
||||
-7.2599 -4.5207920000000001 0.75421059999999995
|
||||
3 0 1 2
|
||||
3 1 3 2
|
||||
3 4 32 5
|
||||
3 6 5 32
|
||||
3 8 32 30
|
||||
3 9 7 32
|
||||
3 32 7 30
|
||||
3 10 32 11
|
||||
3 4 11 32
|
||||
3 10 9 32
|
||||
3 6 32 8
|
||||
3 13 5 12
|
||||
3 38 23 21
|
||||
3 26 25 22
|
||||
3 24 25 26
|
||||
3 27 39 28
|
||||
3 16 19 14
|
||||
3 35 34 20
|
||||
3 18 29 36
|
||||
3 18 28 29
|
||||
3 15 33 29
|
||||
3 31 40 41
|
||||
3 40 17 37
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
OFF
|
||||
37 34 0
|
||||
|
||||
172.45960998535156 327.00732421875 10.000033378601074
|
||||
173.35765075683594 327.18472290039062 10.000033378601074
|
||||
172.45960998535156 327.00732421875 10
|
||||
174.25531005859375 327.36398315429688 10.000033378601074
|
||||
175.282470703125 327.571533203125 10
|
||||
170.58482360839844 325.87066650390625 10
|
||||
170.58482360839844 325.87066650390625 10.000033378601074
|
||||
170.58476257324219 326.1373291015625 10
|
||||
170.58476257324219 326.1373291015625 10.000033378601074
|
||||
170.58488464355469 326.67068481445312 10.000033378601074
|
||||
170.58488464355469 326.67068481445312 10
|
||||
170.58477783203125 326.40402221679688 10.000033378601074
|
||||
170.58477783203125 326.40402221679688 10
|
||||
171.21096801757812 326.77630615234375 10
|
||||
171.21096801757812 326.77630615234375 10.000033378601074
|
||||
171.83589172363281 326.88851928710938 10.000033378601074
|
||||
171.83589172363281 326.88851928710938 10
|
||||
198.59626770019531 331.45306396484375 10
|
||||
171.3594970703125 325.91452026367188 10
|
||||
171.3594970703125 325.91452026367188 10.000033378601074
|
||||
171.10134887695312 325.89859008789062 10
|
||||
171.10134887695312 325.89859008789062 10.000033378601074
|
||||
170.84312438964844 325.88397216796875 10.000033378601074
|
||||
170.84312438964844 325.88397216796875 10
|
||||
173.88740539550781 326.08248901367188 10.000033378601074
|
||||
174.88548278808594 326.13330078125 10
|
||||
173.12164306640625 326.03756713867188 10
|
||||
172.62298583984375 326.00552368164062 10.000033378601074
|
||||
176.65058898925781 326.20169067382812 10
|
||||
179.54045104980469 326.31793212890625 10
|
||||
182.43142700195312 326.40179443359375 10
|
||||
192.267333984375 331.10971069335938 10
|
||||
197.96424865722656 332.17782592773438 10
|
||||
175.15260314941406 328.56558227539062 10.000033378601074
|
||||
175.15260314941406 325.1444091796875 10.000033378601074
|
||||
161.37049865722656 320.09548950195312 10.000033378601074
|
||||
161.37049865722656 332.70773315429688 10.000033378601074
|
||||
3 1 3 2
|
||||
3 2 3 4
|
||||
3 18 26 27
|
||||
3 27 26 24
|
||||
3 4 30 2
|
||||
3 31 32 17
|
||||
3 30 29 2
|
||||
3 2 29 16
|
||||
3 25 10 28
|
||||
3 10 25 12
|
||||
3 18 7 26
|
||||
3 18 20 7
|
||||
3 20 23 7
|
||||
3 23 5 7
|
||||
3 7 12 26
|
||||
3 26 12 25
|
||||
3 10 13 28
|
||||
3 13 16 28
|
||||
3 21 19 34
|
||||
3 21 34 22
|
||||
3 19 27 34
|
||||
3 36 11 35
|
||||
3 3 1 33
|
||||
3 1 0 33
|
||||
3 0 15 33
|
||||
3 15 14 33
|
||||
3 14 9 33
|
||||
3 33 9 36
|
||||
3 11 8 35
|
||||
3 8 6 35
|
||||
3 35 6 34
|
||||
3 6 22 34
|
||||
3 34 27 24
|
||||
3 11 36 9
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
OFF
|
||||
25 17 0
|
||||
|
||||
137.05000305175781 47.498001098632812 132.02400207519531
|
||||
137.05000305175781 42.498001098632812 132.65000915527344
|
||||
137.05000305175781 20 131.40000915527344
|
||||
137.05000305175781 14.998001098632812 90.316001892089844
|
||||
137.05000305175781 0 133.90000915527344
|
||||
137.05000305175781 5 131.40000915527344
|
||||
120.80000305175781 0 133.90000915527344
|
||||
134.05000305175781 2.9980001449584961 133.90000915527344
|
||||
136.67401123046875 15.874000549316406 133.90000915527344
|
||||
137.12800598144531 5 132.33399963378906
|
||||
137.12800598144531 20 132.33399963378906
|
||||
137.36601257324219 5 133.24000549316406
|
||||
137.36601257324219 20 133.24000549316406
|
||||
137.75401306152344 5 134.09400939941406
|
||||
137.05000305175781 31.248001098632812 90.316001892089844
|
||||
137.05000305175781 16.248001098632812 133.90000915527344
|
||||
118.55000305175781 2.25 133.90000915527344
|
||||
104.55000305175781 0 133.90000915527344
|
||||
137.05000305175781 32.498001098632812 133.90000915527344
|
||||
55.800003051757812 0 133.90000915527344
|
||||
54.674003601074219 1.124000072479248 133.90000915527344
|
||||
55.050003051757812 0.74800002574920654 133.90000915527344
|
||||
136.30000305175781 31.750001907348633 133.90000915527344
|
||||
39.550003051757812 0 133.90000915527344
|
||||
137.05000305175781 20 118.12000274658203
|
||||
3 0 1 2
|
||||
3 4 5 2
|
||||
3 7 4 8
|
||||
3 10 9 11
|
||||
3 10 11 12
|
||||
3 12 11 13
|
||||
3 14 24 3
|
||||
3 2 15 4
|
||||
3 15 8 4
|
||||
3 17 7 16
|
||||
3 18 2 1
|
||||
3 7 17 6
|
||||
3 2 18 15
|
||||
3 7 8 22
|
||||
3 15 22 8
|
||||
3 20 23 21
|
||||
3 19 21 23
|
||||
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
OFF
|
||||
67 48 0
|
||||
|
||||
25.003999710083008 4.125999927520752 5.3249998092651367
|
||||
24.648000717163086 4.1110000610351562 5.3020000457763672
|
||||
27.875 4.124000072479248 5.3159999847412109
|
||||
28.104999542236328 4.0980000495910645 5.3020000457763672
|
||||
27.547000885009766 -0.76599997282028198 5.3020000457763672
|
||||
24.26300048828125 4.1999998092651367 5.3020000457763672
|
||||
24.350000381469727 -1.2070000171661377 5.3020000457763672
|
||||
22.61199951171875 -1.2680000066757202 5.3020000457763672
|
||||
18.076999664306641 -0.76700001955032349 5.3020000457763672
|
||||
20.534172058105469 6.6471333503723145 5.3020000457763672
|
||||
21.565000534057617 6.2769999504089355 5.3020000457763672
|
||||
21.576999664306641 6.2220001220703125 5.3020000457763672
|
||||
24.184999465942383 4.2010002136230469 5.3020000457763672
|
||||
24.132999420166016 4.2109999656677246 5.3020000457763672
|
||||
23.76099967956543 4.3359999656677246 5.3020000457763672
|
||||
23.552000045776367 4.3480663299560547 5.3020000457763672
|
||||
23.822000503540039 4.2779998779296875 5.3020000457763672
|
||||
23.259000778198242 4.4369997978210449 5.3029999732971191
|
||||
22.599832534790039 5.119999885559082 5.3020000457763672
|
||||
21.814010620117188 5.7782330513000488 5.3020000457763672
|
||||
22.527999877929688 4.9455761909484863 5.3020000457763672
|
||||
21.797874450683594 5.8303966522216797 5.3020968437194824
|
||||
22.527999877929688 4.6591053009033203 5.3020000457763672
|
||||
21.822000503540039 5.8159999847412109 6.0100002288818359
|
||||
21.772134780883789 5.687347412109375 5.3039073944091797
|
||||
21.657405853271484 5.9652857780456543 5.3020000457763672
|
||||
21.655532836914062 5.9393019676208496 5.3023014068603516
|
||||
21.794061660766602 5.8427157402038574 5.3020000457763672
|
||||
21.660037994384766 5.9280643463134766 5.3023800849914551
|
||||
21.660087585449219 5.9279398918151855 5.3023805618286133
|
||||
21.820028305053711 5.6319999694824219 5.3020000457763672
|
||||
21.659999847412109 5.9279999732971191 5.3020000457763672
|
||||
19.494876861572266 4.9111647605895996 5.3020000457763672
|
||||
21.641000747680664 5.9800000190734863 5.3020000457763672
|
||||
21.624000549316406 6.0019998550415039 5.309999942779541
|
||||
-2.1689999103546143 -0.46799999475479126 5.3020000457763672
|
||||
20.37629508972168 6.2305684089660645 5.3020000457763672
|
||||
-2.2790000438690186 -1.3259999752044678 6.0859999656677246
|
||||
-2.1040000915527344 0.082999996840953827 5.320000171661377
|
||||
22.329999923706055 5.0479998588562012 5.3020000457763672
|
||||
19.238409042358398 4.5272407531738281 5.3020000457763672
|
||||
-1.9989999532699585 0.26600000262260437 6.7109999656677246
|
||||
18.052036285400391 3.3704285621643066 5.3020000457763672
|
||||
20.326999664306641 6.2470002174377441 5.0159997940063477
|
||||
19.670000076293945 6.4640002250671387 3.7780001163482666
|
||||
18.603000640869141 4.8670001029968262 3.7780001163482666
|
||||
-0.6029999852180481 6.8179998397827148 2.6359999179840088
|
||||
0.33100000023841858 3.0639998912811279 5.0159997940063477
|
||||
-1.143372654914856 4.4346461296081543 5.3020000457763672
|
||||
-1.1940000057220459 4.5510001182556152 5.0159997940063477
|
||||
0.83399999141693115 3.4670000076293945 3.7780001163482666
|
||||
-3.2599999904632568 10 5.0159997940063477
|
||||
-2.5490000247955322 10 3.7780001163482666
|
||||
-2.3269999027252197 8.1979999542236328 3.7780001163482666
|
||||
-1.6699999570846558 6.4640002250671387 3.7780001163482666
|
||||
-2.1198277473449707 5.846644401550293 5.3020000457763672
|
||||
-3.0250000953674316 8.0860004425048828 5.0159997940063477
|
||||
-1.9939999580383301 3.0099999904632568 5.3020000457763672
|
||||
-1.2384099960327148 4.5272407531738281 5.3020000457763672
|
||||
-2.2780001163482666 3.7369999885559082 5.3020000457763672
|
||||
-2.0220000743865967 0.74299997091293335 6.0689997673034668
|
||||
-1.9220000505447388 1.1330000162124634 5.3020000457763672
|
||||
-1.9739999771118164 0.92799997329711914 5.314000129699707
|
||||
-2.1050000190734863 -0.041999999433755875 6.1490001678466797
|
||||
-2.3269999027252197 6.2470002174377441 5.0159997940063477
|
||||
-0.6029999852180481 4.8670001029968262 3.7780001163482666
|
||||
21.659999847412109 5.9279999732971191 5.3020000457763672
|
||||
3 2 3 0
|
||||
3 5 1 6
|
||||
3 3 4 1
|
||||
3 4 6 1
|
||||
3 12 5 6
|
||||
3 13 12 7
|
||||
3 25 19 30
|
||||
3 19 25 27
|
||||
3 24 29 23
|
||||
3 31 32 25
|
||||
3 25 30 31
|
||||
3 34 66 26
|
||||
3 33 25 32
|
||||
3 66 34 28
|
||||
3 10 11 36
|
||||
3 11 33 36
|
||||
3 27 18 19
|
||||
3 17 18 21
|
||||
3 39 22 32
|
||||
3 20 19 18
|
||||
3 40 32 22
|
||||
3 8 40 22
|
||||
3 16 8 14
|
||||
3 6 7 12
|
||||
3 15 14 8
|
||||
3 8 16 7
|
||||
3 36 9 10
|
||||
3 30 39 32
|
||||
3 31 30 32
|
||||
3 36 33 32
|
||||
3 43 45 44
|
||||
3 22 15 8
|
||||
3 8 42 40
|
||||
3 16 13 7
|
||||
3 49 58 55
|
||||
3 57 59 48
|
||||
3 51 52 56
|
||||
3 64 56 53
|
||||
3 65 54 46
|
||||
3 65 49 54
|
||||
3 49 64 54
|
||||
3 47 65 50
|
||||
3 47 49 65
|
||||
3 38 62 35
|
||||
3 62 61 35
|
||||
3 38 37 63
|
||||
3 41 60 63
|
||||
3 63 37 41
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ int main(int argc, char* argv[])
|
|||
auto cdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3<CDT>(mesh);
|
||||
static_assert(std::is_same_v<decltype(cdt), CDT>);
|
||||
CDT cdt2(mesh);
|
||||
const auto nb_cstr_facets = cdt2.number_of_constrained_facets();
|
||||
[[maybe_unused]] const auto nb_cstr_facets = cdt2.number_of_constrained_facets();
|
||||
|
||||
assert(cdt.triangulation().number_of_vertices() == cdt2.triangulation().number_of_vertices());
|
||||
assert(cdt.number_of_constrained_facets() == cdt2.number_of_constrained_facets());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
OFF
|
||||
24 11 0
|
||||
|
||||
1.5 0.5 1
|
||||
0.5 0.5 0
|
||||
0.5 0.5 1
|
||||
0 0 0
|
||||
0 0.5 0
|
||||
0.5 0.5 0
|
||||
0.5 1 0
|
||||
0 1 0
|
||||
0.5 0 0
|
||||
1 0 0
|
||||
1 0.5 0
|
||||
1 1 0
|
||||
1.5 1.5 1
|
||||
2.5 1.5 1
|
||||
2.5 0.5 1
|
||||
-0.5 -0.5 1
|
||||
2.5 -0.5 1
|
||||
0.5 1.5 1
|
||||
-0.5 0.5 1
|
||||
1.5 0.5 1
|
||||
1.5 -0.5 1
|
||||
-0.5 1.5 1
|
||||
0.5 0.5 1
|
||||
0.5 -0.5 1
|
||||
3 2 1 0
|
||||
4 4 3 8 5
|
||||
4 7 4 5 6
|
||||
4 5 8 9 10
|
||||
4 6 5 10 11
|
||||
4 12 19 14 13
|
||||
4 19 20 16 14
|
||||
4 17 22 19 12
|
||||
4 22 23 20 19
|
||||
4 21 18 22 17
|
||||
4 18 15 23 22
|
||||
|
||||
|
|
@ -117,14 +117,14 @@ Qt is a cross-platform application and UI framework.
|
|||
The component `CGAL_Qt6` is essential to run the \cgal demos and basic viewers.
|
||||
It requires \qt6 installed on your system.
|
||||
In case \qt is not yet installed on your system, you can download
|
||||
it from <A HREF="https://www.qt-project.org/">`https://www.qt-project.org/`</A>.
|
||||
it from <A HREF="https://contribute.qt-project.org/">`https://contribute.qt-project.org/`</A>.
|
||||
|
||||
The exhaustive list of \qt6 components used in demos is:
|
||||
`Core`, `Gui`, `Help`, `OpenGL`, `OpenGLWidgets`, `Qml`, `Svg`, `Widgets`,
|
||||
`WebSockets`, `Network`, and `qcollectiongenerator` (with `sqlite` driver plugin).
|
||||
|
||||
\subsection thirdpartyEigen Eigen
|
||||
<b>Version 3.3.7 or later</b>
|
||||
<b>Version 3.3.7 or later (including Eigen3 5.0.0)</b>
|
||||
|
||||
\eigen is a `C++` template library for linear algebra. \eigen supports all
|
||||
matrix sizes, various matrix decomposition methods and sparse linear solvers.
|
||||
|
|
@ -138,7 +138,7 @@ Overview</a> page. In order to use Eigen in \cgal programs, the
|
|||
executables should be linked with the CMake imported target
|
||||
`CGAL::Eigen3_support` provided in `CGAL_Eigen3_support.cmake`.
|
||||
|
||||
The \eigen web site is <A HREF="https://eigen.tuxfamily.org/index.php?title=Main_Page">`https://eigen.tuxfamily.org`</A>.
|
||||
The \eigen web site is <A HREF="https://libeigen.gitlab.io/">`https://libeigen.gitlab.io/`</A>.
|
||||
|
||||
\subsection thirdpartyOpenGR OpenGR
|
||||
|
||||
|
|
@ -167,17 +167,6 @@ Alternatively, version 1.3.1 of \libpointmatcher is supported with version 3.3.7
|
|||
`https://github.com/ethz-asl/libpointmatcher/blob/master/doc/Compilation.md`:`NABO_INCLUDE_DIR` becomes `libnabo_INCLUDE_DIRS`
|
||||
and `NABO_LIBRARY` becomes `libnabo_LIBRARIES` in the "Build libpointmatcher" section.
|
||||
|
||||
\subsection thirdpartyLeda LEDA
|
||||
<b>Version 6.2 or later</b>
|
||||
|
||||
\leda is a library of efficient data structures and
|
||||
algorithms. Like \core, \leda offers a real number data type.
|
||||
|
||||
In \cgal this library is optional, and its number types can
|
||||
be used as an alternative to \gmp, \mpfr, and \core.
|
||||
|
||||
Free and commercial editions of \leda are available from <A HREF="https://www.algorithmic-solutions.com">`https://www.algorithmic-solutions.com`</A>.
|
||||
|
||||
\subsection thirdpartyMPFI Multiple Precision Floating-point Interval (MPFI)
|
||||
<b>Version 1.4 or later</b>
|
||||
|
||||
|
|
@ -265,7 +254,7 @@ vcpkg install suitesparse
|
|||
\subsection thirdpartyMETIS METIS
|
||||
<b>Version 5.1 or later</b>
|
||||
|
||||
\metis is a library developed by the <A HREF="http://glaros.dtc.umn.edu/gkhome/">Karypis Lab</A>
|
||||
\metis is a library developed by the <A HREF="https://github.com/KarypisLab/">Karypis Lab</A>
|
||||
and designed to partition graphs and produce fill-reducing matrix orderings.
|
||||
|
||||
\cgal offers wrappers around some of the methods of the \metis library
|
||||
|
|
@ -274,7 +263,7 @@ to allow the partitioning of graphs that are models of the concepts of the
|
|||
and, by extension, of surface meshes (see Section \ref BGLPartitioning of the package \ref PkgBGL).
|
||||
|
||||
More information is available on the METIS library
|
||||
at <A HREF="http://glaros.dtc.umn.edu/gkhome/metis/metis/overview">`http://glaros.dtc.umn.edu/gkhome/metis/metis/overview`</A>.
|
||||
at <A HREF="https://github.com/KarypisLab/METIS">`https://github.com/KarypisLab/METIS`</A>.
|
||||
|
||||
\subsection thirdpartyzlib zlib
|
||||
|
||||
|
|
|
|||
|
|
@ -118600,7 +118600,7 @@ both for rendering and for modeling. Contains C code."
|
|||
|
||||
@article{ph-ddocs-92
|
||||
, author = "J. P. Pratt and V. P. Heuring"
|
||||
, title = "Designing digital optical computing systems: power and and crosstalk"
|
||||
, title = "Designing digital optical computing systems: power and crosstalk"
|
||||
, journal = "Appl. Optics"
|
||||
, volume = 31
|
||||
, number = 23
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
(function() {
|
||||
'use strict';
|
||||
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(main|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
|
||||
var url_local = /.*\/doc_output\//;
|
||||
var current_version_local = 'master'
|
||||
var current_version_local = 'main'
|
||||
var all_versions = [
|
||||
'master',
|
||||
'6.1-beta2',
|
||||
'main',
|
||||
'6.1',
|
||||
'6.0.2',
|
||||
'latest',
|
||||
'5.6.3',
|
||||
|
|
@ -31,12 +31,12 @@
|
|||
];
|
||||
|
||||
function build_select(current_version) {
|
||||
if( current_version == 'master') {
|
||||
if( current_version == 'main') {
|
||||
let top_elt = document.getElementById("top");
|
||||
|
||||
let first_element = top_elt.childNodes[0];
|
||||
let new_div = document.createElement("p");
|
||||
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/CGAL/cgal/tree/master">master</a> development branch of CGAL. It might diverge from the official releases.';
|
||||
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/CGAL/cgal/tree/main">main</a> development branch of CGAL. It might diverge from the official releases.';
|
||||
new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;"
|
||||
let OK = top_elt.insertBefore(new_div, first_element);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
(function() {
|
||||
'use strict';
|
||||
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(main|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
|
||||
var url_local = /.*\/doc_output\//;
|
||||
var current_version_local = 'master'
|
||||
var current_version_local = 'main'
|
||||
var all_versions = [
|
||||
'master',
|
||||
'6.1-beta2',
|
||||
'main',
|
||||
'6.1',
|
||||
'6.0.2',
|
||||
'latest',
|
||||
'5.6.3',
|
||||
|
|
@ -31,12 +31,12 @@
|
|||
];
|
||||
|
||||
function build_select(current_version) {
|
||||
if( current_version == 'master') {
|
||||
if( current_version == 'main') {
|
||||
let top_elt = document.getElementById("top");
|
||||
|
||||
let first_element = top_elt.childNodes[0];
|
||||
let new_div = document.createElement("p");
|
||||
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/CGAL/cgal/tree/master">master</a> development branch of CGAL. It might diverge from the official releases.';
|
||||
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/CGAL/cgal/tree/main">main</a> development branch of CGAL. It might diverge from the official releases.';
|
||||
new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;"
|
||||
let OK = top_elt.insertBefore(new_div, first_element);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
(function() {
|
||||
'use strict';
|
||||
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(master|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
|
||||
var url_re = /(cgal\.geometryfactory\.com\/CGAL\/doc\/|doc\.cgal\.org\/)(main|latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
|
||||
var url_local = /.*\/doc_output\//;
|
||||
var current_version_local = 'master'
|
||||
var current_version_local = 'main'
|
||||
var all_versions = [
|
||||
'master',
|
||||
'6.1-beta2',
|
||||
'main',
|
||||
'6.1',
|
||||
'6.0.2',
|
||||
'latest',
|
||||
'5.6.3',
|
||||
|
|
@ -31,12 +31,12 @@
|
|||
];
|
||||
|
||||
function build_select(current_version) {
|
||||
if( current_version == 'master') {
|
||||
if( current_version == 'main') {
|
||||
let top_elt = document.getElementById("top");
|
||||
|
||||
let first_element = top_elt.childNodes[0];
|
||||
let new_div = document.createElement("p");
|
||||
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/CGAL/cgal/tree/master">master</a> development branch of CGAL. It might diverge from the official releases.';
|
||||
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/CGAL/cgal/tree/main">main</a> development branch of CGAL. It might diverge from the official releases.';
|
||||
new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;"
|
||||
let OK = top_elt.insertBefore(new_div, first_element);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
if(fit_in_double(n,d)){
|
||||
return std::make_pair(d,true);
|
||||
}
|
||||
return std::make_pair(0,false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Bbox_2,bool> operator()(const Bbox_2 b) const
|
||||
|
|
@ -86,7 +86,7 @@ public:
|
|||
if(fit_in_double(p.x(),x) && fit_in_double(p.y(),y)){
|
||||
return std::make_pair(Point_2(x,y),true);
|
||||
}
|
||||
return std::make_pair(ORIGIN,false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Vector_2,bool> operator()(const typename IK::Vector_2& v) const
|
||||
|
|
@ -96,7 +96,7 @@ public:
|
|||
if(fit_in_double(v.x(),x) && fit_in_double(v.y(),y)){
|
||||
return std::make_pair(Vector_2(x,y),true);
|
||||
}
|
||||
return std::make_pair(Vector_2(),false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Direction_2,bool> operator()(const typename IK::Direction_2& d) const
|
||||
|
|
@ -106,7 +106,7 @@ public:
|
|||
if(fit_in_double(d.dx(),x) && fit_in_double(d.dy(),y)){
|
||||
return std::make_pair(Direction_2(x,y),true);
|
||||
}
|
||||
return std::make_pair(Direction_2(),false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Weighted_point_2,bool> operator()(const typename IK::Weighted_point_2& wp) const
|
||||
|
|
@ -116,18 +116,18 @@ public:
|
|||
if(sp.second && w.second){
|
||||
return std::make_pair(Weighted_point_2(sp.first,w.first),true);
|
||||
}
|
||||
return std::make_pair(Weighted_point_2(),false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Segment_2,bool> operator()(const typename IK::Segment_2& s) const
|
||||
{
|
||||
std::pair<Point_2,bool> sp = operator()(s.source());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Segment_2(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_2,bool> tp = operator()(s.target());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Segment_2(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Segment_2(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
@ -138,18 +138,18 @@ public:
|
|||
if(a.second && b.second && c.second){
|
||||
return std::make_pair(Line_2(a.first, b.first, c.first),true);
|
||||
}
|
||||
return std::make_pair(Line_2(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Ray_2,bool> operator()(const typename IK::Ray_2& r) const
|
||||
{
|
||||
std::pair<Point_2,bool> sp = operator()(r.source());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Ray_2(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_2,bool> tp = operator()(r.second_point());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Ray_2(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Ray_2(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
@ -158,15 +158,15 @@ public:
|
|||
{
|
||||
std::pair<Point_2,bool> v0 = operator()(t.vertex(0));
|
||||
if(! v0.second){
|
||||
return std::make_pair(Triangle_2(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_2,bool> v1 = operator()(t.vertex(1));
|
||||
if(! v1.second){
|
||||
return std::make_pair(Triangle_2(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_2,bool> v2 = operator()(t.vertex(2));
|
||||
if(! v2.second){
|
||||
return std::make_pair(Triangle_2(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Triangle_2(v0.first,v1.first, v2.first), true);
|
||||
}
|
||||
|
|
@ -178,18 +178,18 @@ public:
|
|||
if(c.second && sr.second){
|
||||
return std::make_pair(Circle_2(c.first, sr.first, ci.orientation()),true);
|
||||
}
|
||||
return std::make_pair(Circle_2(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Iso_rectangle_2,bool> operator()(const typename IK::Iso_rectangle_2& ir) const
|
||||
{
|
||||
std::pair<Point_2,bool> sp = operator()((ir.min)());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Iso_rectangle_2(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_2,bool> tp = operator()((ir.max)());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Iso_rectangle_2(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Iso_rectangle_2(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
@ -199,11 +199,11 @@ public:
|
|||
{
|
||||
std::pair<Point_3,bool> sp = operator()(li.point());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Line_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Vector_3,bool> tp = operator()(li.to_vector());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Line_3(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Line_3(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
@ -214,22 +214,22 @@ public:
|
|||
if(a.second && b.second && c.second && d.second){
|
||||
return std::make_pair(Plane_3(a.first, b.first, c.first, d.first),true);
|
||||
}
|
||||
return std::make_pair(Plane_3(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Triangle_3,bool> operator()(const typename IK::Triangle_3& t) const
|
||||
{
|
||||
std::pair<Point_3,bool> v0 = operator()(t.vertex(0));
|
||||
if(! v0.second){
|
||||
return std::make_pair(Triangle_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> v1 = operator()(t.vertex(1));
|
||||
if(! v1.second){
|
||||
return std::make_pair(Triangle_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> v2 = operator()(t.vertex(2));
|
||||
if(! v2.second){
|
||||
return std::make_pair(Triangle_3(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Triangle_3(v0.first,v1.first, v2.first), true);
|
||||
}
|
||||
|
|
@ -238,19 +238,19 @@ public:
|
|||
{
|
||||
std::pair<Point_3,bool> v0 = operator()(t.vertex(0));
|
||||
if(! v0.second){
|
||||
return std::make_pair(Tetrahedron_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> v1 = operator()(t.vertex(1));
|
||||
if(! v1.second){
|
||||
return std::make_pair(Tetrahedron_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> v2 = operator()(t.vertex(2));
|
||||
if(! v2.second){
|
||||
return std::make_pair(Tetrahedron_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> v3 = operator()(t.vertex(3));
|
||||
if(! v3.second){
|
||||
return std::make_pair(Tetrahedron_3(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Tetrahedron_3(v0.first,v1.first, v2.first, v3.first), true);
|
||||
}
|
||||
|
|
@ -259,11 +259,11 @@ public:
|
|||
{
|
||||
std::pair<Point_3,bool> sp = operator()(r.source());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Ray_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> tp = operator()(r.second_point());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Ray_3(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Ray_3(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
@ -275,7 +275,7 @@ public:
|
|||
if(fit_in_double(p.x(),x) && fit_in_double(p.y(),y) && fit_in_double(p.z(),z)){
|
||||
return std::make_pair(Point_3(x,y,z),true);
|
||||
}
|
||||
return std::make_pair(ORIGIN,false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Vector_3,bool> operator()(const typename IK::Vector_3& v) const
|
||||
|
|
@ -285,7 +285,7 @@ public:
|
|||
if(fit_in_double(v.x(),x) && fit_in_double(v.y(),y) && fit_in_double(v.z(),z)){
|
||||
return std::make_pair(Vector_3(x,y,z),true);
|
||||
}
|
||||
return std::make_pair(Vector_3(),false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Direction_3,bool> operator()(const typename IK::Direction_3& d) const
|
||||
|
|
@ -295,18 +295,18 @@ public:
|
|||
if(fit_in_double(d.dx(),x) && fit_in_double(d.dy(),y) && fit_in_double(d.dz(),z)){
|
||||
return std::make_pair(Direction_3(x,y,z),true);
|
||||
}
|
||||
return std::make_pair(Direction_3(),false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Segment_3,bool> operator()(const typename IK::Segment_3& s) const
|
||||
{
|
||||
std::pair<Point_3,bool> sp = operator()(s.source());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Segment_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> tp = operator()(s.target());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Segment_3(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Segment_3(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
@ -318,7 +318,7 @@ public:
|
|||
if(sp.second && w.second){
|
||||
return std::make_pair(Weighted_point_3(sp.first,w.first),true);
|
||||
}
|
||||
return std::make_pair(Weighted_point_3(),false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Sphere_3,bool> operator()(const typename IK::Sphere_3& s) const
|
||||
|
|
@ -328,7 +328,7 @@ public:
|
|||
if(c.second && sr.second){
|
||||
return std::make_pair(Sphere_3(c.first, sr.first, s.orientation()),true);
|
||||
}
|
||||
return std::make_pair(Sphere_3(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Circle_3,bool> operator()(const typename IK::Circle_3& ci) const
|
||||
|
|
@ -338,18 +338,18 @@ public:
|
|||
if(c.second && sr.second){
|
||||
return std::make_pair(Circle_3(sr.first, c.first),true);
|
||||
}
|
||||
return std::make_pair(Circle_3(), false);
|
||||
return {};
|
||||
}
|
||||
|
||||
std::pair<Iso_cuboid_3,bool> operator()(const typename IK::Iso_cuboid_3& ic) const
|
||||
{
|
||||
std::pair<Point_3,bool> sp = operator()((ic.min)());
|
||||
if(! sp.second){
|
||||
return std::make_pair(Iso_cuboid_3(),false);
|
||||
return {};
|
||||
}
|
||||
std::pair<Point_3,bool> tp = operator()((ic.max)());
|
||||
if(! tp.second){
|
||||
return std::make_pair(Iso_cuboid_3(),false);
|
||||
return {};
|
||||
}
|
||||
return std::make_pair(Iso_cuboid_3(sp.first,tp.first), true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,221 +0,0 @@
|
|||
// Copyright (c) 2025 GeometryFactory (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org)
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
//
|
||||
// Author(s) : Andreas Fabri
|
||||
|
||||
#ifndef CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_4_H
|
||||
#define CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_4_H
|
||||
|
||||
#include <CGAL/Profile_counter.h>
|
||||
#include <CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h>
|
||||
#include <CGAL/determinant.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace CGAL { namespace internal { namespace Static_filters_predicates {
|
||||
|
||||
|
||||
|
||||
template < typename K_base >
|
||||
class Orientation_4
|
||||
: public K_base::Orientation_4
|
||||
{
|
||||
typedef typename K_base::Orientation Orientation;
|
||||
typedef typename K_base::Point_4 Point_4;
|
||||
typedef typename K_base::Orientation_4 Base;
|
||||
|
||||
public:
|
||||
using Base::operator();
|
||||
|
||||
Orientation
|
||||
operator()(const Point_4 &p, const Point_4 &q,
|
||||
const Point_4 &r, const Point_4 &s,
|
||||
const Point_4 &t) const
|
||||
{
|
||||
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Orientation_4", tmp);
|
||||
|
||||
double p0, p1, p2, p3, q0, q1, q2, q3, r0, r1, r2, r3, s0, s1, s2, s3, t0, t1, t2, t3;
|
||||
|
||||
if (fit_in_double(p.c0(), p0) && fit_in_double(p.c1(), p1) &&
|
||||
fit_in_double(p.c2(), p2) && fit_in_double(p.c3(), p3) &&
|
||||
fit_in_double(q.c0(), q0) && fit_in_double(q.c1(), q1) &&
|
||||
fit_in_double(q.c2(), q2) && fit_in_double(q.c3(), q3) &&
|
||||
fit_in_double(r.c0(), r0) && fit_in_double(r.c1(), r1) &&
|
||||
fit_in_double(r.c2(), r2) && fit_in_double(r.c3(), r3) &&
|
||||
fit_in_double(s.c0(), s0) && fit_in_double(s.c1(), s1) &&
|
||||
fit_in_double(s.c2(), s2) && fit_in_double(s.c3(), s3) &&
|
||||
fit_in_double(t.c0(), t0) && fit_in_double(t.c1(), t1) &&
|
||||
fit_in_double(t.c2(), t2) && fit_in_double(t.c3(), t3) )
|
||||
{
|
||||
CGAL_assertion_code(Orientation should_be = Base::operator()(p, q, r, s, t));
|
||||
double m01;
|
||||
m01 = (q0 - p0);
|
||||
double m02;
|
||||
m02 = (r0 - p0);
|
||||
double m03;
|
||||
m03 = (s0 - p0);
|
||||
double m04;
|
||||
m04 = (t0 - p0);
|
||||
double m11;
|
||||
m11 = (q1 - p1);
|
||||
double m12;
|
||||
m12 = (r1 - p1);
|
||||
double m13;
|
||||
m13 = (s1 - p1);
|
||||
double m14;
|
||||
m14 = (t1 - p1);
|
||||
double m21;
|
||||
m21 = (q2 - p2);
|
||||
double m22;
|
||||
m22 = (r2 - p2);
|
||||
double m23;
|
||||
m23 = (s2 - p2);
|
||||
double m24;
|
||||
m24 = (t2 - p2);
|
||||
double m31;
|
||||
m31 = (q3 - p3);
|
||||
double m32;
|
||||
m32 = (r3 - p3);
|
||||
double m33;
|
||||
m33 = (s3 - p3);
|
||||
double m34;
|
||||
m34 = (t3 - p3);
|
||||
double det;
|
||||
det = ::CGAL::determinant( m01, m02, m03, m04, m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34 );
|
||||
double eps;
|
||||
double max1 = CGAL::abs(m01);
|
||||
double am = CGAL::abs(m02);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m03);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m11);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m12);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m13);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m23);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
|
||||
|
||||
double max2 = CGAL::abs(m01);
|
||||
am = CGAL::abs(m02);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m11);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m12);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m23);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m33);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
|
||||
|
||||
double max3 = CGAL::abs(m04);
|
||||
am = CGAL::abs(m14);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m24);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m34);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
|
||||
|
||||
double max4 = CGAL::abs(m11);
|
||||
am = CGAL::abs(m12);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m31);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m32);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
|
||||
|
||||
double lower_bound_1;
|
||||
double upper_bound_1;
|
||||
lower_bound_1 = max1;
|
||||
upper_bound_1 = max1;
|
||||
if( (max2 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max2 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max2;
|
||||
}
|
||||
}
|
||||
if( (max3 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max3;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max3 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max3;
|
||||
}
|
||||
}
|
||||
if( (max4 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max4 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max4;
|
||||
}
|
||||
}
|
||||
if( (lower_bound_1 < 2.89273249588395272840e-74) )
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (upper_bound_1 > 7.23700557733225900010e+75) )
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t);
|
||||
}
|
||||
eps = (3.17768858673611327578e-14 * (((max4 * max2) * max1) * max3));
|
||||
if( (det > eps) )
|
||||
{
|
||||
CGAL_assertion(should_be == POSITIVE);
|
||||
return POSITIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (det < -eps) )
|
||||
{
|
||||
CGAL_assertion(should_be == NEGATIVE);
|
||||
return NEGATIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Base::operator()(p, q, r, s, t);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} } } // namespace CGAL::internal::Static_filters_predicates
|
||||
|
||||
#endif // CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_4_H
|
||||
|
|
@ -1,289 +0,0 @@
|
|||
// Copyright (c) 2025 GeometryFactory (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org)
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
//
|
||||
// Author(s) : Andreas Fabri
|
||||
|
||||
#ifndef CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_5_H
|
||||
#define CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_5_H
|
||||
|
||||
#include <CGAL/Profile_counter.h>
|
||||
#include <CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h>
|
||||
#include <CGAL/determinant.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace CGAL { namespace internal { namespace Static_filters_predicates {
|
||||
|
||||
|
||||
|
||||
template < typename K_base >
|
||||
class Orientation_5
|
||||
: public K_base::Orientation_5
|
||||
{
|
||||
typedef typename K_base::Orientation Orientation;
|
||||
typedef typename K_base::Point_5 Point_5;
|
||||
typedef typename K_base::Orientation_5 Base;
|
||||
|
||||
public:
|
||||
using Base::operator();
|
||||
|
||||
Orientation
|
||||
operator()(const Point_5 &p, const Point_5 &q,
|
||||
const Point_5 &r, const Point_5 &s,
|
||||
const Point_5 &t, const Point_5 &u) const
|
||||
{
|
||||
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Orientation_5", tmp);
|
||||
|
||||
double p0, p1, p2, p3, p4, q0, q1, q2, q3, q4, r0, r1, r2, r3, r4, s0, s1, s2, s3, s4, t0, t1, t2, t3, t4, u0, u1, u2, u3, u4;
|
||||
|
||||
if (fit_in_double(p.c0(), p0) && fit_in_double(p.c1(), p1) &&
|
||||
fit_in_double(p.c2(), p2) && fit_in_double(p.c3(), p3) &&
|
||||
fit_in_double(p.c4(), p4) &&
|
||||
fit_in_double(q.c0(), q0) && fit_in_double(q.c1(), q1) &&
|
||||
fit_in_double(q.c2(), q2) && fit_in_double(q.c3(), q3) &&
|
||||
fit_in_double(q.c4(), q4) &&
|
||||
fit_in_double(r.c0(), r0) && fit_in_double(r.c1(), r1) &&
|
||||
fit_in_double(r.c2(), r2) && fit_in_double(r.c3(), r3) &&
|
||||
fit_in_double(r.c4(), r4) &&
|
||||
fit_in_double(s.c0(), s0) && fit_in_double(s.c1(), s1) &&
|
||||
fit_in_double(s.c2(), s2) && fit_in_double(s.c3(), s3) &&
|
||||
fit_in_double(s.c4(), s4) &&
|
||||
fit_in_double(t.c0(), t0) && fit_in_double(t.c1(), t1) &&
|
||||
fit_in_double(t.c2(), t2) && fit_in_double(t.c3(), t3) &&
|
||||
fit_in_double(t.c4(), t4) &&
|
||||
fit_in_double(u.c0(), u0) && fit_in_double(u.c1(), u1) &&
|
||||
fit_in_double(u.c2(), u2) && fit_in_double(u.c3(), u3) &&
|
||||
fit_in_double(u.c4(), u4))
|
||||
|
||||
{
|
||||
CGAL_assertion_code(Orientation should_be = Base::operator()(p, q, r, s, t, u));
|
||||
double m01;
|
||||
m01 = (q0 - p0);
|
||||
double m02;
|
||||
m02 = (r0 - p0);
|
||||
double m03;
|
||||
m03 = (s0 - p0);
|
||||
double m04;
|
||||
m04 = (t0 - p0);
|
||||
double m05;
|
||||
m05 = (u0 - p0);
|
||||
double m11;
|
||||
m11 = (q1 - p1);
|
||||
double m12;
|
||||
m12 = (r1 - p1);
|
||||
double m13;
|
||||
m13 = (s1 - p1);
|
||||
double m14;
|
||||
m14 = (t1 - p1);
|
||||
double m15;
|
||||
m15 = (u1 - p1);
|
||||
double m21;
|
||||
m21 = (q2 - p2);
|
||||
double m22;
|
||||
m22 = (r2 - p2);
|
||||
double m23;
|
||||
m23 = (s2 - p2);
|
||||
double m24;
|
||||
m24 = (t2 - p2);
|
||||
double m25;
|
||||
m25 = (u2 - p2);
|
||||
double m31;
|
||||
m31 = (q3 - p3);
|
||||
double m32;
|
||||
m32 = (r3 - p3);
|
||||
double m33;
|
||||
m33 = (s3 - p3);
|
||||
double m34;
|
||||
m34 = (t3 - p3);
|
||||
double m35;
|
||||
m35 = (u3 - p3);
|
||||
double m41;
|
||||
m41 = (q4 - p4);
|
||||
double m42;
|
||||
m42 = (r4 - p4);
|
||||
double m43;
|
||||
m43 = (s4 - p4);
|
||||
double m44;
|
||||
m44 = (t4 - p4);
|
||||
double m45;
|
||||
m45 = (u4 - p4);
|
||||
double det;
|
||||
det = ::CGAL::determinant( m01, m02, m03, m04, m05, m11, m12, m13, m14, m15, m21, m22, m23, m24, m25, m31, m32, m33, m34, m35, m41, m42, m43, m44, m45 );
|
||||
double eps;
|
||||
double max1 = CGAL::abs(m01);
|
||||
double am = CGAL::abs(m02);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m03);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m11);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m12);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m13);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m23);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m33);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
|
||||
|
||||
double max2 = CGAL::abs(m01);
|
||||
am = CGAL::abs(m02);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m11);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m12);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m23);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m31);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m32);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m33);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m43);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
|
||||
|
||||
double max3 = CGAL::abs(m04);
|
||||
am = CGAL::abs(m14);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m24);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m34);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m44);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
|
||||
|
||||
double max4 = CGAL::abs(m05);
|
||||
am = CGAL::abs(m15);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m25);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m35);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m45);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
|
||||
|
||||
double max5 = CGAL::abs(m11);
|
||||
am = CGAL::abs(m12);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m31);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m32);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m41);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m42);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
|
||||
double lower_bound_1;
|
||||
double upper_bound_1;
|
||||
lower_bound_1 = max5;
|
||||
upper_bound_1 = max5;
|
||||
if( (max1 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max1 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max1;
|
||||
}
|
||||
}
|
||||
if( (max2 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max2 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max2;
|
||||
}
|
||||
}
|
||||
if( (max3 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max3;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max3 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max3;
|
||||
}
|
||||
}
|
||||
if( (max4 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max4 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max4;
|
||||
}
|
||||
}
|
||||
if( (lower_bound_1 < 9.99657131447050328602e-60) )
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t, u);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (upper_bound_1 > 3.21387608851797912384e+60) )
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t, u);
|
||||
}
|
||||
eps = (2.22889232457534740153e-13 * ((((max5 * max2) * max1) * max3) * max4));
|
||||
if( (det > eps) )
|
||||
{
|
||||
CGAL_assertion(should_be == POSITIVE);
|
||||
return POSITIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (det < -eps) )
|
||||
{
|
||||
CGAL_assertion(should_be == NEGATIVE);
|
||||
return NEGATIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t, u);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Base::operator()(p, q, r, s, t, u);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
} } } // namespace CGAL::internal::Static_filters_predicates
|
||||
|
||||
#endif // CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_5_H
|
||||
|
|
@ -1,358 +0,0 @@
|
|||
// Copyright (c) 2025 GeometryFactory (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org)
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
//
|
||||
// Author(s) : Andreas Fabri
|
||||
|
||||
#ifndef CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_6_H
|
||||
#define CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_6_H
|
||||
|
||||
#include <CGAL/Profile_counter.h>
|
||||
#include <CGAL/Filtered_kernel/internal/Static_filters/Static_filter_error.h>
|
||||
#include <CGAL/determinant.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace CGAL { namespace internal { namespace Static_filters_predicates {
|
||||
|
||||
|
||||
|
||||
template < typename K_base >
|
||||
class Orientation_6
|
||||
: public K_base::Orientation_6
|
||||
{
|
||||
typedef typename K_base::Orientation Orientation;
|
||||
typedef typename K_base::Point_6 Point_6;
|
||||
typedef typename K_base::Orientation_6 Base;
|
||||
|
||||
public:
|
||||
using Base::operator();
|
||||
|
||||
Orientation
|
||||
operator()(const Point_6 &p, const Point_6 &q,
|
||||
const Point_6 &r, const Point_6 &s,
|
||||
const Point_6 &t, const Point_6 &u, const Point_6 &v) const
|
||||
{
|
||||
CGAL_BRANCH_PROFILER_3("semi-static failures/attempts/calls to : Orientation_6", tmp);
|
||||
|
||||
double p0, p1, p2, p3, p4, p5, q0, q1, q2, q3, q4, q5, r0, r1, r2, r3, r4, r5, s0, s1, s2, s3, s4, s5, t0, t1, t2, t3, t4, t5, u0, u1, u2, u3, u4, u5, v0, v1, v2, v3, v4, v5;
|
||||
if (fit_in_double(p.c0(), p0) && fit_in_double(p.c1(), p1) &&
|
||||
fit_in_double(p.c2(), p2) && fit_in_double(p.c3(), p3) &&
|
||||
fit_in_double(p.c4(), p4) && fit_in_double(p.c5(), p5) &&
|
||||
|
||||
fit_in_double(q.c0(), q0) && fit_in_double(q.c1(), q1) &&
|
||||
fit_in_double(q.c2(), q2) && fit_in_double(q.c3(), q3) &&
|
||||
fit_in_double(q.c4(), q4) && fit_in_double(q.c5(), q5) &&
|
||||
|
||||
fit_in_double(r.c0(), r0) && fit_in_double(r.c1(), r1) &&
|
||||
fit_in_double(r.c2(), r2) && fit_in_double(r.c3(), r3) &&
|
||||
fit_in_double(r.c4(), r4) && fit_in_double(r.c5(), r5) &&
|
||||
|
||||
fit_in_double(s.c0(), s0) && fit_in_double(s.c1(), s1) &&
|
||||
fit_in_double(s.c2(), s2) && fit_in_double(s.c3(), s3) &&
|
||||
fit_in_double(s.c4(), s4) && fit_in_double(s.c5(), s5) &&
|
||||
|
||||
fit_in_double(t.c0(), t0) && fit_in_double(t.c1(), t1) &&
|
||||
fit_in_double(t.c2(), t2) && fit_in_double(t.c3(), t3) &&
|
||||
fit_in_double(t.c4(), t4) && fit_in_double(t.c5(), t5) &&
|
||||
|
||||
fit_in_double(u.c0(), u0) && fit_in_double(u.c1(), u1) &&
|
||||
fit_in_double(u.c2(), u2) && fit_in_double(u.c3(), u3) &&
|
||||
fit_in_double(u.c4(), u4) && fit_in_double(u.c5(), u5) &&
|
||||
|
||||
fit_in_double(v.c0(), v0) && fit_in_double(v.c1(), v1) &&
|
||||
fit_in_double(v.c2(), v2) && fit_in_double(v.c3(), v3) &&
|
||||
fit_in_double(v.c4(), v4) && fit_in_double(v.c5(), v5))
|
||||
{
|
||||
CGAL_assertion_code(Orientation should_be = Base::operator()(p, q, r, s, t, u, v));
|
||||
double m01;
|
||||
m01 = (q0 - p0);
|
||||
double m02;
|
||||
m02 = (r0 - p0);
|
||||
double m03;
|
||||
m03 = (s0 - p0);
|
||||
double m04;
|
||||
m04 = (t0 - p0);
|
||||
double m05;
|
||||
m05 = (u0 - p0);
|
||||
double m06;
|
||||
m06 = (v0 - p0);
|
||||
double m11;
|
||||
m11 = (q1 - p1);
|
||||
double m12;
|
||||
m12 = (r1 - p1);
|
||||
double m13;
|
||||
m13 = (s1 - p1);
|
||||
double m14;
|
||||
m14 = (t1 - p1);
|
||||
double m15;
|
||||
m15 = (u1 - p1);
|
||||
double m16;
|
||||
m16 = (v1 - p1);
|
||||
double m21;
|
||||
m21 = (q2 - p2);
|
||||
double m22;
|
||||
m22 = (r2 - p2);
|
||||
double m23;
|
||||
m23 = (s2 - p2);
|
||||
double m24;
|
||||
m24 = (t2 - p2);
|
||||
double m25;
|
||||
m25 = (u2 - p2);
|
||||
double m26;
|
||||
m26 = (v2 - p2);
|
||||
double m31;
|
||||
m31 = (q3 - p3);
|
||||
double m32;
|
||||
m32 = (r3 - p3);
|
||||
double m33;
|
||||
m33 = (s3 - p3);
|
||||
double m34;
|
||||
m34 = (t3 - p3);
|
||||
double m35;
|
||||
m35 = (u3 - p3);
|
||||
double m36;
|
||||
m36 = (v3 - p3);
|
||||
double m41;
|
||||
m41 = (q4 - p4);
|
||||
double m42;
|
||||
m42 = (r4 - p4);
|
||||
double m43;
|
||||
m43 = (s4 - p4);
|
||||
double m44;
|
||||
m44 = (t4 - p4);
|
||||
double m45;
|
||||
m45 = (u4 - p4);
|
||||
double m46;
|
||||
m46 = (v4 - p4);
|
||||
double m51;
|
||||
m51 = (q5 - p5);
|
||||
double m52;
|
||||
m52 = (r5 - p5);
|
||||
double m53;
|
||||
m53 = (s5 - p5);
|
||||
double m54;
|
||||
m54 = (t5 - p5);
|
||||
double m55;
|
||||
m55 = (u5 - p5);
|
||||
double m56;
|
||||
m56 = (v5 - p5);
|
||||
double det;
|
||||
det = ::CGAL::determinant( m01, m02, m03, m04, m05, m06, m11, m12, m13, m14, m15, m16, m21, m22, m23, m24, m25, m26, m31, m32, m33, m34, m35, m36, m41, m42, m43, m44, m45, m46, m51, m52, m53, m54, m55, m56 );
|
||||
double eps;
|
||||
double max1 = CGAL::abs(m01);
|
||||
double am = CGAL::abs(m02);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m11);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m12);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m31);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m32);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m41);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
am = CGAL::abs(m42);
|
||||
if( (max1 < am) ) { max1 = am; }
|
||||
|
||||
|
||||
double max2 = CGAL::abs(m03);
|
||||
am = CGAL::abs(m11);
|
||||
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m12);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m13);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m21);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m23);
|
||||
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m31);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m32);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m33);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m41);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m42);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m43);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m51);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
am = CGAL::abs(m52);
|
||||
if( (max2 < am) ) { max2 = am; }
|
||||
|
||||
|
||||
double max3 = CGAL::abs(m04);
|
||||
am = CGAL::abs(m14);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m24);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m34);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m44);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m54);
|
||||
if( (max3 < am) ) { max3 = am; }
|
||||
|
||||
double max4 = CGAL::abs(m05);
|
||||
am = CGAL::abs(m15);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m25);
|
||||
if( (max4 < am) ) { max3 = am; }
|
||||
am = CGAL::abs(m35);
|
||||
if( (max4 < am) ) { max4= am; }
|
||||
am = CGAL::abs(m45);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
am = CGAL::abs(m55);
|
||||
if( (max4 < am) ) { max4 = am; }
|
||||
|
||||
double max5 = CGAL::abs(m06);
|
||||
am = CGAL::abs(m16);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m26);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m36);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m46);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
am = CGAL::abs(m56);
|
||||
if( (max5 < am) ) { max5 = am; }
|
||||
|
||||
|
||||
double max6 = CGAL::abs(m13);
|
||||
am = CGAL::abs(m21);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m22);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m23);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m31);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m32);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m33);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m41);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m42);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m43);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m51);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m52);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
am = CGAL::abs(m53);
|
||||
am = CGAL::abs(m53);
|
||||
if( (max6 < am) ) { max6 = am; }
|
||||
|
||||
|
||||
double lower_bound_1;
|
||||
double upper_bound_1;
|
||||
lower_bound_1 = max6;
|
||||
upper_bound_1 = max6;
|
||||
if( (max5 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max5 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max5;
|
||||
}
|
||||
}
|
||||
if( (max1 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max1 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max1;
|
||||
}
|
||||
}
|
||||
if( (max2 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max2 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max2;
|
||||
}
|
||||
}
|
||||
if( (max3 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max3;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max3 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max3;
|
||||
}
|
||||
}
|
||||
if( (max4 < lower_bound_1) )
|
||||
{
|
||||
lower_bound_1 = max4;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (max4 > upper_bound_1) )
|
||||
{
|
||||
upper_bound_1 = max4;
|
||||
}
|
||||
}
|
||||
if( (lower_bound_1 < 4.82472686053427214432e-50) )
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t, u, v);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (upper_bound_1 > 1.87072209578355511223e+50) )
|
||||
{
|
||||
return Base::operator()(p, q, r, s, t, u, v);
|
||||
}
|
||||
eps = (1.76403842114300859158e-12 * (((((max1 * max2) * max6) * max3) * max4) * max5));
|
||||
if( (det > eps) )
|
||||
{
|
||||
CGAL_assertion(should_be == POSITIVE);
|
||||
return POSITIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (det < -eps) )
|
||||
{
|
||||
CGAL_assertion(should_be == NEGATIVE);
|
||||
return NEGATIVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Base::operator()(p, q, r, s, t, u, v);
|
||||
}
|
||||
};
|
||||
|
||||
} } } // namespace CGAL::internal::Static_filters_predicates
|
||||
|
||||
#endif // CGAL_INTERNAL_STATIC_FILTERS_ORIENTATION_6_H
|
||||
|
|
@ -229,14 +229,14 @@ print_dag(const Return_base_tag&, std::ostream& os, int level)
|
|||
|
||||
struct Depth_base {
|
||||
#ifdef CGAL_PROFILE
|
||||
mutable int depth_;
|
||||
int depth_;
|
||||
|
||||
Depth_base()
|
||||
: depth_(0)
|
||||
{}
|
||||
|
||||
int depth() const { return depth_; }
|
||||
void set_depth(int i) const
|
||||
void set_depth(int i)
|
||||
{
|
||||
depth_ = i;
|
||||
CGAL_HISTOGRAM_PROFILER(std::string("[Lazy_kernel DAG depths]"), i);
|
||||
|
|
@ -244,7 +244,7 @@ struct Depth_base {
|
|||
}
|
||||
#else
|
||||
int depth() const { return 0; }
|
||||
void set_depth(int) const {}
|
||||
void set_depth(int) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -656,7 +656,6 @@ class Lazy_rep_n final :
|
|||
auto* p = new typename Base::Indirect(ec()( CGAL::exact( std::get<I>(l) ) ... ) );
|
||||
this->set_at(p);
|
||||
this->set_ptr(p);
|
||||
this->set_depth(0);
|
||||
if(!noprune || is_currently_single_threaded())
|
||||
lazy_reset_member(l);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ project( Frechet_distance_Examples )
|
|||
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core )
|
||||
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program( "Frechet_distance_2.cpp" )
|
||||
|
|
|
|||
|
|
@ -514,6 +514,7 @@ inline void FrechetLight<C>::continueQSimpleSearch(QSimpleInterval& qsimple,
|
|||
// TODO: uncritical for correctness or speed but unelegant coding style: stripping down information added by getInterval
|
||||
CInterval temp_interval = FrechetLight::getInterval<IndexType>(
|
||||
fixed_curve, fixed, curve, cur);
|
||||
|
||||
Interval interval = Interval(temp_interval.begin.getPoint() == cur
|
||||
? temp_interval.begin.getFraction()
|
||||
: 1,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,10 @@ struct Lambda<Curve<FilteredTraits,true>>
|
|||
// fill_lambda returns a pair and we are only interested in a bound
|
||||
bool update_exact() const
|
||||
{
|
||||
if (is_exact) {
|
||||
if (is_exact){
|
||||
if (!exact.has_value()){
|
||||
exact = (is_one) ? std::make_optional(Exact(1)) : std::make_optional(Exact(0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +201,9 @@ struct Lambda<Curve<FilteredTraits,true>>
|
|||
{
|
||||
if ((is_zero && other.is_zero) || (is_one && other.is_one))
|
||||
return false;
|
||||
if ((is_zero && (!other.is_zero)) || (!is_one && other.is_one))
|
||||
// AF this may be wrong if approx is [0.9,1.1] and other.is_one:
|
||||
// if ((is_zero && (!other.is_zero)) || (!is_one && other.is_one))
|
||||
if(is_zero && other.is_one)
|
||||
return true;
|
||||
CGAL::Uncertain<bool> res = approx < other.approx;
|
||||
if (CGAL::is_certain(res)) {
|
||||
|
|
@ -206,7 +211,8 @@ struct Lambda<Curve<FilteredTraits,true>>
|
|||
}
|
||||
update_exact();
|
||||
other.update_exact();
|
||||
return exact < other.exact;
|
||||
bool eres = exact.value() < other.exact.value();
|
||||
return eres;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,12 @@ project( Frechet_distance_Tests )
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program( "Frechet-IssueOct25.cpp" )
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program( "Frechet_distance_test.cpp" )
|
||||
target_link_libraries(Frechet_distance_test PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Frechet_distance.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel;
|
||||
using Point = Kernel::Point_2;
|
||||
using Segment = Kernel::Segment_2;
|
||||
|
||||
bool load_polyline(const std::string &filename, std::vector<Point> &polyline) {
|
||||
polyline.clear();
|
||||
std::ifstream ifs(filename);
|
||||
|
||||
if (!ifs)
|
||||
return false;
|
||||
|
||||
while (ifs.good()) {
|
||||
Point p;
|
||||
ifs >> p;
|
||||
if (ifs.good())
|
||||
polyline.push_back(p);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
std::vector<Point> poly1, poly2;
|
||||
|
||||
if (!load_polyline("poly1.txt", poly1) || !load_polyline("poly2.txt", poly2)) {
|
||||
std::cout << "input files could not be loaded" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
std::pair<double, double> res = CGAL::bounded_error_Frechet_distance(poly1, poly2, 0.000001);
|
||||
std::cout << "Frechet distance: [" << res.first << ", " << res.second << "]" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -6,8 +6,7 @@ project( classical_Frechet_distance )
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
create_single_source_cgal_program("Compute_classical_Frechet_distance_3.cpp")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,185 @@
|
|||
-126 70
|
||||
-138 58
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-39 -18
|
||||
-42.6 -14
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
|
|
@ -0,0 +1,625 @@
|
|||
-126 70
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
70 -138
|
||||
61.4 -118.4
|
||||
61.4 -118
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
-126 70
|
||||
|
|
@ -28,8 +28,9 @@ create_single_source_cgal_program("random_segments1.cpp")
|
|||
create_single_source_cgal_program("random_segments2.cpp")
|
||||
create_single_source_cgal_program("sphere_d.cpp")
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program("random_points_in_tetrahedral_mesh_3.cpp")
|
||||
target_link_libraries(random_points_in_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@ create_single_source_cgal_program("test_tetrahedron_3.cpp")
|
|||
create_single_source_cgal_program("test_triangle_2.cpp")
|
||||
create_single_source_cgal_program("test_triangle_3.cpp")
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program("generic_random_test.cpp")
|
||||
target_link_libraries(generic_random_test PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6)
|
|||
|
||||
find_package(Qt6 QUIET COMPONENTS Widgets)
|
||||
|
||||
find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ project(Polygon_Demo)
|
|||
|
||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt6 Core)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message("NOTICE: This demo requires the Eigen library, and will not be compiled.")
|
||||
return()
|
||||
|
|
|
|||
|
|
@ -221,7 +221,10 @@ void
|
|||
DemosMainWindow::popupAboutBox(QString title, QString html_resource_name)
|
||||
{
|
||||
QFile about_CGAL(html_resource_name);
|
||||
about_CGAL.open(QIODevice::ReadOnly);
|
||||
if (!about_CGAL.open(QIODevice::ReadOnly)) {
|
||||
QMessageBox::warning(this, tr("Error"), tr("Could not open resource file: %1").arg(html_resource_name));
|
||||
return;
|
||||
}
|
||||
QString about_CGAL_txt = QTextStream(&about_CGAL).readAll();
|
||||
#ifdef CGAL_VERSION_STR
|
||||
QString cgal_version(CGAL_VERSION_STR);
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ project(Heat_method_3_Examples)
|
|||
# CGAL and its components
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.3.0 QUIET)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.")
|
||||
return()
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ project(Heat_method_3_Tests)
|
|||
# CGAL and its components
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.3.0 QUIET)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.")
|
||||
return()
|
||||
|
|
|
|||
|
|
@ -1,17 +1,5 @@
|
|||
# Release History
|
||||
|
||||
## [Release 6.2](https://github.com/CGAL/cgal/releases/tag/v6.2)
|
||||
|
||||
Release date: July 2026
|
||||
|
||||
### [Linear Cell Complex](https://doc.cgal.org/6.2/Manual/packages.html#PkgLinearCellComplex)
|
||||
|
||||
- **API Changes**: The following import functions have been deprecated and renamed for better naming clarity and consistency:
|
||||
- `import_from_plane_graph()` → `read_plane_graph_in_lcc()`
|
||||
- `import_from_polyhedron_3()` → `polyhedron_3_to_lcc()`
|
||||
- `import_from_triangulation_3()` → `triangulation_3_to_lcc()`
|
||||
- The old function names are still available but marked as deprecated for backward compatibility.
|
||||
|
||||
## [Release 6.1](https://github.com/CGAL/cgal/releases/tag/v6.1)
|
||||
|
||||
Release date: Sept 2025
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ if(CERES_FOUND AND NOT TARGET CGAL::Ceres_support)
|
|||
set_target_properties(CGAL::Ceres_support PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "CGAL_PMP_USE_CERES_SOLVER"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CERES_INCLUDE_DIRS}"
|
||||
INTERFACE_LINK_LIBRARIES "ceres")
|
||||
INTERFACE_LINK_LIBRARIES "Ceres::ceres")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
if((EIGEN3_FOUND OR Eigen3_FOUND) AND NOT TARGET CGAL::Eigen3_support)
|
||||
if ("${Eigen3_VERSION}" VERSION_LESS "3.3.7")
|
||||
set (EIGEN3_FOUND 0)
|
||||
find_package(Eigen3 3.3.7 QUIET) # (3.3.7 or greater)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if((EIGEN3_FOUND OR Eigen3_FOUND) AND NOT TARGET CGAL::Eigen3_support)
|
||||
if(NOT TARGET Threads::Threads)
|
||||
find_package(Threads REQUIRED)
|
||||
|
|
|
|||
|
|
@ -462,10 +462,6 @@ namespace CGAL {
|
|||
} // end of the temporary compatibility with CGAL-4.14
|
||||
#endif // CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
#if __has_include(<version>)
|
||||
# include <version>
|
||||
#endif
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
// Typedef for the type of nullptr.
|
||||
|
|
|
|||
|
|
@ -14,15 +14,15 @@
|
|||
|
||||
namespace CGAL { namespace internal {
|
||||
|
||||
template < typename T > inline
|
||||
void use(const T&) {}
|
||||
template <typename ...T> inline
|
||||
void use(T&&...) {}
|
||||
|
||||
template<typename> void use_type() {}
|
||||
|
||||
} }
|
||||
|
||||
/// CGAL_USE() is a macro which aims at removing "variable is unused" warnings.
|
||||
#define CGAL_USE(x) ::CGAL::internal::use(x)
|
||||
#define CGAL_USE(...) ::CGAL::internal::use(__VA_ARGS__)
|
||||
|
||||
/// CGAL_USE_TYPE() is a macro which aims at removing "typedef locally
|
||||
/// defined but not used" warnings.
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
#define CGAL_VERSION_H
|
||||
|
||||
#ifndef SWIG
|
||||
#define CGAL_VERSION 6.2-dev
|
||||
#define CGAL_VERSION 6.1.1
|
||||
#define CGAL_GIT_HASH abcdef
|
||||
#endif
|
||||
#define CGAL_VERSION_NR 1060200900
|
||||
#define CGAL_VERSION_NR 1060111000
|
||||
#define CGAL_SVN_REVISION 99999
|
||||
#define CGAL_RELEASE_DATE 20260401
|
||||
#define CGAL_RELEASE_DATE 20250901
|
||||
|
||||
#include <CGAL/version_macros.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
set(CGAL_MAJOR_VERSION 6)
|
||||
set(CGAL_MINOR_VERSION 2)
|
||||
set(CGAL_BUGFIX_VERSION 0)
|
||||
set(CGAL_MINOR_VERSION 1)
|
||||
set(CGAL_BUGFIX_VERSION 1)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake)
|
||||
set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "6.2-dev")
|
||||
set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "6.1.1")
|
||||
set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}")
|
||||
|
||||
if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0)
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class Interval_for_container : public Interval_
|
|||
|
||||
|
||||
// remove markers for Interval I starting at left, the left endpoint
|
||||
// of I, and and stopping at the right endpoint of I.
|
||||
// of I, and stopping at the right endpoint of I.
|
||||
Interval_handle removeMarkers(IntervalSLnode<Interval>* left,
|
||||
const Interval& I);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ project( Isosurfacing_3_benchmark )
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
find_package(TBB)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ project( Isosurfacing_3_Examples )
|
|||
|
||||
find_package(CGAL REQUIRED COMPONENTS ImageIO)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
find_package(TBB QUIET)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ project(Isosurfacing_3_Tests)
|
|||
|
||||
find_package(CGAL REQUIRED)
|
||||
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
find_package(TBB QUIET)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ project(Jet_fitting_3_Examples)
|
|||
find_package(CGAL REQUIRED)
|
||||
|
||||
# use Eigen
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
|
||||
# Link with Boost.ProgramOptions (optional)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ project(Jet_fitting_3_Tests)
|
|||
find_package(CGAL REQUIRED)
|
||||
|
||||
# use Eigen
|
||||
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
create_single_source_cgal_program("blind_1pt.cpp")
|
||||
target_link_libraries(blind_1pt PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019
|
||||
// Copyright (c) 2019,2025
|
||||
// GeometryFactory (France)
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org)
|
||||
|
|
@ -9,6 +9,8 @@
|
|||
//
|
||||
//
|
||||
// Author(s) : Simon Giraudot
|
||||
//
|
||||
// Test file: test/Kernel_23/test_hash_functions.cpp
|
||||
|
||||
#ifndef CGAL_KERNEL_HASH_FUNCTIONS_H
|
||||
#define CGAL_KERNEL_HASH_FUNCTIONS_H
|
||||
|
|
@ -16,18 +18,73 @@
|
|||
#include <boost/functional/hash.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
#include <CGAL/representation_tags.h>
|
||||
#include <CGAL/Aff_transformation_2.h>
|
||||
#include <CGAL/Aff_transformation_3.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
#include <CGAL/Circle_2.h>
|
||||
#include <CGAL/Iso_rectangle_2.h>
|
||||
#include <CGAL/Iso_cuboid_3.h>
|
||||
#include <CGAL/Point_2.h>
|
||||
#include <CGAL/Point_3.h>
|
||||
#include <CGAL/Segment_2.h>
|
||||
#include <CGAL/Segment_3.h>
|
||||
#include <CGAL/Sphere_3.h>
|
||||
#include <CGAL/Vector_2.h>
|
||||
#include <CGAL/Vector_3.h>
|
||||
#include <CGAL/Weighted_point_2.h>
|
||||
#include <CGAL/Weighted_point_3.h>
|
||||
|
||||
|
||||
namespace CGAL
|
||||
{
|
||||
|
||||
using boost::hash_value;
|
||||
|
||||
template <typename K, typename = void>
|
||||
inline constexpr bool has_rep_tag_v = false;
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline constexpr bool has_rep_tag_v<K, std::void_t<typename K::Rep_tag>> = true;
|
||||
|
||||
template <typename K, typename = void>
|
||||
struct Rep_tag {
|
||||
using type = void;
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
struct Rep_tag<K, std::enable_if_t<has_rep_tag_v<K>>> {
|
||||
using type = typename K::Rep_tag;
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
using Rep_tag_t = typename Rep_tag<K>::type;
|
||||
|
||||
template <typename K>
|
||||
inline constexpr bool is_Cartesian_v = std::is_same<Rep_tag_t<K>, Cartesian_tag>::value;
|
||||
|
||||
template <typename K, typename = void>
|
||||
struct Is_kernel_hashable : public std::false_type {};
|
||||
|
||||
template <typename K>
|
||||
struct Is_kernel_hashable<K, std::void_t<decltype(hash_value(std::declval<typename K::FT>()))>> : public std::true_type {};
|
||||
|
||||
template <typename K>
|
||||
inline constexpr bool is_kernel_hashable_v = Is_kernel_hashable<K>::value;
|
||||
|
||||
template <typename K, typename T>
|
||||
using enable_if_Cartesian_and_hashable_t =
|
||||
std::enable_if_t<is_Cartesian_v<K> && is_kernel_hashable_v<K>, T>;
|
||||
|
||||
template <typename K>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Aff_transformation_2<K>& transform)
|
||||
{
|
||||
std::size_t result = hash_value(transform.cartesian(0,0));
|
||||
for(int i=0; i < 3; ++i)
|
||||
for(int j = 0; j < 3; ++j)
|
||||
for(int j=0; j < 3; ++j)
|
||||
// Skip (0,0) as it was already used to initialize the hash
|
||||
if (!(i == 0 && j == 0))
|
||||
boost::hash_combine(result, hash_value(transform.cartesian(i,j)));
|
||||
return result;
|
||||
|
|
@ -44,7 +101,7 @@ hash_value (const Bbox_2& bbox)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Circle_2<K>& circle)
|
||||
{
|
||||
std::size_t result = hash_value(circle.center());
|
||||
|
|
@ -54,7 +111,7 @@ hash_value (const Circle_2<K>& circle)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Iso_rectangle_2<K>& iso_rectangle)
|
||||
{
|
||||
std::size_t result = hash_value((iso_rectangle.min)());
|
||||
|
|
@ -63,7 +120,7 @@ hash_value (const Iso_rectangle_2<K>& iso_rectangle)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Point_2<K>& point)
|
||||
{
|
||||
std::size_t result = hash_value(point.x());
|
||||
|
|
@ -72,7 +129,7 @@ hash_value (const Point_2<K>& point)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Segment_2<K>& segment)
|
||||
{
|
||||
std::size_t result = hash_value(segment.source());
|
||||
|
|
@ -81,7 +138,7 @@ hash_value (const Segment_2<K>& segment)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Vector_2<K>& vector)
|
||||
{
|
||||
std::size_t result = hash_value(vector.x());
|
||||
|
|
@ -90,7 +147,7 @@ hash_value (const Vector_2<K>& vector)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Weighted_point_2<K>& weighed_point)
|
||||
{
|
||||
std::size_t result = hash_value(weighed_point.point());
|
||||
|
|
@ -99,14 +156,13 @@ hash_value (const Weighted_point_2<K>& weighed_point)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Aff_transformation_3<K>& transform)
|
||||
{
|
||||
std::size_t result = hash_value(transform.cartesian(0,0));
|
||||
for(int i = 0; i < 3; ++i)
|
||||
for(int j = 0; j < 4; ++j)
|
||||
if (!(i == 0 && j == 0))
|
||||
boost::hash_combine(result, hash_value(transform.cartesian(i,j)));
|
||||
for(int j = (i == 0 ? 1 : 0); j < 4; ++j)
|
||||
boost::hash_combine(result, hash_value(transform.cartesian(i,j)));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +179,7 @@ hash_value (const Bbox_3& bbox)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Iso_cuboid_3<K>& iso_cuboid)
|
||||
{
|
||||
std::size_t result = hash_value((iso_cuboid.min)());
|
||||
|
|
@ -132,7 +188,7 @@ hash_value (const Iso_cuboid_3<K>& iso_cuboid)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Point_3<K>& point)
|
||||
{
|
||||
std::size_t result = hash_value(point.x());
|
||||
|
|
@ -142,7 +198,7 @@ hash_value (const Point_3<K>& point)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Segment_3<K>& segment)
|
||||
{
|
||||
std::size_t result = hash_value(segment.source());
|
||||
|
|
@ -151,7 +207,7 @@ hash_value (const Segment_3<K>& segment)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Sphere_3<K>& sphere)
|
||||
{
|
||||
std::size_t result = hash_value(sphere.center());
|
||||
|
|
@ -161,7 +217,7 @@ hash_value (const Sphere_3<K>& sphere)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Vector_3<K>& vector)
|
||||
{
|
||||
std::size_t result = hash_value(vector.x());
|
||||
|
|
@ -171,7 +227,7 @@ hash_value (const Vector_3<K>& vector)
|
|||
}
|
||||
|
||||
template <typename K>
|
||||
inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
|
||||
inline enable_if_Cartesian_and_hashable_t<K, std::size_t>
|
||||
hash_value (const Weighted_point_3<K>& weighed_point)
|
||||
{
|
||||
std::size_t result = hash_value(weighed_point.point());
|
||||
|
|
@ -179,93 +235,46 @@ hash_value (const Weighted_point_3<K>& weighed_point)
|
|||
return result;
|
||||
}
|
||||
|
||||
struct Forward_to_hash_value {
|
||||
template <typename T>
|
||||
std::size_t operator()(T&& t) const {
|
||||
using boost::hash_value;
|
||||
return hash_value(std::forward<T>(t));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K, typename = void>
|
||||
struct Maybe_forward_to_hash_value {
|
||||
Maybe_forward_to_hash_value() = delete;
|
||||
Maybe_forward_to_hash_value(const Maybe_forward_to_hash_value&) = delete;
|
||||
};
|
||||
|
||||
template <typename K>
|
||||
struct Maybe_forward_to_hash_value<K, std::enable_if_t<is_kernel_hashable_v<K>>>
|
||||
: public Forward_to_hash_value {};
|
||||
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
// overloads of std::hash used for using std::unordered_[set/map] on CGAL Kernel objects
|
||||
namespace std
|
||||
{
|
||||
namespace std {
|
||||
template <typename K> struct hash<CGAL::Aff_transformation_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Circle_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Iso_rectangle_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Point_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Segment_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Vector_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Weighted_point_2<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <> struct hash<CGAL::Bbox_2> : CGAL::Forward_to_hash_value {};
|
||||
template <typename K> struct hash<CGAL::Aff_transformation_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Iso_cuboid_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Point_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Segment_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Sphere_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Vector_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <typename K> struct hash<CGAL::Weighted_point_3<K>> : CGAL::Maybe_forward_to_hash_value<K> {};
|
||||
template <> struct hash<CGAL::Bbox_3> : CGAL::Forward_to_hash_value {};
|
||||
} // namespace std
|
||||
|
||||
template <typename K> struct hash<CGAL::Aff_transformation_2<K> > {
|
||||
std::size_t operator() (const CGAL::Aff_transformation_2<K>& transform) const {
|
||||
return CGAL::hash_value<K> (transform);
|
||||
}
|
||||
};
|
||||
template <> struct hash<CGAL::Bbox_2> {
|
||||
std::size_t operator() (const CGAL::Bbox_2& bbox) const {
|
||||
return CGAL::hash_value (bbox);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Circle_2<K> > {
|
||||
std::size_t operator() (const CGAL::Circle_2<K>& circle) const {
|
||||
return CGAL::hash_value<K> (circle);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Iso_rectangle_2<K> > {
|
||||
std::size_t operator() (const CGAL::Iso_rectangle_2<K>& iso_rectangle) const {
|
||||
return CGAL::hash_value<K> (iso_rectangle);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Point_2<K> > {
|
||||
std::size_t operator() (const CGAL::Point_2<K>& point) const {
|
||||
return CGAL::hash_value<K> (point);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Segment_2<K> > {
|
||||
std::size_t operator() (const CGAL::Segment_2<K>& segment) const {
|
||||
return CGAL::hash_value<K> (segment);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Vector_2<K> > {
|
||||
std::size_t operator() (const CGAL::Vector_2<K>& vector) const {
|
||||
return CGAL::hash_value<K> (vector);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Weighted_point_2<K> > {
|
||||
std::size_t operator() (const CGAL::Weighted_point_2<K>& weighted_point) const {
|
||||
return CGAL::hash_value<K> (weighted_point);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Aff_transformation_3<K> > {
|
||||
std::size_t operator() (const CGAL::Aff_transformation_3<K>& transform) const {
|
||||
return CGAL::hash_value<K> (transform);
|
||||
}
|
||||
};
|
||||
template <> struct hash<CGAL::Bbox_3> {
|
||||
std::size_t operator() (const CGAL::Bbox_3& bbox) const {
|
||||
return CGAL::hash_value (bbox);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Iso_cuboid_3<K> > {
|
||||
std::size_t operator() (const CGAL::Iso_cuboid_3<K>& iso_cuboid) const {
|
||||
return CGAL::hash_value<K> (iso_cuboid);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Point_3<K> > {
|
||||
std::size_t operator() (const CGAL::Point_3<K>& point) const {
|
||||
return CGAL::hash_value<K> (point);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Segment_3<K> > {
|
||||
std::size_t operator() (const CGAL::Segment_3<K>& segment) const {
|
||||
return CGAL::hash_value<K> (segment);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Sphere_3<K> > {
|
||||
std::size_t operator() (const CGAL::Sphere_3<K>& sphere) const {
|
||||
return CGAL::hash_value<K> (sphere);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Vector_3<K> > {
|
||||
std::size_t operator() (const CGAL::Vector_3<K>& vector) const {
|
||||
return CGAL::hash_value<K> (vector);
|
||||
}
|
||||
};
|
||||
template <typename K> struct hash<CGAL::Weighted_point_3<K> > {
|
||||
std::size_t operator() (const CGAL::Weighted_point_3<K>& weighted_point) const {
|
||||
return CGAL::hash_value<K> (weighted_point);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // CGAL_KERNEL_HASH_FUNCTIONS_H
|
||||
|
|
|
|||
|
|
@ -1,13 +1,18 @@
|
|||
// test partially generated by Github Copilot
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include <CGAL/Simple_cartesian.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
|
||||
#include <CGAL/Bbox_2.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
|
||||
typedef CGAL::Simple_cartesian<double> SC;
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epick;
|
||||
|
||||
static_assert(CGAL::is_kernel_hashable_v<SC>);
|
||||
static_assert(CGAL::is_kernel_hashable_v<Epick>);
|
||||
|
||||
template <typename Object>
|
||||
void test (const Object& obj)
|
||||
{
|
||||
|
|
@ -67,5 +72,3 @@ int main()
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -89,44 +89,6 @@ double operator[](int i)const;
|
|||
Cartesian_const_iterator_d cartesian_begin()const;
|
||||
/*! returns an iterator pointing beyond the last %Cartesian coordinate. */
|
||||
Cartesian_const_iterator_d cartesian_end()const;
|
||||
|
||||
/*! returns whether the points coincide. */
|
||||
friend bool operator==(Point_d,Point_d);
|
||||
/*! returns whether the points are distinct. */
|
||||
friend bool operator!=(Point_d,Point_d);
|
||||
};
|
||||
|
||||
/*!
|
||||
represents a vector in the Euclidean space
|
||||
\cgalModels{DefaultConstructible,Assignable}
|
||||
*/
|
||||
class Vector_d {
|
||||
public:
|
||||
/*! introduces a vector with coordinates (x0, x1, ...) where the number of
|
||||
coordinates matches the dimension.
|
||||
\pre `DimensionTag` is a fixed dimension, not `Dynamic_dimension_tag`. */
|
||||
Vector_d(double x0, double x1, ...);
|
||||
|
||||
/*! introduces a vector with coordinate set `[first,end)`.
|
||||
\pre If `DimensionTag` is a fixed dimension, it matches `distance(first,end)`.
|
||||
\tparam ForwardIterator has its value type that is convertible to `double`.
|
||||
*/
|
||||
template<typename ForwardIterator>
|
||||
Vector_d(ForwardIterator first, ForwardIterator end);
|
||||
|
||||
/*! returns the i-th coordinate of a vector.
|
||||
\pre `i` is non-negative and less than the dimension. */
|
||||
double operator[](int i)const;
|
||||
|
||||
/*! returns an iterator pointing to the zeroth %Cartesian coordinate. */
|
||||
Cartesian_const_iterator_d cartesian_begin()const;
|
||||
/*! returns an iterator pointing beyond the last %Cartesian coordinate. */
|
||||
Cartesian_const_iterator_d cartesian_end()const;
|
||||
|
||||
/*! returns whether the vectors coincide. */
|
||||
friend bool operator==(Vector_d,Vector_d);
|
||||
/*! returns whether the vectors are distinct. */
|
||||
friend bool operator!=(Vector_d,Vector_d);
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -77,48 +77,6 @@ double operator[](int i)const;
|
|||
Cartesian_const_iterator_d cartesian_begin()const;
|
||||
/*! returns an iterator pointing beyond the last Cartesian coordinate. */
|
||||
Cartesian_const_iterator_d cartesian_end()const;
|
||||
|
||||
/*! returns whether the points coincide. This may not be safe
|
||||
if the points are the result of inexact constructions. */
|
||||
friend bool operator==(Point_d,Point_d);
|
||||
/*! returns whether the points are distinct. This may not be safe
|
||||
if the points are the result of inexact constructions. */
|
||||
friend bool operator!=(Point_d,Point_d);
|
||||
};
|
||||
|
||||
/*!
|
||||
represents a vector in the Euclidean space
|
||||
\cgalModels{DefaultConstructible,Assignable}
|
||||
*/
|
||||
class Vector_d {
|
||||
public:
|
||||
/*! introduces a vector with coordinates (x0, x1, ...) where the number of
|
||||
coordinates matches the dimension.
|
||||
\pre `DimensionTag` is a fixed dimension, not `Dynamic_dimension_tag`. */
|
||||
Vector_d(double x0, double x1, ...);
|
||||
|
||||
/*! introduces a vector with coordinate set `[first,end)`.
|
||||
\pre If `DimensionTag` is a fixed dimension, it matches `distance(first,end)`.
|
||||
\tparam InputIterator has its value type that is convertible to `double`.
|
||||
*/
|
||||
template<typename InputIterator>
|
||||
Vector_d(InputIterator first, InputIterator end);
|
||||
|
||||
/*! returns the i-th coordinate of a vector.
|
||||
\pre `i` is non-negative and less than the dimension. */
|
||||
double operator[](int i)const;
|
||||
|
||||
/*! returns an iterator pointing to the zeroth Cartesian coordinate. */
|
||||
Cartesian_const_iterator_d cartesian_begin()const;
|
||||
/*! returns an iterator pointing beyond the last Cartesian coordinate. */
|
||||
Cartesian_const_iterator_d cartesian_end()const;
|
||||
|
||||
/*! returns whether the vectors coincide. This may not be safe
|
||||
if the vectors are the result of inexact constructions. */
|
||||
friend bool operator==(Vector_d,Vector_d);
|
||||
/*! returns whether the vectors are distinct. This may not be safe
|
||||
if the vectors are the result of inexact constructions. */
|
||||
friend bool operator!=(Vector_d,Vector_d);
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ project(Kinetic_space_partition_Examples)
|
|||
find_package(CGAL REQUIRED)
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
find_package(Eigen3 3.1.0 REQUIRED)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ project(Kinetic_space_partition_Tests)
|
|||
find_package(CGAL REQUIRED)
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
find_package(Eigen3 3.1.0 REQUIRED)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
set(targets kinetic_3d_test_all issue_8624)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ project(Kinetic_surface_reconstruction_Examples)
|
|||
find_package(CGAL REQUIRED)
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
find_package(Eigen3 3.1.0 REQUIRED)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ project(Kinetic_surface_reconstruction_Tests)
|
|||
find_package(CGAL REQUIRED)
|
||||
include(CGAL_CreateSingleSourceCGALProgram)
|
||||
|
||||
find_package(Eigen3 3.1.0 REQUIRED)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -51,12 +51,14 @@ if(Qt6_FOUND)
|
|||
add_compile_definitions(QT_NO_KEYWORDS)
|
||||
endif(Qt6_FOUND)
|
||||
|
||||
find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
set_package_properties(
|
||||
Eigen3 PROPERTIES
|
||||
DESCRIPTION "A library for linear algebra."
|
||||
PURPOSE "Required for most plugins (Meshing, Mesh and Point Set Processing, etc.).")
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(NOT TARGET CGAL::Eigen3_support)
|
||||
message(STATUS "NOTICE: Eigen was not found.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ target_link_libraries(off_to_nef_plugin PRIVATE scene_nef_polyhedron_item)
|
|||
cgal_lab_plugin(polylines_io_plugin Polylines_io_plugin KEYWORDS Viewer Mesh_3)
|
||||
target_link_libraries(polylines_io_plugin PRIVATE scene_polylines_item)
|
||||
|
||||
cgal_lab_plugin(spheres_io_plugin Spheres_io_plugin KEYWORDS Viewer Mesh_3)
|
||||
target_link_libraries(spheres_io_plugin PRIVATE scene_basic_objects)
|
||||
|
||||
cgal_lab_plugin(wkt_plugin WKT_io_plugin KEYWORDS Viewer PointSetProcessing Mesh_3)
|
||||
target_link_libraries(wkt_plugin PRIVATE scene_polylines_item)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,162 +0,0 @@
|
|||
#include "Scene_spheres_item.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <CGAL/Three/CGAL_Lab_io_plugin_interface.h>
|
||||
#include <CGAL/Three/CGAL_Lab_plugin_interface.h>
|
||||
#include <CGAL/Three/CGAL_Lab_plugin_helper.h>
|
||||
|
||||
#include <CGAL/Three/Three.h>
|
||||
#include <fstream>
|
||||
#include <QVariant>
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
|
||||
using namespace CGAL::Three;
|
||||
|
||||
class CGAL_Lab_spheres_io_plugin :
|
||||
public QObject,
|
||||
public CGAL_Lab_io_plugin_interface,
|
||||
public CGAL_Lab_plugin_helper
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface CGAL::Three::CGAL_Lab_io_plugin_interface)
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0" FILE "spheres_io_plugin.json")
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.IOPluginInterface/1.90")
|
||||
|
||||
public:
|
||||
// To silent a warning -Woverloaded-virtual
|
||||
// See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
|
||||
|
||||
using CGAL_Lab_io_plugin_interface::init;
|
||||
//! Configures the widget
|
||||
void init(QMainWindow* mainWindow,
|
||||
CGAL::Three::Scene_interface* scene_interface,
|
||||
Messages_interface*) override{
|
||||
//get the references
|
||||
this->scene = scene_interface;
|
||||
this->mw = mainWindow;
|
||||
|
||||
}
|
||||
QString name() const override{ return "spheres_io_plugin"; }
|
||||
QString nameFilters() const override{ return "Spheres files (*.spheres.txt)"; }
|
||||
bool canLoad(QFileInfo fileinfo) const override;
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) override;
|
||||
|
||||
bool canSave(const CGAL::Three::Scene_item*) override;
|
||||
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&) override;
|
||||
bool applicable(QAction* ) const override {
|
||||
return false;
|
||||
}
|
||||
QList<QAction*> actions() const override{
|
||||
|
||||
return QList<QAction*>();
|
||||
}
|
||||
|
||||
bool isDefaultLoader(const Scene_item* item) const override{
|
||||
if(qobject_cast<const Scene_spheres_item*>(item))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
bool CGAL_Lab_spheres_io_plugin::canLoad(QFileInfo fileinfo) const{
|
||||
if(!fileinfo.suffix().contains("cgal"))
|
||||
return true;
|
||||
std::ifstream in(fileinfo.filePath().toUtf8());
|
||||
if(!in) {
|
||||
return false;
|
||||
}
|
||||
int first;
|
||||
if(!(in >> first)
|
||||
|| first <= 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
QList<Scene_item*>
|
||||
CGAL_Lab_spheres_io_plugin::
|
||||
load(QFileInfo fileinfo, bool& ok, bool add_to_scene){
|
||||
|
||||
// Open file
|
||||
std::ifstream ifs(fileinfo.filePath().toUtf8());
|
||||
if(!ifs) {
|
||||
std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
|
||||
ok = false;
|
||||
return QList<Scene_item*>();
|
||||
}
|
||||
|
||||
if(fileinfo.size() == 0)
|
||||
{
|
||||
CGAL::Three::Three::warning( tr("The file you are trying to load is empty."));
|
||||
Scene_spheres_item* item = new Scene_spheres_item(nullptr, 0, false, false);
|
||||
item->setName(fileinfo.completeBaseName());
|
||||
ok = true;
|
||||
if(add_to_scene)
|
||||
CGAL::Three::Three::scene()->addItem(item);
|
||||
return QList<Scene_item*>()<<item;
|
||||
}
|
||||
|
||||
double x, y, z, r;
|
||||
std::vector<std::array<double, 4> > spheres;
|
||||
while (ifs >> x && ifs >> y && ifs >> z && ifs >> r)
|
||||
spheres.push_back({x, y, z, r});
|
||||
|
||||
std::vector<QColor> colors;
|
||||
if (true) {
|
||||
colors.resize(spheres.size());
|
||||
for (QColor &c : colors)
|
||||
c = generate_random_color();
|
||||
}
|
||||
else {
|
||||
colors.reserve(spheres.size());
|
||||
compute_deterministic_color_map(QColor(180, 120, 130, 255), spheres.size(), std::back_inserter(colors));
|
||||
}
|
||||
|
||||
Scene_spheres_item* item = new Scene_spheres_item(nullptr, spheres.size(), false, true);
|
||||
item->setName(fileinfo.completeBaseName());
|
||||
|
||||
for (std::size_t i = 0;i<spheres.size();i++) {
|
||||
const std::array<double, 4>& s = spheres[i];
|
||||
item->add_sphere(CGAL::Epick::Sphere_3(CGAL::Epick::Point_3(s[0], s[1], s[2]), s[3] * s[3]), i, CGAL::IO::Color(colors[i].red(), colors[i].green(), colors[i].blue()));
|
||||
}
|
||||
|
||||
std::cerr << "Number of spheres loaded: " << spheres.size() << std::endl;
|
||||
|
||||
item->invalidateOpenGLBuffers();
|
||||
|
||||
item->setRenderingMode(Gouraud);
|
||||
CGAL::Three::Three::scene()->addItem(item);
|
||||
item->computeElements();
|
||||
|
||||
return QList<Scene_item*>()<<item;
|
||||
}
|
||||
|
||||
bool CGAL_Lab_spheres_io_plugin::canSave(const CGAL::Three::Scene_item* item)
|
||||
{
|
||||
return qobject_cast<const Scene_spheres_item*>(item) != 0;
|
||||
}
|
||||
|
||||
bool CGAL_Lab_spheres_io_plugin::
|
||||
save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items)
|
||||
{
|
||||
Scene_item* item = items.front();
|
||||
const Scene_spheres_item* sphere_item =
|
||||
qobject_cast<const Scene_spheres_item*>(item);
|
||||
|
||||
if(!sphere_item)
|
||||
return false;
|
||||
|
||||
std::ofstream out(fileinfo.filePath().toUtf8());
|
||||
|
||||
out.precision (std::numeric_limits<double>::digits10 + 2);
|
||||
|
||||
if(!out) {
|
||||
std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "Spheres_io_plugin.moc"
|
||||
|
|
@ -47,7 +47,7 @@ public:
|
|||
QString ext = fileinfo.suffix();
|
||||
bool res = true;
|
||||
if(ext == "off")
|
||||
CGAL::polyhedron_3_flux_to_lcc < Scene_lcc_item::LCC > (lcc, ifs);
|
||||
CGAL::import_from_polyhedron_3_flux < Scene_lcc_item::LCC > (lcc, ifs);
|
||||
else
|
||||
{
|
||||
res = CGAL::load_combinatorial_map(ifs, lcc);
|
||||
|
|
|
|||
|
|
@ -77,8 +77,9 @@ target_link_libraries(
|
|||
CGAL_Lab_target_use_c3t3_type(mesh_3_optimization_plugin)
|
||||
|
||||
# Use Eigen
|
||||
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
target_link_libraries(mesh_3_optimization_plugin PRIVATE CGAL::Eigen3_support)
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -28,61 +28,57 @@ target_link_libraries(extrude_plugin PRIVATE scene_surface_mesh_item
|
|||
scene_selection_item)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
if("${Eigen3_VERSION}" VERSION_GREATER "3.1.90")
|
||||
qt6_wrap_ui( acvd_remeshingUI_FILES ACVD_remeshing_dialog.ui)
|
||||
cgal_lab_plugin(acvd_remeshing_plugin ACVD_remeshing_plugin ${acvd_remeshingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(acvd_remeshing_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item scene_polygon_soup_item CGAL::Eigen3_support)
|
||||
qt6_wrap_ui( acvd_remeshingUI_FILES ACVD_remeshing_dialog.ui)
|
||||
cgal_lab_plugin(acvd_remeshing_plugin ACVD_remeshing_plugin ${acvd_remeshingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(acvd_remeshing_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item scene_polygon_soup_item CGAL::Eigen3_support)
|
||||
|
||||
qt6_wrap_ui( hole_fillingUI_FILES Hole_filling_widget.ui)
|
||||
cgal_lab_plugin(hole_filling_plugin Hole_filling_plugin ${hole_fillingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(hole_filling_plugin PRIVATE scene_surface_mesh_item scene_polylines_item scene_selection_item CGAL::Eigen3_support)
|
||||
qt6_wrap_ui( hole_fillingUI_FILES Hole_filling_widget.ui)
|
||||
cgal_lab_plugin(hole_filling_plugin Hole_filling_plugin ${hole_fillingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(hole_filling_plugin PRIVATE scene_surface_mesh_item scene_polylines_item scene_selection_item CGAL::Eigen3_support)
|
||||
|
||||
qt6_wrap_ui( fairingUI_FILES Fairing_widget.ui)
|
||||
cgal_lab_plugin(fairing_plugin Fairing_plugin ${fairingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(fairing_plugin PRIVATE scene_selection_item CGAL::Eigen3_support)
|
||||
qt6_wrap_ui( fairingUI_FILES Fairing_widget.ui)
|
||||
cgal_lab_plugin(fairing_plugin Fairing_plugin ${fairingUI_FILES} KEYWORDS PMP)
|
||||
target_link_libraries(fairing_plugin PRIVATE scene_selection_item CGAL::Eigen3_support)
|
||||
|
||||
qt6_wrap_ui( Mean_curvature_flow_skeleton_pluginUI_FILES Mean_curvature_flow_skeleton_plugin.ui)
|
||||
cgal_lab_plugin(mean_curvature_flow_skeleton_plugin Mean_curvature_flow_skeleton_plugin ${Mean_curvature_flow_skeleton_pluginUI_FILES})
|
||||
target_link_libraries(mean_curvature_flow_skeleton_plugin
|
||||
PRIVATE
|
||||
scene_surface_mesh_item
|
||||
scene_points_with_normal_item
|
||||
scene_polylines_item
|
||||
scene_mcf_item
|
||||
demo_framework
|
||||
CGAL::Eigen3_support)
|
||||
# The smoothing plugin can still do some things, even if Ceres is not found
|
||||
qt6_wrap_ui( smoothingUI_FILES Smoothing_plugin.ui Smoothing_tangential_relaxation.ui)
|
||||
cgal_lab_plugin(smoothing_plugin Smoothing_plugin ${smoothingUI_FILES})
|
||||
target_link_libraries(smoothing_plugin PRIVATE scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support)
|
||||
find_package(Ceres QUIET)
|
||||
include(CGAL_Ceres_support)
|
||||
if(TARGET CGAL::Ceres_support)
|
||||
target_link_libraries(smoothing_plugin PRIVATE CGAL::Ceres_support)
|
||||
endif()
|
||||
qt6_wrap_ui( Mean_curvature_flow_skeleton_pluginUI_FILES Mean_curvature_flow_skeleton_plugin.ui)
|
||||
cgal_lab_plugin(mean_curvature_flow_skeleton_plugin Mean_curvature_flow_skeleton_plugin ${Mean_curvature_flow_skeleton_pluginUI_FILES})
|
||||
target_link_libraries(mean_curvature_flow_skeleton_plugin
|
||||
PRIVATE
|
||||
scene_surface_mesh_item
|
||||
scene_points_with_normal_item
|
||||
scene_polylines_item
|
||||
scene_mcf_item
|
||||
demo_framework
|
||||
CGAL::Eigen3_support)
|
||||
# The smoothing plugin can still do some things, even if Ceres is not found
|
||||
qt6_wrap_ui( smoothingUI_FILES Smoothing_plugin.ui Smoothing_tangential_relaxation.ui)
|
||||
cgal_lab_plugin(smoothing_plugin Smoothing_plugin ${smoothingUI_FILES})
|
||||
target_link_libraries(smoothing_plugin PRIVATE scene_surface_mesh_item scene_selection_item CGAL::Eigen3_support)
|
||||
find_package(Ceres QUIET)
|
||||
include(CGAL_Ceres_support)
|
||||
if(TARGET CGAL::Ceres_support)
|
||||
target_link_libraries(smoothing_plugin PRIVATE CGAL::Ceres_support)
|
||||
endif()
|
||||
|
||||
set_package_properties(
|
||||
Ceres PROPERTIES
|
||||
DESCRIPTION "A large scale non-linear optimization library."
|
||||
PURPOSE "Can be used as a solver in the smoothing plugin.")
|
||||
target_link_libraries(extrude_plugin PRIVATE CGAL::Eigen3_support)
|
||||
set_package_properties(
|
||||
Ceres PROPERTIES
|
||||
DESCRIPTION "A large scale non-linear optimization library."
|
||||
PURPOSE "Can be used as a solver in the smoothing plugin.")
|
||||
target_link_libraries(extrude_plugin PRIVATE CGAL::Eigen3_support)
|
||||
|
||||
qt6_wrap_ui(remeshPlanarPatchesUI_FILES Remesh_planar_patches_dialog.ui)
|
||||
cgal_lab_plugin(remesh_planar_patches_plugin Remesh_planar_patches_plugin
|
||||
${remeshPlanarPatchesUI_FILES} KEYWORDS PMP CDT_3)
|
||||
target_link_libraries(remesh_planar_patches_plugin PRIVATE scene_surface_mesh_item CGAL::Eigen3_support)
|
||||
qt6_wrap_ui(remeshPlanarPatchesUI_FILES Remesh_planar_patches_dialog.ui)
|
||||
cgal_lab_plugin(remesh_planar_patches_plugin Remesh_planar_patches_plugin
|
||||
${remeshPlanarPatchesUI_FILES} KEYWORDS PMP CDT_3)
|
||||
target_link_libraries(remesh_planar_patches_plugin PRIVATE scene_surface_mesh_item CGAL::Eigen3_support)
|
||||
|
||||
if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND)
|
||||
set_tests_properties(
|
||||
"compilation of extrude_plugin"
|
||||
"compilation of fairing_plugin"
|
||||
"compilation of hole_filling_plugin"
|
||||
"compilation of remesh_planar_patches_plugin"
|
||||
"compilation of smoothing_plugin"
|
||||
PROPERTIES RESOURCE_LOCK Selection_test_resources)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.")
|
||||
if(CGAL_ENABLE_TESTING AND NOT CMAKE_VS_MSBUILD_COMMAND)
|
||||
set_tests_properties(
|
||||
"compilation of extrude_plugin"
|
||||
"compilation of fairing_plugin"
|
||||
"compilation of hole_filling_plugin"
|
||||
"compilation of remesh_planar_patches_plugin"
|
||||
"compilation of smoothing_plugin"
|
||||
PROPERTIES RESOURCE_LOCK Selection_test_resources)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
include(CGALlab_macros)
|
||||
|
||||
if(TARGET CGAL::Eigen3_support AND "${Eigen3_VERSION}" VERSION_GREATER "3.1.90")
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
|
||||
qt6_wrap_ui(editionUI_FILES Deform_mesh.ui)
|
||||
add_item(scene_edit_item
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ cgal_lab_plugin(
|
|||
target_link_libraries(tetrahedral_remeshing_plugin PRIVATE scene_c3t3_item
|
||||
${OPENGL_gl_LIBRARY})
|
||||
CGAL_Lab_target_use_c3t3_type(tetrahedral_remeshing_plugin)
|
||||
find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater)
|
||||
find_package(Eigen3 QUIET)
|
||||
include(CGAL_Eigen3_support)
|
||||
if(TARGET CGAL::Eigen3_support)
|
||||
target_link_libraries(tetrahedral_remeshing_plugin PRIVATE CGAL::Eigen3_support)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
#include<fstream>
|
||||
#include <CGAL/Three/Triangle_container.h>
|
||||
#include <CGAL/Three/Edge_container.h>
|
||||
#include <CGAL/Three/Three.h>
|
||||
#include <QApplication>
|
||||
#include <QMenu>
|
||||
|
||||
using namespace CGAL::Three;
|
||||
|
||||
|
|
@ -45,7 +43,9 @@ struct Scene_spheres_item_priv
|
|||
model_sphere_is_up = false;
|
||||
}
|
||||
|
||||
~Scene_spheres_item_priv() {}
|
||||
~Scene_spheres_item_priv()
|
||||
{
|
||||
}
|
||||
|
||||
void pick(int &id)const;
|
||||
|
||||
|
|
@ -85,15 +85,6 @@ void Scene_spheres_item_priv::pick(int& id) const
|
|||
id = -1;
|
||||
}
|
||||
|
||||
if (id != -1 && spheres[id].size() == 1) {
|
||||
const Sphere& sphere = spheres[id][0].first;
|
||||
Three::information(QString("Selected sphere: center (%1, %2, %3) radius %4").
|
||||
arg(sphere.center().x(), 0, 'g', 10).
|
||||
arg(sphere.center().y(), 0, 'g', 10).
|
||||
arg(sphere.center().z(), 0, 'g', 10).
|
||||
arg(CGAL::approximate_sqrt(sphere.squared_radius()), 0, 'g', 10));
|
||||
}
|
||||
|
||||
int offset = 0;
|
||||
float color[4];
|
||||
for(std::size_t i=0; i<spheres.size(); ++i)
|
||||
|
|
@ -121,10 +112,8 @@ void Scene_spheres_item_priv::pick(int& id) const
|
|||
}
|
||||
}
|
||||
|
||||
Scene_spheres_item::Scene_spheres_item(Scene_group_item* parent, std::size_t max_index, bool planed, bool pickable) : Scene_group_item()
|
||||
Scene_spheres_item::Scene_spheres_item(Scene_group_item* parent, std::size_t max_index, bool planed, bool pickable)
|
||||
{
|
||||
connected_alpha_slider = false;
|
||||
rendering_mode = Gouraud;
|
||||
setParent(parent);
|
||||
d = new Scene_spheres_item_priv(planed, max_index, this, pickable);
|
||||
if(pickable)
|
||||
|
|
@ -184,9 +173,6 @@ void Scene_spheres_item_priv::initializeBuffers(CGAL::Three::Viewer_interface *v
|
|||
|
||||
void Scene_spheres_item::draw(Viewer_interface *viewer) const
|
||||
{
|
||||
if (renderingMode() != Gouraud || !visible())
|
||||
return;
|
||||
|
||||
if(!isInit(viewer))
|
||||
initGL(viewer);
|
||||
if ( getBuffersFilled() &&
|
||||
|
|
@ -215,7 +201,6 @@ void Scene_spheres_item::draw(Viewer_interface *viewer) const
|
|||
}
|
||||
else
|
||||
{
|
||||
getTriangleContainer(0)->setAlpha(alpha());
|
||||
getTriangleContainer(0)->draw(viewer, false);
|
||||
}
|
||||
if(d->pickable && (d->spheres.size() > 1 && viewer->inDrawWithNames()))
|
||||
|
|
@ -233,9 +218,6 @@ void Scene_spheres_item::draw(Viewer_interface *viewer) const
|
|||
|
||||
void Scene_spheres_item::drawEdges(Viewer_interface *viewer) const
|
||||
{
|
||||
if (renderingMode() != Wireframe || !visible())
|
||||
return;
|
||||
|
||||
if(!isInit(viewer))
|
||||
initGL(viewer);
|
||||
if ( getBuffersFilled() &&
|
||||
|
|
@ -313,18 +295,6 @@ void Scene_spheres_item::invalidateOpenGLBuffers()
|
|||
getTriangleContainer(1)->reset_vbos(COLORS);
|
||||
}
|
||||
getEdgeContainer(0)->reset_vbos(NOT_INSTANCED);
|
||||
compute_bbox();
|
||||
}
|
||||
|
||||
QMenu* Scene_spheres_item::contextMenu() {
|
||||
QMenu* menu = Scene_item_rendering_helper::contextMenu();
|
||||
|
||||
if (!connected_alpha_slider && alphaSlider() != nullptr) {
|
||||
connect(alphaSlider(), &QSlider::valueChanged, [this]() {redraw(); });
|
||||
connected_alpha_slider = true;
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
QString
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
#define SCENE_SPHERES_ITEM_H
|
||||
#include "Scene_basic_objects_config.h"
|
||||
#include "create_sphere.h"
|
||||
#include "Color_map.h"
|
||||
|
||||
#include <CGAL/Three/Scene_group_item.h>
|
||||
#include <CGAL/Three/Scene_item_rendering_helper.h>
|
||||
|
|
@ -25,7 +24,7 @@ struct Scene_spheres_item_priv;
|
|||
* have a Scene_spheres_item child).
|
||||
*/
|
||||
class SCENE_BASIC_OBJECTS_EXPORT Scene_spheres_item
|
||||
: public CGAL::Three::Scene_group_item
|
||||
: public CGAL::Three::Scene_item_rendering_helper
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
@ -38,7 +37,6 @@ public:
|
|||
|
||||
~Scene_spheres_item();
|
||||
|
||||
Bbox bbox() const override { return _bbox; }
|
||||
bool isFinite() const override{ return true; }
|
||||
bool isEmpty() const override{ return false; }
|
||||
Scene_item* clone() const override{return nullptr;}
|
||||
|
|
@ -59,12 +57,10 @@ public:
|
|||
void setColor(QColor c) override;
|
||||
bool save(const std::string &file_name) const;
|
||||
|
||||
QMenu *contextMenu() override;
|
||||
|
||||
void initializeBuffers(Viewer_interface *) const override;
|
||||
void computeElements() const override;
|
||||
bool eventFilter(QObject *watched, QEvent *event)override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void on_color_changed();
|
||||
void picked(std::size_t id) const;
|
||||
|
|
@ -72,7 +68,6 @@ Q_SIGNALS:
|
|||
protected:
|
||||
friend struct Scene_spheres_item_priv;
|
||||
Scene_spheres_item_priv* d;
|
||||
bool connected_alpha_slider;
|
||||
};
|
||||
|
||||
#endif // SCENE_SPHERES_ITEM_H
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ void MainWindow::load_off (const QString & fileName, bool clear)
|
|||
|
||||
std::ifstream ifs (qPrintable (fileName));
|
||||
|
||||
CGAL::polyhedron_3_flux_to_lcc < LCC > (*scene.lcc, ifs);
|
||||
CGAL::import_from_polyhedron_3_flux < LCC > (*scene.lcc, ifs);
|
||||
|
||||
#ifdef CGAL_PROFILE_LCC_DEMO
|
||||
timer.stop();
|
||||
|
|
@ -415,7 +415,7 @@ void MainWindow::load_3DTDS (const QString & fileName, bool clear)
|
|||
T.insert (std::istream_iterator < Point_3 >(ifs),
|
||||
std::istream_iterator < Point_3 >() );
|
||||
|
||||
CGAL::triangulation_3_to_lcc < LCC, Triangulation >(*scene.lcc, T);
|
||||
CGAL::import_from_triangulation_3 < LCC, Triangulation >(*scene.lcc, T);
|
||||
|
||||
#ifdef CGAL_PROFILE_LCC_DEMO
|
||||
timer.stop();
|
||||
|
|
@ -673,7 +673,7 @@ void MainWindow::on_actionCompute_Voronoi_3D_triggered ()
|
|||
std::map<Triangulation::Cell_handle,
|
||||
LCC::Dart_descriptor > vol_to_dart;
|
||||
|
||||
dh = CGAL::triangulation_3_to_lcc < LCC, Triangulation >
|
||||
dh = CGAL::import_from_triangulation_3 < LCC, Triangulation >
|
||||
(delaunay_lcc, T, &vol_to_dart);
|
||||
|
||||
Dart_descriptor ddh=delaunay_lcc.dual(*scene.lcc, dh);
|
||||
|
|
|
|||
|
|
@ -24,20 +24,13 @@ Here a small example:
|
|||
<B>Middle</B>: the 2D linear cell complex reconstructed if combinatorial maps are the combinatorial data-structure.
|
||||
<B>Right</B>: the 2D linear cell complex reconstructed if generalized maps are the combinatorial data-structure.
|
||||
|
||||
\sa `CGAL::triangulation_3_to_lcc<LCC,Triangulation>`
|
||||
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
|
||||
*/
|
||||
template<class LCC>
|
||||
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& lcc,
|
||||
std::istream& ais);
|
||||
\sa `CGAL::import_from_triangulation_3<LCC,Triangulation>`
|
||||
\sa `CGAL::import_from_polyhedron_3<LCC,Polyhedron>`
|
||||
|
||||
/*!
|
||||
\ingroup PkgLinearCellComplexConstructions
|
||||
\deprecated Use `read_plane_graph_in_lcc()` instead.
|
||||
*/
|
||||
template<class LCC>
|
||||
[[deprecated("Use read_plane_graph_in_lcc instead")]]
|
||||
typename LCC::Dart_descriptor import_from_plane_graph(LCC& lcc, std::istream& ais);
|
||||
typename LCC::Dart_descriptor import_from_plane_graph(LCC& lcc,
|
||||
std::istream& ais);
|
||||
|
||||
} /* namespace CGAL */
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ namespace CGAL{
|
|||
Imports `apoly` (a `Polyhedron_3`) into `lcc`, a model of the `LinearCellComplex` concept. Objects are added in `lcc`, existing darts are not modified. Returns a dart created during the import.
|
||||
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 2 and \link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
||||
|
||||
\sa `CGAL::read_plane_graph_in_lcc<LCC>`
|
||||
\sa `CGAL::triangulation_3_to_lcc<LCC,Triangulation>`
|
||||
\sa `CGAL::import_from_plane_graph<LCC>`
|
||||
\sa `CGAL::import_from_triangulation_3<LCC,Triangulation>`
|
||||
*/
|
||||
template<class LCC,class Polyhedron>
|
||||
typename LCC::Dart_descriptor polyhedron_3_to_lcc(LCC& lcc,
|
||||
typename LCC::Dart_descriptor import_from_polyhedron_3(LCC& lcc,
|
||||
const Polyhedron &apoly);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,23 +3,13 @@ namespace CGAL{
|
|||
/*!
|
||||
\ingroup PkgLinearCellComplexConstructions
|
||||
|
||||
Imports `atr` (a `Triangulation_3`) into `lcc`, a model of the `LinearCellComplex` concept.
|
||||
Objects are added in `lcc`, existing darts are not modified. Returns a dart created during the import.
|
||||
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 3 and
|
||||
\link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
||||
Imports `atr` (a `Triangulation_3`) into `lcc`, a model of the `LinearCellComplex` concept. Objects are added in `lcc`, existing darts are not modified. Returns a dart created during the import.
|
||||
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 3 and \link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
|
||||
|
||||
\sa `CGAL::read_plane_graph_in_lcc<LCC>`
|
||||
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
|
||||
\sa `CGAL::import_from_plane_graph<LCC>`
|
||||
\sa `CGAL::import_from_polyhedron_3<LCC,Polyhedron>`
|
||||
*/
|
||||
|
||||
template <class LCC,class Triangulation_>
|
||||
typename LCC::Dart_descriptor triangulation_3_to_lcc(LCC& lcc, const Triangulation_&atr);
|
||||
|
||||
template <class LCC, class Triangulation_>
|
||||
[[deprecated("Use triangulation_3_to_lcc instead")]]
|
||||
typename LCC::Dart_descriptor import_from_triangulation_3(LCC& lcc, const Triangulation_& atr)
|
||||
{
|
||||
return triangulation_3_to_lcc(lcc, atr);
|
||||
typename LCC::Dart_descriptor import_from_triangulation_3(LCC& lcc,
|
||||
const Triangulation_&atr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -64,8 +64,8 @@ which constructs a vector as the difference of points `p2-p1`, and
|
|||
\link LinearCellComplexTraits::Vector ` Vector `\endlink `operator() (const CGAL::Origin&, const ` \link Point ` Point`\endlink`& p)`
|
||||
which constructs a vector as the difference of point `p` and a point at the origin
|
||||
(used in \link CGAL::barycenter `barycenter`\endlink
|
||||
and `CGAL::read_plane_graph_in_lcc`).*/
|
||||
|
||||
and `CGAL::import_from_plane_graph`).
|
||||
*/
|
||||
typedef unspecified_type Construct_vector;
|
||||
|
||||
/*!
|
||||
|
|
@ -104,7 +104,7 @@ a model of \link Kernel::Direction_2 `Direction_2`\endlink.
|
|||
typedef unspecified_type Direction_2;
|
||||
|
||||
/*!
|
||||
a model of \link Kernel::ConstructDirection_2 `ConstructDirection_2`\endlink (used in `CGAL::read_plane_graph_in_lcc`).
|
||||
a model of \link Kernel::ConstructDirection_2 `ConstructDirection_2`\endlink (used in `CGAL::import_from_plane_graph`).
|
||||
*/
|
||||
typedef unspecified_type Construct_direction_2;
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue