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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
cc1bb524
Commit
cc1bb524
authored
14 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Boundary for GModel entities
parent
4967bb58
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/Geo.cpp
+54
-0
54 additions, 0 deletions
Geo/Geo.cpp
with
54 additions
and
0 deletions
Geo/Geo.cpp
+
54
−
0
View file @
cc1bb524
...
@@ -1886,6 +1886,7 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
...
@@ -1886,6 +1886,7 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
switch
(
O
.
Type
)
{
switch
(
O
.
Type
)
{
case
MSH_POINT
:
case
MSH_POINT
:
case
MSH_POINT_BND_LAYER
:
case
MSH_POINT_BND_LAYER
:
case
MSH_POINT_FROM_GMODEL
:
return
;
return
;
break
;
break
;
case
MSH_SEGM_LINE
:
case
MSH_SEGM_LINE
:
...
@@ -1918,6 +1919,27 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
...
@@ -1918,6 +1919,27 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
Msg
::
Error
(
"Unknown curve %d"
,
O
.
Num
);
Msg
::
Error
(
"Unknown curve %d"
,
O
.
Num
);
}
}
break
;
break
;
case
MSH_SEGM_FROM_GMODEL
:
{
GEdge
*
ge
=
GModel
::
current
()
->
getEdgeByTag
(
O
.
Num
);
if
(
ge
){
if
(
ge
->
getBeginVertex
()){
Shape
sh
;
sh
.
Type
=
MSH_POINT_FROM_GMODEL
;
sh
.
Num
=
ge
->
getBeginVertex
()
->
tag
();
List_Add
(
shapesBoundary
,
&
sh
);
}
if
(
ge
->
getEndVertex
()){
Shape
sh
;
sh
.
Type
=
MSH_POINT_FROM_GMODEL
;
sh
.
Num
=
ge
->
getEndVertex
()
->
tag
();
List_Add
(
shapesBoundary
,
&
sh
);
}
}
else
Msg
::
Error
(
"Unknown curve %d"
,
O
.
Num
);
}
break
;
case
MSH_SURF_PLAN
:
case
MSH_SURF_PLAN
:
case
MSH_SURF_REGL
:
case
MSH_SURF_REGL
:
case
MSH_SURF_TRIC
:
case
MSH_SURF_TRIC
:
...
@@ -1938,6 +1960,22 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
...
@@ -1938,6 +1960,22 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
Msg
::
Error
(
"Unknown surface %d"
,
O
.
Num
);
Msg
::
Error
(
"Unknown surface %d"
,
O
.
Num
);
}
}
break
;
break
;
case
MSH_SURF_FROM_GMODEL
:
{
GFace
*
gf
=
GModel
::
current
()
->
getFaceByTag
(
O
.
Num
);
if
(
gf
){
std
::
list
<
GEdge
*>
edges
(
gf
->
edges
());
for
(
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
it
!=
edges
.
end
();
it
++
){
Shape
sh
;
sh
.
Type
=
MSH_SEGM_FROM_GMODEL
;
sh
.
Num
=
(
*
it
)
->
tag
();
List_Add
(
shapesBoundary
,
&
sh
);
}
}
else
Msg
::
Error
(
"Unknown surface %d"
,
O
.
Num
);
}
break
;
case
MSH_VOLUME
:
case
MSH_VOLUME
:
{
{
Volume
*
v
=
FindVolume
(
O
.
Num
);
Volume
*
v
=
FindVolume
(
O
.
Num
);
...
@@ -1955,6 +1993,22 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
...
@@ -1955,6 +1993,22 @@ void BoundaryShapes(List_T *shapes, List_T *shapesBoundary, bool combined)
Msg
::
Error
(
"Unknown volume %d"
,
O
.
Num
);
Msg
::
Error
(
"Unknown volume %d"
,
O
.
Num
);
}
}
break
;
break
;
case
MSH_VOLUME_FROM_GMODEL
:
{
GRegion
*
gr
=
GModel
::
current
()
->
getRegionByTag
(
O
.
Num
);
if
(
gr
){
std
::
list
<
GFace
*>
faces
(
gr
->
faces
());
for
(
std
::
list
<
GFace
*>::
iterator
it
=
faces
.
begin
();
it
!=
faces
.
end
();
it
++
){
Shape
sh
;
sh
.
Type
=
MSH_SURF_FROM_GMODEL
;
sh
.
Num
=
(
*
it
)
->
tag
();
List_Add
(
shapesBoundary
,
&
sh
);
}
}
else
Msg
::
Error
(
"Unknown volume %d"
,
O
.
Num
);
}
break
;
default
:
default
:
Msg
::
Error
(
"Impossible to take boundary of entity %d (of type %d)"
,
O
.
Num
,
Msg
::
Error
(
"Impossible to take boundary of entity %d (of type %d)"
,
O
.
Num
,
O
.
Type
);
O
.
Type
);
...
...
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