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
4cde9956
Commit
4cde9956
authored
17 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
589f6156
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Geo/OCCEdge.h
+1
-1
1 addition, 1 deletion
Geo/OCCEdge.h
Geo/OCCFace.cpp
+6
-6
6 additions, 6 deletions
Geo/OCCFace.cpp
Geo/OCCRegion.h
+1
-1
1 addition, 1 deletion
Geo/OCCRegion.h
Geo/OCCVertex.cpp
+9
-9
9 additions, 9 deletions
Geo/OCCVertex.cpp
Geo/OCCVertex.h
+8
-20
8 additions, 20 deletions
Geo/OCCVertex.h
with
25 additions
and
37 deletions
Geo/OCCEdge.h
+
1
−
1
View file @
4cde9956
...
...
@@ -49,7 +49,7 @@ class OCCEdge : public GEdge {
virtual
double
curvature
(
double
par
)
const
;
virtual
SPoint2
reparamOnFace
(
GFace
*
face
,
double
epar
,
int
dir
)
const
;
ModelType
getNativeType
()
const
{
return
OpenCascadeModel
;
}
void
*
getNativePtr
()
const
{
return
(
void
*
)
&
c
;
}
void
*
getNativePtr
()
const
{
return
(
void
*
)
&
c
;
}
virtual
double
parFromPoint
(
const
SPoint3
&
pt
)
const
;
virtual
int
minimumMeshSegments
()
const
;
virtual
int
minimumDrawSegments
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Geo/OCCFace.cpp
+
6
−
6
View file @
4cde9956
// $Id: OCCFace.cpp,v 1.2
7
2008-0
1-30 15:27:41 remacl
e Exp $
// $Id: OCCFace.cpp,v 1.2
8
2008-0
2-03 08:54:28 geuzain
e Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -119,7 +119,7 @@ Pair<SVector3,SVector3> OCCFace::firstDer(const SPoint2 ¶m) const
{
gp_Pnt
pnt
;
gp_Vec
du
,
dv
;
occface
->
D1
(
param
.
x
(),
param
.
y
(),
pnt
,
du
,
dv
);
occface
->
D1
(
param
.
x
(),
param
.
y
(),
pnt
,
du
,
dv
);
return
Pair
<
SVector3
,
SVector3
>
(
SVector3
(
du
.
X
(),
du
.
Y
(),
du
.
Z
()),
SVector3
(
dv
.
X
(),
dv
.
Y
(),
dv
.
Z
()));
...
...
@@ -143,11 +143,11 @@ GPoint OCCFace::closestPoint(const SPoint3 & qp) const
}
double
pp
[
2
];
proj
.
LowerDistanceParameters
(
pp
[
0
],
pp
[
1
]);
proj
.
LowerDistanceParameters
(
pp
[
0
],
pp
[
1
]);
Msg
(
INFO
,
"projection lower distance parameters %g %g"
,
pp
[
0
],
pp
[
1
]);
if
((
pp
[
0
]
<
umin
||
umax
<
pp
[
0
])
||
(
pp
[
1
]
<
vmin
||
vmax
<
pp
[
1
])){
if
((
pp
[
0
]
<
umin
||
umax
<
pp
[
0
])
||
(
pp
[
1
]
<
vmin
||
vmax
<
pp
[
1
])){
Msg
(
GERROR
,
"Point projection is out of face bounds"
);
return
GPoint
(
0
,
0
);
}
...
...
@@ -175,8 +175,8 @@ SPoint2 OCCFace::parFromPoint(const SPoint3 &qp) const
Msg
(
GERROR
,
"OCC Project Point on Surface FAIL"
);
return
GFace
::
parFromPoint
(
qp
);
}
double
U
,
V
;
proj
.
LowerDistanceParameters
(
U
,
V
);
double
U
,
V
;
proj
.
LowerDistanceParameters
(
U
,
V
);
return
SPoint2
(
U
,
V
);
}
...
...
This diff is collapsed.
Click to expand it.
Geo/OCCRegion.h
+
1
−
1
View file @
4cde9956
...
...
@@ -28,7 +28,7 @@ class OCCRegion : public GRegion {
protected:
TopoDS_Solid
s
;
public:
OCCRegion
(
GModel
*
m
,
TopoDS_Solid
s
,
int
num
,
TopTools_IndexedMapOfShape
&
fmap
);
OCCRegion
(
GModel
*
m
,
TopoDS_Solid
s
,
int
num
,
TopTools_IndexedMapOfShape
&
fmap
);
virtual
~
OCCRegion
()
{}
virtual
GeomType
geomType
()
const
;
ModelType
getNativeType
()
const
{
return
OpenCascadeModel
;
}
...
...
This diff is collapsed.
Click to expand it.
Geo/OCCVertex.cpp
+
9
−
9
View file @
4cde9956
// $Id: OCCVertex.cpp,v 1.1
2
2008-0
1-20 10:10:41
geuzaine Exp $
// $Id: OCCVertex.cpp,v 1.1
3
2008-0
2-03 08:54:28
geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -30,12 +30,12 @@ double max_surf_curvature(const GVertex *gv, double x, double y, double z,
const
GEdge
*
_myGEdge
)
{
std
::
list
<
GFace
*>
faces
=
_myGEdge
->
faces
();
std
::
list
<
GFace
*>::
iterator
it
=
faces
.
begin
();
std
::
list
<
GFace
*>::
iterator
it
=
faces
.
begin
();
double
curv
=
1.e-22
;
while
(
it
!=
faces
.
end
()){
SPoint2
par
=
gv
->
reparamOnFace
((
*
it
),
1
);
SPoint2
par
=
gv
->
reparamOnFace
((
*
it
),
1
);
double
cc
=
(
*
it
)
->
curvature
(
par
);
if
(
cc
>
0
)
curv
=
std
::
max
(
curv
,
cc
);
if
(
cc
>
0
)
curv
=
std
::
max
(
curv
,
cc
);
++
it
;
}
return
curv
;
...
...
@@ -45,7 +45,7 @@ double OCCVertex::max_curvature_of_surfaces() const
{
if
(
max_curvature
<
0
){
for
(
std
::
list
<
GEdge
*>::
const_iterator
it
=
l_edges
.
begin
();
it
!=
l_edges
.
end
();
++
it
){
it
!=
l_edges
.
end
();
++
it
){
max_curvature
=
std
::
max
(
max_surf_curvature
(
this
,
x
(),
y
(),
z
(),
*
it
),
max_curvature
);
}
...
...
@@ -67,9 +67,9 @@ SPoint2 OCCVertex::reparamOnFace(GFace *gf, int dir) const
double
s1
,
s0
;
Handle
(
Geom2d_Curve
)
curve2d
=
BRep_Tool
::
CurveOnSurface
(
*
c
,
*
s
,
s0
,
s1
);
if
((
*
it
)
->
getBeginVertex
()
==
this
)
return
(
*
it
)
->
reparamOnFace
(
gf
,
s0
,
dir
);
return
(
*
it
)
->
reparamOnFace
(
gf
,
s0
,
dir
);
else
if
((
*
it
)
->
getEndVertex
()
==
this
)
return
(
*
it
)
->
reparamOnFace
(
gf
,
s1
,
dir
);
return
(
*
it
)
->
reparamOnFace
(
gf
,
s1
,
dir
);
}
}
++
it
;
...
...
@@ -83,9 +83,9 @@ SPoint2 OCCVertex::reparamOnFace(GFace *gf, int dir) const
double
s1
,
s0
;
Handle
(
Geom2d_Curve
)
curve2d
=
BRep_Tool
::
CurveOnSurface
(
*
c
,
*
s
,
s0
,
s1
);
if
((
*
it
)
->
getBeginVertex
()
==
this
)
return
(
*
it
)
->
reparamOnFace
(
gf
,
s0
,
dir
);
return
(
*
it
)
->
reparamOnFace
(
gf
,
s0
,
dir
);
else
if
((
*
it
)
->
getEndVertex
()
==
this
)
return
(
*
it
)
->
reparamOnFace
(
gf
,
s1
,
dir
);
return
(
*
it
)
->
reparamOnFace
(
gf
,
s1
,
dir
);
}
++
it
;
}
...
...
This diff is collapsed.
Click to expand it.
Geo/OCCVertex.h
+
8
−
20
View file @
4cde9956
...
...
@@ -30,37 +30,26 @@
class
OCCVertex
:
public
GVertex
{
protected:
TopoDS_Vertex
v
;
double
_x
,
_y
,
_z
;
double
_x
,
_y
,
_z
;
mutable
double
max_curvature
;
double
max_curvature_of_surfaces
()
const
;
public:
OCCVertex
(
GModel
*
m
,
int
num
,
TopoDS_Vertex
_v
)
:
GVertex
(
m
,
num
),
v
(
_v
)
{
max_curvature
=
-
1
;
gp_Pnt
pnt
=
BRep_Tool
::
Pnt
(
v
);
gp_Pnt
pnt
=
BRep_Tool
::
Pnt
(
v
);
_x
=
pnt
.
X
();
_y
=
pnt
.
Y
();
_z
=
pnt
.
Z
();
mesh_vertices
.
push_back
(
new
MVertex
(
x
(),
y
(),
z
(),
this
));
}
virtual
~
OCCVertex
()
{}
virtual
GPoint
point
()
const
virtual
GPoint
point
()
const
{
return
GPoint
(
x
(),
y
(),
z
());
}
virtual
double
x
()
const
{
return
_x
;
}
virtual
double
y
()
const
{
return
_y
;
}
virtual
double
z
()
const
{
return
_z
;
}
virtual
void
setPosition
(
GPoint
&
p
)
{
return
GPoint
(
x
(),
y
(),
z
());
}
virtual
double
x
()
const
{
return
_x
;
}
virtual
double
y
()
const
{
return
_y
;
}
virtual
double
z
()
const
{
return
_z
;
}
virtual
void
setPosition
(
GPoint
&
p
){
_x
=
p
.
x
();
_y
=
p
.
y
();
_z
=
p
.
z
();
...
...
@@ -68,9 +57,8 @@ class OCCVertex : public GVertex {
mesh_vertices
.
clear
();
mesh_vertices
.
push_back
(
new
MVertex
(
x
(),
y
(),
z
(),
this
));
}
ModelType
getNativeType
()
const
{
return
OpenCascadeModel
;
}
void
*
getNativePtr
()
const
{
return
(
void
*
)
&
v
;
}
void
*
getNativePtr
()
const
{
return
(
void
*
)
&
v
;
}
virtual
SPoint2
reparamOnFace
(
GFace
*
gf
,
int
)
const
;
};
...
...
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