Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
6228da72
Commit
6228da72
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
coherence of surface mesh in extrusion
parent
f3674f84
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/3D_Extrude.cpp
+42
-12
42 additions, 12 deletions
Mesh/3D_Extrude.cpp
with
42 additions
and
12 deletions
Mesh/3D_Extrude.cpp
+
42
−
12
View file @
6228da72
// $Id: 3D_Extrude.cpp,v 1.1
4
2001-08-01 1
5:52:33
geuzaine Exp $
// $Id: 3D_Extrude.cpp,v 1.1
5
2001-08-01 1
8:01:04
geuzaine Exp $
#include
"Gmsh.h"
#include
"Const.h"
...
...
@@ -412,9 +412,11 @@ void Extrude_Seg (Vertex * V1, Vertex * V2){
if
(
are_exist
(
v3
,
v2
,
Tree_Ares
)){
s
=
Create_Simplex
(
v3
,
v2
,
v1
,
NULL
);
s
->
iEnt
=
THES
->
Num
;
s
->
Num
=
-
s
->
Num
;
//Trick to tag triangles to re-extrude!
Tree_Add
(
THES
->
Simplexes
,
&
s
);
s
=
Create_Simplex
(
v3
,
v4
,
v2
,
NULL
);
s
->
iEnt
=
THES
->
Num
;
s
->
Num
=
-
s
->
Num
;
//Trick to tag triangles to re-extrude!
Tree_Add
(
THES
->
Simplexes
,
&
s
);
}
else
{
...
...
@@ -422,9 +424,11 @@ void Extrude_Seg (Vertex * V1, Vertex * V2){
are_cree
(
v1
,
v4
,
Tree_Ares
);
s
=
Create_Simplex
(
v3
,
v4
,
v1
,
NULL
);
s
->
iEnt
=
THES
->
Num
;
s
->
Num
=
-
s
->
Num
;
//Trick to tag triangles to re-extrude!
Tree_Add
(
THES
->
Simplexes
,
&
s
);
s
=
Create_Simplex
(
v1
,
v4
,
v2
,
NULL
);
s
->
iEnt
=
THES
->
Num
;
s
->
Num
=
-
s
->
Num
;
//Trick to tag triangles to re-extrude!
Tree_Add
(
THES
->
Simplexes
,
&
s
);
}
}
...
...
@@ -635,6 +639,25 @@ int Extrude_Mesh (Surface * s){
}
static
Tree_T
*
tmp
;
void
Free_NegativeSimplex
(
void
*
a
,
void
*
b
){
Simplex
*
s
=
*
(
Simplex
**
)
a
;
if
(
s
){
if
(
s
->
Num
>=
0
){
Tree_Add
(
tmp
,
&
s
);
}
else
{
delete
s
;
s
=
NULL
;
}
}
}
void
Untag_NegativeSimplex
(
void
*
a
,
void
*
b
){
Simplex
*
s
=
*
(
Simplex
**
)
a
;
if
(
s
&&
s
->
Num
<
0
)
s
->
Num
=
-
s
->
Num
;
}
int
Extrude_Mesh
(
Volume
*
v
){
int
i
,
j
;
Surface
*
ss
;
...
...
@@ -690,17 +713,24 @@ int Extrude_Mesh (Volume * v){
// so that now, the surface mesh is ok (edge swapping is easy in 2d).
// cretainly not the most efficient way to do it but it seems to work
// but it doesn't :-(
/*
for (i = 0; i < List_Nbr (v->Surfaces); i++)
{
List_Read (v->Surfaces, i, &ss);
Tree_Action(ss->Simplexes, Free_Simplex);
Tree_Delete(ss->Simplexes);
ss->Simplexes = Tree_Create (sizeof (Simplex *), compareQuality);
Extrude_Mesh(ss);
}
*/
// j'ai rajoute un truc assez horrible pour ne pas supprimer les
// tri/qua qui ne doivent pas l'etre, i.e. tous ceux qui ne sont
// pas crees par l'extrusion. Je les tagge avec un numero negatif
// (qu'ils garderont si on ne maille pas en 3d...).
for
(
i
=
0
;
i
<
List_Nbr
(
v
->
Surfaces
);
i
++
){
List_Read
(
v
->
Surfaces
,
i
,
&
ss
);
tmp
=
Tree_Create
(
sizeof
(
Simplex
*
),
compareQuality
);
Tree_Action
(
ss
->
Simplexes
,
Free_NegativeSimplex
);
Tree_Delete
(
ss
->
Simplexes
);
ss
->
Simplexes
=
tmp
;
Extrude_Mesh
(
ss
);
}
for
(
i
=
0
;
i
<
List_Nbr
(
v
->
Surfaces
);
i
++
){
List_Read
(
v
->
Surfaces
,
i
,
&
ss
);
Tree_Action
(
ss
->
Simplexes
,
Untag_NegativeSimplex
);
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment