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
24040723
Commit
24040723
authored
10 years ago
by
Paul-Emile Bernard
Browse files
Options
Downloads
Patches
Plain Diff
esthetic modifications
parent
2f299b8b
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/GenericEdge.cpp
+0
-30
0 additions, 30 deletions
Geo/GenericEdge.cpp
Geo/GenericFace.cpp
+0
-17
0 additions, 17 deletions
Geo/GenericFace.cpp
Geo/GenericRegion.cpp
+0
-4
0 additions, 4 deletions
Geo/GenericRegion.cpp
Geo/GenericVertex.cpp
+0
-7
0 additions, 7 deletions
Geo/GenericVertex.cpp
with
0 additions
and
58 deletions
Geo/GenericEdge.cpp
+
0
−
30
View file @
24040723
...
...
@@ -11,7 +11,6 @@
#include
"GenericFace.h"
#include
"Context.h"
//------------------------------------------------------------------------
GenericEdge
::
ptrfunction_int_double_refvector
GenericEdge
::
EdgeEvalXYZFromT
=
NULL
;
GenericEdge
::
ptrfunction_int_refdouble_refdouble
GenericEdge
::
EdgeEvalParBounds
=
NULL
;
...
...
@@ -23,7 +22,6 @@ GenericEdge::ptrfunction_int_refvector_refdouble_refvector_refbool GenericEdge::
GenericEdge
::
ptrfunction_int_refbool
GenericEdge
::
EdgeIs3D
=
NULL
;
GenericEdge
::
ptrfunction_int_int_double_int_refvector
GenericEdge
::
EdgeReparamOnFace
=
NULL
;
//------------------------------------------------------------------------
GenericEdge
::
GenericEdge
(
GModel
*
m
,
int
num
,
int
_native_id
,
GVertex
*
v1
,
GVertex
*
v2
,
bool
_isseam
)
:
GEdge
(
m
,
num
,
v1
,
v2
),
id
(
_native_id
),
is_seam
(
_isseam
){
if
((
!
EdgeEvalParBounds
)
||
(
!
EdgeEvalXYZFromT
))
Msg
::
Error
(
"GenericEdge::ERROR: Callback not set"
);
...
...
@@ -31,18 +29,15 @@ GenericEdge::GenericEdge(GModel *m, int num, int _native_id, GVertex *v1, GVerte
if
(
!
ok
)
Msg
::
Error
(
"GenericEdge::ERROR from EdgeEvalParBounds ! "
);
}
//------------------------------------------------------------------------
GenericEdge
::~
GenericEdge
(){
}
//------------------------------------------------------------------------
Range
<
double
>
GenericEdge
::
parBounds
(
int
i
)
const
{
return
Range
<
double
>
(
s0
,
s1
);
}
//------------------------------------------------------------------------
SPoint2
GenericEdge
::
reparamOnFace
(
const
GFace
*
face
,
double
par
,
int
dir
)
const
{
vector
<
double
>
res
(
2
,
0.
);
...
...
@@ -55,7 +50,6 @@ SPoint2 GenericEdge::reparamOnFace(const GFace *face, double par, int dir) const
return
SPoint2
(
res
[
0
],
res
[
1
]);;
}
//------------------------------------------------------------------------
GPoint
GenericEdge
::
closestPoint
(
const
SPoint3
&
qp
,
double
&
param
)
const
{
vector
<
double
>
queryPoint
(
3
,
0.
);
...
...
@@ -69,14 +63,12 @@ GPoint GenericEdge::closestPoint(const SPoint3 &qp, double ¶m) const{
return
GPoint
(
res
[
0
],
res
[
1
],
res
[
2
],
this
,
param
);
}
//------------------------------------------------------------------------
bool
GenericEdge
::
isSeam
(
const
GFace
*
face
)
const
{
// return false;
return
is_seam
;
}
//------------------------------------------------------------------------
GPoint
GenericEdge
::
point
(
double
par
)
const
{
vector
<
double
>
res
(
3
,
0.
);
...
...
@@ -86,7 +78,6 @@ GPoint GenericEdge::point(double par) const{
return
GPoint
(
res
[
0
],
res
[
1
],
res
[
2
],
this
,
par
);
}
//------------------------------------------------------------------------
SVector3
GenericEdge
::
firstDer
(
double
par
)
const
{
vector
<
double
>
res
(
3
,
0.
);
...
...
@@ -96,7 +87,6 @@ SVector3 GenericEdge::firstDer(double par) const{
return
SVector3
(
res
[
0
],
res
[
1
],
res
[
2
]);
}
//------------------------------------------------------------------------
GEntity
::
GeomType
GenericEdge
::
geomType
()
const
{
string
s
;
...
...
@@ -131,7 +121,6 @@ GEntity::GeomType GenericEdge::geomType() const{
return
Unknown
;
}
//------------------------------------------------------------------------
double
GenericEdge
::
curvature
(
double
par
)
const
{
double
res
;
...
...
@@ -141,7 +130,6 @@ double GenericEdge::curvature(double par) const{
return
res
;
}
//------------------------------------------------------------------------
bool
GenericEdge
::
is3D
()
const
{
bool
res
;
...
...
@@ -151,7 +139,6 @@ bool GenericEdge::is3D() const{
return
res
;
}
//------------------------------------------------------------------------
bool
GenericEdge
::
degenerate
(
int
)
const
{
bool
res
=
false
;
...
...
@@ -161,7 +148,6 @@ bool GenericEdge::degenerate(int) const{
return
res
;
}
//------------------------------------------------------------------------
int
GenericEdge
::
minimumDrawSegments
()
const
{
...
...
@@ -171,17 +157,11 @@ int GenericEdge::minimumDrawSegments() const
return
CTX
::
instance
()
->
geom
.
numSubEdges
*
GEdge
::
minimumDrawSegments
();
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
LinearSeamEdge
::
LinearSeamEdge
(
GModel
*
m
,
int
num
,
GVertex
*
v1
,
GVertex
*
v2
)
:
GEdge
(
m
,
num
,
v1
,
v2
){
s0
=
0.
;
...
...
@@ -190,60 +170,50 @@ LinearSeamEdge::LinearSeamEdge(GModel *m, int num, GVertex *v1, GVertex *v2):GEd
first_der
.
normalize
();
}
//------------------------------------------------------------------------
LinearSeamEdge
::~
LinearSeamEdge
(){
}
//------------------------------------------------------------------------
Range
<
double
>
LinearSeamEdge
::
parBounds
(
int
i
)
const
{
return
Range
<
double
>
(
s0
,
s1
);
}
//------------------------------------------------------------------------
GPoint
LinearSeamEdge
::
point
(
double
par
)
const
{
SVector3
res
=
v0
->
xyz
()
+
par
*
first_der
;
return
GPoint
(
res
[
0
],
res
[
1
],
res
[
2
],
this
,
par
);
}
//------------------------------------------------------------------------
SVector3
LinearSeamEdge
::
firstDer
(
double
par
)
const
{
return
first_der
;
}
//------------------------------------------------------------------------
GEntity
::
GeomType
LinearSeamEdge
::
geomType
()
const
{
return
Line
;
}
//------------------------------------------------------------------------
double
LinearSeamEdge
::
curvature
(
double
par
)
const
{
return
0.
;
}
//------------------------------------------------------------------------
bool
LinearSeamEdge
::
is3D
()
const
{
return
false
;
}
//------------------------------------------------------------------------
bool
LinearSeamEdge
::
degenerate
(
int
)
const
{
return
false
;
}
//------------------------------------------------------------------------
GPoint
LinearSeamEdge
::
closestPoint
(
const
SPoint3
&
q
,
double
&
t
)
const
{
return
GEdge
::
closestPoint
(
q
,
t
);
}
//------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Geo/GenericFace.cpp
+
0
−
17
View file @
24040723
...
...
@@ -15,7 +15,6 @@
#include
<math.h>
//------------------------------------------------------------------------
GenericFace
::
ptrfunction_int_refstring
GenericFace
::
FaceGeomType
=
NULL
;
GenericFace
::
ptrfunction_int_refvector_refvector
GenericFace
::
FaceUVFromXYZ
=
NULL
;
...
...
@@ -30,7 +29,6 @@ GenericFace::ptrfunction_int_refvector_refvector_refvector GenericFace::FaceFirs
GenericFace
::
ptrfunction_int_refvector_refvector_refvector_refvector
GenericFace
::
FaceSecondDer
=
NULL
;
GenericFace
::
ptrfunction_int_refbool_refbool_refdouble_refdouble
GenericFace
::
FacePeriodicInfo
=
NULL
;
//------------------------------------------------------------------------
GenericFace
::
GenericFace
(
GModel
*
m
,
int
num
,
int
_native_id
)
:
GFace
(
m
,
num
),
id
(
_native_id
){
if
(
!
FaceParBounds
)
Msg
::
Fatal
(
"Genericface::ERROR: Callback FaceParBounds not set"
);
...
...
@@ -42,19 +40,16 @@ GenericFace::GenericFace(GModel *m, int num, int _native_id):GFace(m, num), id(_
computePeriodicity
();
}
//------------------------------------------------------------------------
GenericFace
::~
GenericFace
(){
}
//------------------------------------------------------------------------
Range
<
double
>
GenericFace
::
parBounds
(
int
i
)
const
{
if
(
i
==
0
)
return
Range
<
double
>
(
umin
,
umax
);
return
Range
<
double
>
(
vmin
,
vmax
);
}
//------------------------------------------------------------------------
SVector3
GenericFace
::
normal
(
const
SPoint2
&
param
)
const
{
vector
<
double
>
res
(
3
,
0.
);
...
...
@@ -66,7 +61,6 @@ SVector3 GenericFace::normal(const SPoint2 ¶m) const{
return
SVector3
(
res
[
0
],
res
[
1
],
res
[
2
]);
}
//------------------------------------------------------------------------
Pair
<
SVector3
,
SVector3
>
GenericFace
::
firstDer
(
const
SPoint2
&
param
)
const
{
if
(
!
FaceFirstDer
)
Msg
::
Fatal
(
"Genericface::ERROR: Callback FaceFirstDer not set"
);
...
...
@@ -80,7 +74,6 @@ Pair<SVector3,SVector3> GenericFace::firstDer(const SPoint2 ¶m) const{
SVector3
(
derv
[
0
],
derv
[
1
],
derv
[
2
]));
}
//------------------------------------------------------------------------
void
GenericFace
::
secondDer
(
const
SPoint2
&
param
,
SVector3
*
dudu
,
SVector3
*
dvdv
,
SVector3
*
dudv
)
const
{
vector
<
double
>
deruu
(
3
,
0.
);
...
...
@@ -97,7 +90,6 @@ void GenericFace::secondDer(const SPoint2 ¶m,SVector3 *dudu, SVector3 *dvdv,
return
;
}
//------------------------------------------------------------------------
GPoint
GenericFace
::
point
(
double
par1
,
double
par2
)
const
{
vector
<
double
>
uv
(
2
,
0.
);
...
...
@@ -116,7 +108,6 @@ GPoint GenericFace::point(double par1, double par2) const{
return
GPoint
(
xyz
[
0
],
xyz
[
1
],
xyz
[
2
],
this
,
pp
);
}
//------------------------------------------------------------------------
GPoint
GenericFace
::
closestPoint
(
const
SPoint3
&
qp
,
const
double
initialGuess
[
2
])
const
{
vector
<
double
>
uvres
(
2
,
0.
);
...
...
@@ -142,7 +133,6 @@ GPoint GenericFace::closestPoint(const SPoint3 &qp, const double initialGuess[2]
return
GPoint
(
xyzres
[
0
],
xyzres
[
1
],
xyzres
[
2
],
this
,
pp
);
}
//------------------------------------------------------------------------
SPoint2
GenericFace
::
parFromPoint
(
const
SPoint3
&
qp
,
bool
onSurface
)
const
{
vector
<
double
>
uvres
(
2
,
0.
);
...
...
@@ -168,7 +158,6 @@ SPoint2 GenericFace::parFromPoint(const SPoint3 &qp, bool onSurface) const{
return
SPoint2
(
uvres
[
0
],
uvres
[
1
]);
}
//------------------------------------------------------------------------
GEntity
::
GeomType
GenericFace
::
geomType
()
const
{
string
s
;
...
...
@@ -199,7 +188,6 @@ GEntity::GeomType GenericFace::geomType() const{
return
Unknown
;
}
//------------------------------------------------------------------------
double
GenericFace
::
curvatureMax
(
const
SPoint2
&
param
)
const
{
vector
<
double
>
dirMax
(
3
,
0.
);
...
...
@@ -213,7 +201,6 @@ double GenericFace::curvatureMax(const SPoint2 ¶m) const{
return
std
::
max
(
fabs
(
curvMax
),
fabs
(
curvMin
));
}
//------------------------------------------------------------------------
double
GenericFace
::
curvatures
(
const
SPoint2
&
_param
,
SVector3
*
_dirMax
,
SVector3
*
_dirMin
,
double
*
curvMax
,
double
*
curvMin
)
const
{
vector
<
double
>
param
(
2
,
0.
);
...
...
@@ -230,7 +217,6 @@ double GenericFace::curvatures(const SPoint2 &_param,SVector3 *_dirMax,SVector3
return
*
curvMax
;
}
//------------------------------------------------------------------------
bool
GenericFace
::
containsPoint
(
const
SPoint3
&
pt
)
const
{
bool
res
;
...
...
@@ -242,7 +228,6 @@ bool GenericFace::containsPoint(const SPoint3 &pt) const{
return
res
;
}
//------------------------------------------------------------------------
void
GenericFace
::
computePeriodicity
(){
if
(
!
FacePeriodicInfo
)
Msg
::
Fatal
(
"Genericface::ERROR: Callback FacePeriodicInfo not set"
);
...
...
@@ -252,7 +237,6 @@ void GenericFace::computePeriodicity(){
}
//------------------------------------------------------------------------
void
GenericFace
::
createLoops
(){
const
bool
debug
=
false
;
...
...
@@ -299,5 +283,4 @@ void GenericFace::createLoops(){
}
}
//------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Geo/GenericRegion.cpp
+
0
−
4
View file @
24040723
...
...
@@ -11,24 +11,20 @@
#include
"GenericFace.h"
#include
"GenericRegion.h"
//------------------------------------------------------------------------
GenericRegion
::
GenericRegion
(
GModel
*
m
,
int
num
,
int
_native_id
)
:
GRegion
(
m
,
num
),
id
(
_native_id
)
{
}
//------------------------------------------------------------------------
GenericRegion
::~
GenericRegion
()
{
}
//------------------------------------------------------------------------
GEntity
::
GeomType
GenericRegion
::
geomType
()
const
{
return
Unknown
;
}
//------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Geo/GenericVertex.cpp
+
0
−
7
View file @
24040723
...
...
@@ -12,12 +12,10 @@
#include
"GenericFace.h"
#include
<algorithm>
//------------------------------------------------------------------------
GenericVertex
::
ptrfunction_int_vector
GenericVertex
::
VertexXYZ
=
NULL
;
GenericVertex
::
ptrfunction_int_doubleptr_voidptr
GenericVertex
::
VertexMeshSize
=
NULL
;
//------------------------------------------------------------------------
GenericVertex
::
GenericVertex
(
GModel
*
m
,
int
num
,
int
_native_id
)
:
GVertex
(
m
,
num
),
id
(
_native_id
){
if
(
!
VertexXYZ
)
...
...
@@ -31,7 +29,6 @@ GenericVertex::GenericVertex(GModel *m, int num, int _native_id):GVertex(m, num)
_z
=
vec
[
2
];
}
//------------------------------------------------------------------------
GenericVertex
::
GenericVertex
(
GModel
*
m
,
int
num
,
int
_native_id
,
const
vector
<
double
>
&
vec
)
:
GVertex
(
m
,
num
),
id
(
_native_id
){
if
(
!
VertexXYZ
)
...
...
@@ -42,12 +39,10 @@ GenericVertex::GenericVertex(GModel *m, int num, int _native_id, const vector<do
_z
=
vec
[
2
];
}
//------------------------------------------------------------------------
GenericVertex
::~
GenericVertex
(){
}
//------------------------------------------------------------------------
SPoint2
GenericVertex
::
reparamOnFace
(
const
GFace
*
gf
,
int
dir
)
const
{
...
...
@@ -57,7 +52,6 @@ SPoint2 GenericVertex::reparamOnFace(const GFace *gf, int dir) const
}
//------------------------------------------------------------------------
void
GenericVertex
::
setPosition
(
GPoint
&
p
)
{
...
...
@@ -71,4 +65,3 @@ void GenericVertex::setPosition(GPoint &p)
}
}
//------------------------------------------------------------------------
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