Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
f00797e5
Commit
f00797e5
authored
Jan 14, 2013
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
q corrections bug
parent
8ce52f3c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
37 deletions
+33
-37
Apps/Tuto/tuto_dual2.cpp
Apps/Tuto/tuto_dual2.cpp
+3
-3
Apps/Tuto/tuto_dual3.cpp
Apps/Tuto/tuto_dual3.cpp
+3
-3
include/Algo/Geometry/convexity.h
include/Algo/Geometry/convexity.h
+5
-0
include/Algo/Geometry/convexity.hpp
include/Algo/Geometry/convexity.hpp
+6
-1
include/Topology/generic/attributeHandler.h
include/Topology/generic/attributeHandler.h
+0
-14
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+6
-6
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+10
-10
No files found.
Apps/Tuto/tuto_dual2.cpp
View file @
f00797e5
...
...
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
PFP
::
MAP
myMap
;
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Import
::
importMesh
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
);
Algo
::
Surface
::
Import
::
importMesh
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
);
// get a handler to the 3D vector attribute created by the import
VertexAttribute
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
...
...
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
if
(
!
positionF
.
isValid
())
positionF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
FACE
>
(
"position"
)
;
Algo
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
myMap
,
position
,
positionF
)
;
Algo
::
Surface
::
Geometry
::
computeCentroidFaces
<
PFP
>
(
myMap
,
position
,
positionF
)
;
myMap
.
computeDual
();
...
...
@@ -84,7 +84,7 @@ int main(int argc, char **argv)
//const std::type_info &t1 = typeid(&positionF);
//std::cout << "type name : " << t1.name() << std::endl;
Algo
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"result.off"
);
Algo
::
Surface
::
Export
::
exportOFF
<
PFP
>
(
myMap
,
position
,
"result.off"
);
std
::
cout
<<
"Exported"
<<
std
::
endl
;
return
0
;
...
...
Apps/Tuto/tuto_dual3.cpp
View file @
f00797e5
...
...
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
PFP
::
MAP
myMap
;
std
::
vector
<
std
::
string
>
attrNames
;
Algo
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
,
Algo
::
Import
::
ImportVolumique
::
NODE
);
Algo
::
Volume
::
Import
::
importMeshV
<
PFP
>
(
myMap
,
argv
[
1
],
attrNames
,
Algo
::
Volume
::
Import
::
NODE
);
// get a handler to the 3D vector attribute created by the import
VertexAttribute
<
PFP
::
VEC3
>
position
=
myMap
.
getAttribute
<
PFP
::
VEC3
,
VERTEX
>
(
attrNames
[
0
]);
...
...
@@ -70,12 +70,12 @@ int main(int argc, char **argv)
if
(
!
positionV
.
isValid
())
positionV
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VOLUME
>
(
"position"
)
;
Algo
::
Geometry
::
computeCentroidVolumes
<
PFP
>
(
myMap
,
position
,
positionV
)
;
Algo
::
Volume
::
Geometry
::
computeCentroidVolumes
<
PFP
>
(
myMap
,
position
,
positionV
)
;
Dart
dsave
=
NIL
;
for
(
Dart
d
=
myMap
.
begin
()
;
d
!=
myMap
.
end
()
;
myMap
.
next
(
d
))
{
if
(
myMap
.
isBoundaryMarked
(
d
))
if
(
myMap
.
isBoundaryMarked
3
(
d
))
{
dsave
=
d
;
break
;
...
...
include/Algo/Geometry/convexity.h
View file @
f00797e5
...
...
@@ -31,6 +31,9 @@ namespace CGoGN
namespace
Algo
{
namespace
Surface
{
namespace
Geometry
{
...
...
@@ -42,6 +45,8 @@ bool isEdgeConvexe(typename PFP::MAP& map, Dart d, const VertexAttribute<typenam
}
// namespace Geometry
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
...
...
include/Algo/Geometry/convexity.hpp
View file @
f00797e5
...
...
@@ -33,6 +33,9 @@ namespace CGoGN
namespace
Algo
{
namespace
Surface
{
namespace
Geometry
{
...
...
@@ -42,7 +45,7 @@ bool isEdgeConvexe(typename PFP::MAP& map, Dart d, const VertexAttribute<typenam
typedef
typename
PFP
::
VEC3
VEC3
;
const
VEC3
n
=
faceNormal
<
PFP
>
(
map
,
d
,
position
);
const
VEC3
e
=
Algo
::
Geometry
::
vectorOutOfDart
<
PFP
>
(
map
,
map
.
phi1
(
map
.
phi2
(
d
)),
position
)
;
const
VEC3
e
=
vectorOutOfDart
<
PFP
>
(
map
,
map
.
phi1
(
map
.
phi2
(
d
)),
position
)
;
if
((
e
*
n
)
>
0
)
return
true
;
...
...
@@ -52,6 +55,8 @@ bool isEdgeConvexe(typename PFP::MAP& map, Dart d, const VertexAttribute<typenam
}
// namespace Geometry
}
// namespace Surface
}
// namespace Algo
}
// namespace CGoGN
include/Topology/generic/attributeHandler.h
View file @
f00797e5
...
...
@@ -93,20 +93,6 @@ public:
*/
AttributeHandler
()
;
template
<
unsigned
int
ORBIT2
>
AttributeHandler
(
const
AttributeHandler
<
T
,
ORBIT2
>&
h
)
:
AttributeHandlerGen
(
h
.
m_map
,
h
.
valid
)
{
m_attrib
=
h
.
m_attrib
;
if
(
m_attrib
->
getOrbit
()
==
ORBIT2
)
{
if
(
valid
)
registerInMap
()
;
}
else
valid
=
false
;
}
/**
* Constructor
* @param m the map which belong attribute
...
...
src/Topology/map/map2.cpp
View file @
f00797e5
...
...
@@ -945,9 +945,9 @@ void Map2::computeDual()
//boundary management
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
isBoundaryMarked
(
d
))
if
(
isBoundaryMarked
2
(
d
))
{
boundaryMarkOrbit
<
FACE
>
(
deleteVertex
(
phi2
(
d
)));
boundaryMarkOrbit
<
FACE
,
2
>
(
deleteVertex
(
phi2
(
d
)));
}
}
}
...
...
@@ -959,10 +959,10 @@ void Map2::computeDualBorderConstraint()
std
::
vector
<
Dart
>
oldb
;
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
isBoundaryMarked
(
d
))
if
(
isBoundaryMarked
2
(
d
))
{
oldb
.
push_back
(
d
);
boundaryUnmarkOrbit
<
FACE
>
(
d
);
boundaryUnmarkOrbit
<
FACE
,
2
>
(
d
);
}
}
...
...
@@ -1014,9 +1014,9 @@ void Map2::computeDualBorderConstraint()
//boundary management
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
isBoundaryMarked
(
d
))
if
(
isBoundaryMarked
2
(
d
))
{
boundaryMarkOrbit
<
FACE
>
(
deleteVertex
(
phi2
(
d
)));
boundaryMarkOrbit
<
FACE
,
2
>
(
deleteVertex
(
phi2
(
d
)));
}
}
...
...
src/Topology/map/map3.cpp
View file @
f00797e5
...
...
@@ -945,7 +945,7 @@ bool Map3::check()
Dart d2 = phi2(d);
if (phi2(d2) != d) // phi2 involution ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: phi2 is not an involution" << std::endl;
...
...
@@ -955,7 +955,7 @@ bool Map3::check()
Dart d1 = phi1(d);
if (phi_1(d1) != d) // phi1 a une image correcte ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: unconsistent phi_1 link" << std::endl;
...
...
@@ -964,7 +964,7 @@ bool Map3::check()
if (m.isMarked(d1)) // phi1 a un seul antécédent ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: dart with two phi1 predecessors" << std::endl;
...
...
@@ -974,7 +974,7 @@ bool Map3::check()
if (d1 == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) face loop (one edge)" << std::endl;
...
...
@@ -982,7 +982,7 @@ bool Map3::check()
if (phi1(d1) == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) face with only two edges" << std::endl;
...
...
@@ -990,7 +990,7 @@ bool Map3::check()
if (phi2(d1) == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) dandling edge (phi2)" << std::endl;
...
...
@@ -998,7 +998,7 @@ bool Map3::check()
if (phi3(d1) == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) dandling edge (phi3)" << std::endl;
...
...
@@ -1009,7 +1009,7 @@ bool Map3::check()
{
if (!m.isMarked(d)) // phi1 a au moins un antécédent ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked
3
(d))
std::cout << "Boundary case - ";
std::cout << "Check: dart with no phi1 predecessor" << std::endl;
...
...
@@ -1208,7 +1208,7 @@ void Map3::computeDual()
std::vector<Dart> v;
for(Dart d = begin(); d != end(); next(d))
{
if(!cv.isMarked(d) && isBoundaryMarked(d))
if(!cv.isMarked(d) && isBoundaryMarked
3
(d))
{
++count;
v.push_back(d);
...
...
@@ -1259,7 +1259,7 @@ void Map3::computeDual()
for(std::vector<Dart>::iterator it = v.begin() ; it != v.end() ; ++it)
{
boundaryUnmarkOrbit<VOLUME>(*it);
boundaryUnmarkOrbit<VOLUME
,3
>(*it);
}
for(std::vector<Dart>::iterator it = v.begin() ; it != v.end() ; ++it)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment