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
2efed964
Commit
2efed964
authored
14 years ago
by
Laurent Van Migroet
Browse files
Options
Downloads
Patches
Plain Diff
Added deleteMesh to GModel
parent
2d266b63
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GModel.cpp
+13
-0
13 additions, 0 deletions
Geo/GModel.cpp
Geo/GModel.h
+6
-4
6 additions, 4 deletions
Geo/GModel.h
with
19 additions
and
4 deletions
Geo/GModel.cpp
+
13
−
0
View file @
2efed964
...
@@ -250,6 +250,19 @@ void GModel::destroyMeshCaches()
...
@@ -250,6 +250,19 @@ void GModel::destroyMeshCaches()
_octree
=
0
;
_octree
=
0
;
}
}
void
GModel
::
deleteMesh
()
{
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
++
it
)
(
*
it
)
->
deleteMesh
();
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
++
it
)
(
*
it
)
->
deleteMesh
();
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
++
it
)
(
*
it
)
->
deleteMesh
();
for
(
viter
it
=
firstVertex
();
it
!=
lastVertex
();
++
it
)
(
*
it
)
->
deleteMesh
();
destroyMeshCaches
();
}
bool
GModel
::
empty
()
const
bool
GModel
::
empty
()
const
{
{
return
vertices
.
empty
()
&&
edges
.
empty
()
&&
faces
.
empty
()
&&
regions
.
empty
();
return
vertices
.
empty
()
&&
edges
.
empty
()
&&
faces
.
empty
()
&&
regions
.
empty
();
...
...
This diff is collapsed.
Click to expand it.
Geo/GModel.h
+
6
−
4
View file @
2efed964
...
@@ -151,6 +151,8 @@ class GModel
...
@@ -151,6 +151,8 @@ class GModel
// delete all the mesh-related caches (this must be called when the
// delete all the mesh-related caches (this must be called when the
// mesh is changed)
// mesh is changed)
void
destroyMeshCaches
();
void
destroyMeshCaches
();
//delete the mesh stored in entities and call destroMeshCaches
void
deleteMesh
();
// access internal CAD representations
// access internal CAD representations
GEO_Internals
*
getGEOInternals
(){
return
_geo_internals
;
}
GEO_Internals
*
getGEOInternals
(){
return
_geo_internals
;
}
...
@@ -388,10 +390,10 @@ class GModel
...
@@ -388,10 +390,10 @@ class GModel
GEntity
*
revolve
(
GEntity
*
e
,
std
::
vector
<
double
>
p1
,
std
::
vector
<
double
>
p2
,
GEntity
*
revolve
(
GEntity
*
e
,
std
::
vector
<
double
>
p1
,
std
::
vector
<
double
>
p2
,
double
angle
);
double
angle
);
GEntity
*
extrude
(
GEntity
*
e
,
std
::
vector
<
double
>
p1
,
std
::
vector
<
double
>
p2
);
GEntity
*
extrude
(
GEntity
*
e
,
std
::
vector
<
double
>
p1
,
std
::
vector
<
double
>
p2
);
GEntity
*
addPipe
(
GEntity
*
e
,
std
::
vector
<
GEdge
*>
edges
);
GEntity
*
addPipe
(
GEntity
*
e
,
std
::
vector
<
GEdge
*>
edges
);
void
addRuledFaces
(
std
::
vector
<
std
::
vector
<
GEdge
*>
>
edges
);
void
addRuledFaces
(
std
::
vector
<
std
::
vector
<
GEdge
*>
>
edges
);
GFace
*
addFace
(
std
::
vector
<
GEdge
*>
edges
,
std
::
vector
<
std
::
vector
<
double
>
>
points
);
GFace
*
addFace
(
std
::
vector
<
GEdge
*>
edges
,
std
::
vector
<
std
::
vector
<
double
>
>
points
);
GFace
*
addPlanarFace
(
std
::
vector
<
std
::
vector
<
GEdge
*>
>
edges
);
GFace
*
addPlanarFace
(
std
::
vector
<
std
::
vector
<
GEdge
*>
>
edges
);
// create solid geometry primitives using the factory
// create solid geometry primitives using the factory
GEntity
*
addSphere
(
double
cx
,
double
cy
,
double
cz
,
double
radius
);
GEntity
*
addSphere
(
double
cx
,
double
cy
,
double
cz
,
double
radius
);
...
...
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