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
7ceda2c2
Commit
7ceda2c2
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
oops
parent
2f42ac75
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/ACISVertex.cpp
+1
-1
1 addition, 1 deletion
Geo/ACISVertex.cpp
Geo/GModelIO_CELUM.cpp
+70
-5
70 additions, 5 deletions
Geo/GModelIO_CELUM.cpp
with
71 additions
and
6 deletions
Geo/ACISVertex.cpp
+
1
−
1
View file @
7ceda2c2
...
...
@@ -33,7 +33,7 @@ void ACISVertex::setPosition(GPoint &p)
SPoint2
ACISVertex
::
reparamOnFace
(
const
GFace
*
gf
,
int
dir
)
const
{
// FIXME there is definitively a fastest way to do it and this is wring for seams
!!!
// FIXME there is definitively a fastest way to do it and this is wring for seams!
return
gf
->
parFromPoint
(
SPoint3
(
x
(),
y
(),
z
()));
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_CELUM.cpp
+
70
−
5
View file @
7ceda2c2
// Gmsh - Copyright (C) 1997-201
4
C. Geuzaine, J.-F. Remacle
// Gmsh - Copyright (C) 1997-201
3
C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
...
...
@@ -52,7 +52,72 @@ int GModel::writeCELUM(const std::string &name, bool saveAll,
int
idf
=
1
,
ids
=
1
;
/*
*
un
fichier
de
facettes
-
nombre
de
facettes
-
ligne
vide
...
pour
chaque
facette
* a file with faces
- number of faces
- empty line
... for each face
- number of the face (starts at 1 : used for read errors)
- char string (name of geom part, material,... )
- list of 3 vertex nums
- empty line
...
* a file with vertices
- number of vertices
- conversion factor
- empty line
... for each vertex
- number of the vertex (starts at 1 : used for read errors)
- cartesian coordinates of the vertex
- componants of the exterior oriented normal
- value of 1st principal curvature
- value of second princpal curvature
- components of 1st principal direction
- components of 2nd principal direction
- empty line
...
*/
fprintf
(
fpf
,
"%d
\n\n
"
,
numf
);
fprintf
(
fps
,
"%d %g
\n\n
"
,
nums
,
1.0
);
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
it
++
){
GFace
*
f
=
*
it
;
if
(
!
saveAll
&&
f
->
physicals
.
empty
())
continue
;
std
::
vector
<
MVertex
*>
vvec
;
std
::
map
<
MVertex
*
,
CelumInfo
>
vmap
;
for
(
unsigned
int
i
=
0
;
i
<
f
->
triangles
.
size
();
i
++
){
fprintf
(
fpf
,
"%d
\"
face %d
\"
"
,
idf
++
,
f
->
tag
());
for
(
int
j
=
0
;
j
<
3
;
j
++
){
MVertex
*
v
=
f
->
triangles
[
i
]
->
getVertex
(
j
);
if
(
!
vmap
.
count
(
v
)){
v
->
setIndex
(
ids
++
);
SPoint2
param
;
bool
ok
=
reparamMeshVertexOnFace
(
v
,
f
,
param
);
if
(
!
ok
)
Msg
::
Warning
(
"Could not reparamtrize vertex %d on face %d"
,
v
->
getNum
(),
f
->
tag
());
CelumInfo
info
;
info
.
normal
=
f
->
normal
(
param
);
f
->
curvatures
(
param
,
&
info
.
dirMax
,
&
info
.
dirMin
,
&
info
.
curvMax
,
&
info
.
curvMin
);
vmap
[
v
]
=
info
;
vvec
.
push_back
(
v
);
}
fprintf
(
fpf
,
" %d"
,
v
->
getIndex
());
}
fprintf
(
fpf
,
"
\n\n
"
);
}
for
(
unsigned
int
i
=
0
;
i
<
vvec
.
size
();
i
++
){
MVertex
*
v
=
vvec
[
i
];
std
::
map
<
MVertex
*
,
CelumInfo
>::
iterator
it
=
vmap
.
find
(
v
);
fprintf
(
fps
,
"%d %g %g %g %g %g %g %g %g %g %g %g %g %g %g
\n\n
"
,
it
->
first
->
getIndex
(),
it
->
first
->
x
(),
it
->
first
->
y
(),
it
->
first
->
z
(),
it
->
second
.
normal
.
x
(),
it
->
second
.
normal
.
y
(),
it
->
second
.
normal
.
z
(),
it
->
second
.
curvMin
,
it
->
second
.
curvMax
,
it
->
second
.
dirMin
.
x
(),
it
->
second
.
dirMin
.
y
(),
it
->
second
.
dirMin
.
z
(),
it
->
second
.
dirMax
.
x
(),
it
->
second
.
dirMax
.
y
(),
it
->
second
.
dirMax
.
z
());
}
}
fclose
(
fpf
);
fclose
(
fps
);
return
1
;
}
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