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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
2ac4d52e
Commit
2ac4d52e
authored
Jun 02, 2013
by
Lionel Untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding a new plugin and somme changes to import/export volumetric objects
parent
035fdf2f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
16 deletions
+38
-16
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+10
-0
Apps/Examples/volumeExplorer.h
Apps/Examples/volumeExplorer.h
+3
-0
SCHNApps/Plugins/CMakeLists.txt
SCHNApps/Plugins/CMakeLists.txt
+2
-2
SCHNApps/Plugins/renderExplod/forms/renderExplod.ui
SCHNApps/Plugins/renderExplod/forms/renderExplod.ui
+3
-3
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
+2
-2
include/Algo/Export/exportVol.hpp
include/Algo/Export/exportVol.hpp
+3
-3
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
+0
-4
include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp
include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp
+15
-2
No files found.
Apps/Examples/volumeExplorer.cpp
View file @
2ac4d52e
...
...
@@ -196,6 +196,16 @@ void MyQT::cb_Open()
updateGL
()
;
}
void
MyQT
::
cb_Save
()
{
std
::
string
filters
(
"all (*.*);; tetmesh (*.tetmesh);; tet (*.tet);; node (*.node);; msh (*.msh);; vtu (*.vtu);; nas (*.nas);; vbgz (*.vbgz)"
)
;
std
::
string
filename
=
selectFileSave
(
"Save Mesh"
,
""
,
filters
)
;
if
(
filename
.
empty
())
return
;
Algo
::
Volume
::
Export
::
exportMesh
<
PFP
>
(
myMap
,
position
,
filename
);
}
void
MyQT
::
cb_initGL
()
{
...
...
Apps/Examples/volumeExplorer.h
View file @
2ac4d52e
...
...
@@ -48,6 +48,8 @@
#include "ui_volumeExplorer.h"
#include "Utils/Qt/qtui.h"
#include "Algo/Export/exportVol.h"
using
namespace
CGoGN
;
...
...
@@ -127,6 +129,7 @@ protected:
void
cb_mousePress
(
int
button
,
int
x
,
int
y
);
void
cb_mouseRelease
(
int
button
,
int
x
,
int
y
);
void
cb_Open
();
void
cb_Save
();
// slots locaux
...
...
SCHNApps/Plugins/CMakeLists.txt
View file @
2ac4d52e
...
...
@@ -9,5 +9,5 @@ ADD_SUBDIRECTORY(renderScalar)
ADD_SUBDIRECTORY
(
renderExplod
)
ADD_SUBDIRECTORY
(
renderTopoSurface
)
ADD_SUBDIRECTORY
(
subdivideSurface
)
ADD_SUBDIRECTORY
(
surfaceDeformation
)
#
ADD_SUBDIRECTORY(surfaceDeformation)
ADD_SUBDIRECTORY
(
subdivideMRVolume
)
SCHNApps/Plugins/renderExplod/forms/renderExplod.ui
View file @
2ac4d52e
...
...
@@ -6,7 +6,7 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
174
</width>
<width>
200
</width>
<height>
545
</height>
</rect>
</property>
...
...
@@ -101,7 +101,7 @@
<item
row=
"1"
column=
"1"
>
<widget
class=
"QSlider"
name=
"slider_facesScaleFactor"
>
<property
name=
"value"
>
<number>
50
</number>
<number>
99
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
...
...
@@ -118,7 +118,7 @@
<item
row=
"2"
column=
"1"
>
<widget
class=
"QSlider"
name=
"slider_volumesScaleFactor"
>
<property
name=
"value"
>
<number>
50
</number>
<number>
99
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
...
...
SCHNApps/Plugins/renderExplod/src/renderExplod.cpp
View file @
2ac4d52e
...
...
@@ -276,7 +276,7 @@ void RenderExplodPlugin::changeRenderFaces(View* view, MapHandlerGen* map, bool
void
RenderExplodPlugin
::
changeFacesScaleFactor
(
View
*
view
,
MapHandlerGen
*
map
,
int
i
,
bool
fromUI
)
{
ParameterSet
*
params
=
h_viewParams
[
view
];
params
->
perMap
[
map
->
getName
()]
->
facesScaleFactor
=
i
/
50
.0
;
params
->
perMap
[
map
->
getName
()]
->
facesScaleFactor
=
i
/
99
.0
;
if
(
view
->
isCurrentView
())
{
...
...
@@ -289,7 +289,7 @@ void RenderExplodPlugin::changeFacesScaleFactor(View* view, MapHandlerGen* map,
void
RenderExplodPlugin
::
changeVolumesScaleFactor
(
View
*
view
,
MapHandlerGen
*
map
,
int
i
,
bool
fromUI
)
{
ParameterSet
*
params
=
h_viewParams
[
view
];
params
->
perMap
[
map
->
getName
()]
->
volumesScaleFactor
=
i
/
50
.0
;
params
->
perMap
[
map
->
getName
()]
->
volumesScaleFactor
=
i
/
99
.0
;
if
(
view
->
isCurrentView
())
{
...
...
include/Algo/Export/exportVol.hpp
View file @
2ac4d52e
...
...
@@ -775,7 +775,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
VertexAutoAttribute
<
unsigned
int
>
indices
(
map
,
"indices_vert"
);
fout
<<
"
Vertices"
<<
std
::
endl
<<
position
.
nbElements
()
<<
std
::
endl
;
fout
<<
"Vertices"
<<
std
::
endl
<<
position
.
nbElements
()
<<
std
::
endl
;
std
::
vector
<
unsigned
int
>
tetra
;
tetra
.
reserve
(
2048
);
...
...
@@ -784,7 +784,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
for
(
unsigned
int
i
=
position
.
begin
();
i
!=
position
.
end
();
position
.
next
(
i
))
{
const
VEC3
&
P
=
position
[
i
];
fout
<<
P
[
0
]
<<
" "
<<
P
[
1
]
<<
" "
<<
P
[
2
]
<<
std
::
endl
;
fout
<<
P
[
0
]
<<
" "
<<
P
[
1
]
<<
" "
<<
P
[
2
]
<<
" "
<<
"0"
<<
std
::
endl
;
indices
[
i
]
=
count
++
;
}
...
...
@@ -815,7 +815,7 @@ bool exportTetmesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::V
}
unsigned
int
nbtetra
=
tetra
.
size
()
/
4
;
fout
<<
"
Tetrahedra"
<<
std
::
endl
<<
nbtetra
<<
std
::
endl
;
fout
<<
"Tetrahedra"
<<
std
::
endl
<<
nbtetra
<<
std
::
endl
;
for
(
unsigned
int
i
=
0
;
i
<
nbtetra
;
++
i
)
{
...
...
include/Algo/ImplicitHierarchicalMesh/subdivision3.hpp
View file @
2ac4d52e
...
...
@@ -100,7 +100,6 @@ void subdivideFace(typename PFP::MAP& map, Dart d, AttributeHandler<typename PFP
unsigned int degree = 0 ;
typename PFP::VEC3 p ;
Traversor2FE<typename PFP::MAP> travE(map, old);
for(Dart it = travE.begin(); it != travE.end() ; it = travE.next())
{
++degree;
...
...
@@ -306,12 +305,9 @@ Dart subdivideVolumeClassic(typename PFP::MAP& map, Dart d, AttributeHandler<typ
newEdges.reserve(50);
Dart centralDart = NIL;
//Second step : deconnect each corner, close each hole, subdivide each new face into 3
for (std::vector<Dart>::iterator edge = oldEdges.begin(); edge != oldEdges.end(); ++edge)
{
Dart e = *edge;
std::vector<Dart> v ;
...
...
include/Algo/Multiresolution/Map3MR/map3MR_PrimalAdapt.hpp
View file @
2ac4d52e
...
...
@@ -896,6 +896,20 @@ unsigned int Map3MR<PFP>::subdivideHexa(Dart d, bool OneLevelDifference)
if
(
m_map
.
getCurrentLevel
()
==
m_map
.
getMaxLevel
())
m_map
.
addLevelBack
()
;
Traversor3WV
<
typename
PFP
::
MAP
>
tWV
(
m_map
,
d
);
for
(
Dart
ditWV
=
tWV
.
begin
();
ditWV
!=
tWV
.
end
();
ditWV
=
tWV
.
next
())
{
//dupliquer tous les brins de l'orbite
TraversorDartsOfOrbit
<
typename
PFP
::
MAP
,
VERTEX
>
td
(
m_map
,
ditWV
);
for
(
Dart
dtd
=
td
.
begin
()
;
dtd
!=
td
.
end
()
;
dtd
=
td
.
next
())
{
m_map
.
incCurrentLevel
();
m_map
.
duplicateDart
(
dtd
);
m_map
.
decCurrentLevel
()
;
}
}
//
// Subdivide Faces and Edges
//
...
...
@@ -914,6 +928,7 @@ unsigned int Map3MR<PFP>::subdivideHexa(Dart d, bool OneLevelDifference)
for
(
Dart
ditWV
=
traWV
.
begin
();
ditWV
!=
traWV
.
end
();
ditWV
=
traWV
.
next
())
{
m_map
.
incCurrentLevel
()
;
(
*
vertexVertexFunctor
)(
ditWV
)
;
Dart
e
=
ditWV
;
...
...
@@ -954,8 +969,6 @@ unsigned int Map3MR<PFP>::subdivideHexa(Dart d, bool OneLevelDifference)
}
m_map
.
decCurrentLevel
()
;
}
m_map
.
incCurrentLevel
();
...
...
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