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
03fe866b
Commit
03fe866b
authored
16 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
80addade
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/OpenFile.cpp
+15
-16
15 additions, 16 deletions
Common/OpenFile.cpp
Parser/Gmsh.tab.cpp
+254
-248
254 additions, 248 deletions
Parser/Gmsh.tab.cpp
Parser/Gmsh.y
+7
-1
7 additions, 1 deletion
Parser/Gmsh.y
with
276 additions
and
265 deletions
Common/OpenFile.cpp
+
15
−
16
View file @
03fe866b
...
...
@@ -232,13 +232,12 @@ static void SetProjectName(const char *name)
int
MergeFile
(
const
char
*
name
,
int
warn_if_missing
)
{
GModel
*
model
=
GModel
::
current
();
if
(
!
model
){
if
(
!
GModel
::
current
()){
Msg
::
Error
(
"No models exists in which to merge data"
);
return
0
;
}
if
(
m
odel
->
getName
()
==
""
)
if
(
GM
odel
::
current
()
->
getName
()
==
""
)
SetProjectName
(
name
);
// added 'b' for pure Windows programs, since some of these files
...
...
@@ -285,33 +284,33 @@ int MergeFile(const char *name, int warn_if_missing)
int
status
=
0
;
if
(
!
strcmp
(
ext
,
".stl"
)
||
!
strcmp
(
ext
,
".STL"
)){
status
=
m
odel
->
readSTL
(
name
,
CTX
.
geom
.
tolerance
);
status
=
GM
odel
::
current
()
->
readSTL
(
name
,
CTX
.
geom
.
tolerance
);
}
else
if
(
!
strcmp
(
ext
,
".brep"
)
||
!
strcmp
(
ext
,
".rle"
)
||
!
strcmp
(
ext
,
".brp"
)
||
!
strcmp
(
ext
,
".BRP"
)){
status
=
m
odel
->
readOCCBREP
(
std
::
string
(
name
));
status
=
GM
odel
::
current
()
->
readOCCBREP
(
std
::
string
(
name
));
}
else
if
(
!
strcmp
(
ext
,
".iges"
)
||
!
strcmp
(
ext
,
".IGES"
)
||
!
strcmp
(
ext
,
".igs"
)
||
!
strcmp
(
ext
,
".IGS"
)){
status
=
m
odel
->
readOCCIGES
(
std
::
string
(
name
));
status
=
GM
odel
::
current
()
->
readOCCIGES
(
std
::
string
(
name
));
}
else
if
(
!
strcmp
(
ext
,
".step"
)
||
!
strcmp
(
ext
,
".STEP"
)
||
!
strcmp
(
ext
,
".stp"
)
||
!
strcmp
(
ext
,
".STP"
)){
status
=
m
odel
->
readOCCSTEP
(
std
::
string
(
name
));
status
=
GM
odel
::
current
()
->
readOCCSTEP
(
std
::
string
(
name
));
}
else
if
(
!
strcmp
(
ext
,
".unv"
)
||
!
strcmp
(
ext
,
".UNV"
)){
status
=
m
odel
->
readUNV
(
name
);
status
=
GM
odel
::
current
()
->
readUNV
(
name
);
}
else
if
(
!
strcmp
(
ext
,
".vtk"
)
||
!
strcmp
(
ext
,
".VTK"
)){
status
=
m
odel
->
readVTK
(
name
,
CTX
.
big_endian
);
status
=
GM
odel
::
current
()
->
readVTK
(
name
,
CTX
.
big_endian
);
}
else
if
(
!
strcmp
(
ext
,
".wrl"
)
||
!
strcmp
(
ext
,
".WRL"
)
||
!
strcmp
(
ext
,
".vrml"
)
||
!
strcmp
(
ext
,
".VRML"
)
||
!
strcmp
(
ext
,
".iv"
)
||
!
strcmp
(
ext
,
".IV"
)){
status
=
m
odel
->
readVRML
(
name
);
status
=
GM
odel
::
current
()
->
readVRML
(
name
);
}
else
if
(
!
strcmp
(
ext
,
".mesh"
)
||
!
strcmp
(
ext
,
".MESH"
)){
status
=
m
odel
->
readMESH
(
name
);
status
=
GM
odel
::
current
()
->
readMESH
(
name
);
}
else
if
(
!
strcmp
(
ext
,
".med"
)
||
!
strcmp
(
ext
,
".MED"
)
||
!
strcmp
(
ext
,
".mmed"
)
||
!
strcmp
(
ext
,
".MMED"
)
||
...
...
@@ -323,13 +322,13 @@ int MergeFile(const char *name, int warn_if_missing)
}
else
if
(
!
strcmp
(
ext
,
".bdf"
)
||
!
strcmp
(
ext
,
".BDF"
)
||
!
strcmp
(
ext
,
".nas"
)
||
!
strcmp
(
ext
,
".NAS"
)){
status
=
m
odel
->
readBDF
(
name
);
status
=
GM
odel
::
current
()
->
readBDF
(
name
);
}
else
if
(
!
strcmp
(
ext
,
".p3d"
)
||
!
strcmp
(
ext
,
".P3D"
)){
status
=
m
odel
->
readP3D
(
name
);
status
=
GM
odel
::
current
()
->
readP3D
(
name
);
}
else
if
(
!
strcmp
(
ext
,
".fm"
)
||
!
strcmp
(
ext
,
".FM"
))
{
status
=
m
odel
->
readFourier
(
name
);
status
=
GM
odel
::
current
()
->
readFourier
(
name
);
}
#if defined(HAVE_FLTK)
else
if
(
!
strcmp
(
ext
,
".pnm"
)
||
!
strcmp
(
ext
,
".PNM"
)
||
...
...
@@ -358,7 +357,7 @@ int MergeFile(const char *name, int warn_if_missing)
if
(
!
strncmp
(
header
,
"$PTS"
,
4
)
||
!
strncmp
(
header
,
"$NO"
,
3
)
||
!
strncmp
(
header
,
"$PARA"
,
5
)
||
!
strncmp
(
header
,
"$ELM"
,
4
)
||
!
strncmp
(
header
,
"$MeshFormat"
,
11
)
||
!
strncmp
(
header
,
"$Comments"
,
9
))
{
status
=
m
odel
->
readMSH
(
name
);
status
=
GM
odel
::
current
()
->
readMSH
(
name
);
#if !defined(HAVE_NO_POST)
if
(
status
>
1
)
status
=
PView
::
readMSH
(
name
);
#endif
...
...
@@ -370,7 +369,7 @@ int MergeFile(const char *name, int warn_if_missing)
}
#endif
else
{
status
=
m
odel
->
readGEO
(
name
);
status
=
GM
odel
::
current
()
->
readGEO
(
name
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Parser/Gmsh.tab.cpp
+
254
−
248
View file @
03fe866b
This diff is collapsed.
Click to expand it.
Parser/Gmsh.y
+
7
−
1
View file @
03fe866b
...
...
@@ -1742,7 +1742,13 @@ Delete :
}
| tDelete tSTRING tEND
{
if(!strcmp($2, "Model") || !strcmp($2, "Meshes") || !strcmp($2, "All")){
if(!strcmp($2, "Meshes") || !strcmp($2, "All")){
for(unsigned int i = 0; i < GModel::list.size(); i++){
GModel::list[i]->destroy();
GModel::list[i]->getGEOInternals()->destroy();
}
}
else if(!strcmp($2, "Model")){
GModel::current()->destroy();
GModel::current()->getGEOInternals()->destroy();
}
...
...
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