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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
eb1468d5
Commit
eb1468d5
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pp
parent
2a69e34f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/OCCFace.cpp
+7
-12
7 additions, 12 deletions
Geo/OCCFace.cpp
with
7 additions
and
12 deletions
Geo/OCCFace.cpp
+
7
−
12
View file @
eb1468d5
...
@@ -116,8 +116,6 @@ void OCCFace::setup()
...
@@ -116,8 +116,6 @@ void OCCFace::setup()
if
(
_periodic
[
0
])
_period
[
0
]
=
surface
.
UPeriod
();
if
(
_periodic
[
0
])
_period
[
0
]
=
surface
.
UPeriod
();
if
(
_periodic
[
1
])
_period
[
1
]
=
surface
.
VPeriod
();
if
(
_periodic
[
1
])
_period
[
1
]
=
surface
.
VPeriod
();
ShapeAnalysis
::
GetFaceUVBounds
(
s
,
umin
,
umax
,
vmin
,
vmax
);
ShapeAnalysis
::
GetFaceUVBounds
(
s
,
umin
,
umax
,
vmin
,
vmax
);
Msg
::
Debug
(
"OCC Face %d with %d parameter bounds (%g,%g)(%g,%g)"
,
Msg
::
Debug
(
"OCC Face %d with %d parameter bounds (%g,%g)(%g,%g)"
,
tag
(),
l_edges
.
size
(),
umin
,
umax
,
vmin
,
vmax
);
tag
(),
l_edges
.
size
(),
umin
,
umax
,
vmin
,
vmax
);
...
@@ -405,7 +403,6 @@ bool OCCFace::containsPoint(const SPoint3 &pt) const
...
@@ -405,7 +403,6 @@ bool OCCFace::containsPoint(const SPoint3 &pt) const
bool
OCCFace
::
buildSTLTriangulation
(
bool
force
)
bool
OCCFace
::
buildSTLTriangulation
(
bool
force
)
{
{
if
(
stl_triangles
.
size
()){
if
(
stl_triangles
.
size
()){
if
(
force
){
if
(
force
){
stl_vertices
.
clear
();
stl_vertices
.
clear
();
...
@@ -455,7 +452,6 @@ bool OCCFace::buildSTLTriangulation(bool force)
...
@@ -455,7 +452,6 @@ bool OCCFace::buildSTLTriangulation(bool force)
return
true
;
return
true
;
}
}
bool
OCCFace
::
isSphere
(
double
&
radius
,
SPoint3
&
center
)
const
bool
OCCFace
::
isSphere
(
double
&
radius
,
SPoint3
&
center
)
const
{
{
switch
(
geomType
()){
switch
(
geomType
()){
...
@@ -470,11 +466,12 @@ bool OCCFace::isSphere (double &radius, SPoint3 ¢er) const
...
@@ -470,11 +466,12 @@ bool OCCFace::isSphere (double &radius, SPoint3 ¢er) const
}
}
}
}
bool
OCCFace
::
containsParam
(
const
SPoint2
&
pt
)
{
bool
OCCFace
::
containsParam
(
const
SPoint2
&
pt
)
{
// return GFace::containsParam(pt);
// return GFace::containsParam(pt);
if
(
!
buildSTLTriangulation
(
false
)
)
{
if
(
!
buildSTLTriangulation
(
false
)
)
{
Msg
::
Warning
(
"Inacurate computation in OCCFace::containsParam"
);
Msg
::
Warning
(
"Inacurate computation in OCCFace::containsParam"
);
return
GFace
::
containsParam
(
pt
);
return
GFace
::
containsParam
(
pt
);
}
}
// FILE *F = fopen("HOP.pos","w");
// FILE *F = fopen("HOP.pos","w");
// fprintf(F,"View \" \"{\n");
// fprintf(F,"View \" \"{\n");
...
@@ -482,11 +479,11 @@ bool OCCFace::containsParam(const SPoint2 &pt) {
...
@@ -482,11 +479,11 @@ bool OCCFace::containsParam(const SPoint2 &pt) {
SPoint2
mine
=
pt
;
SPoint2
mine
=
pt
;
// bool ok = false;
// bool ok = false;
for
(
unsigned
int
i
=
0
;
i
<
stl_triangles
.
size
();
i
+=
3
){
for
(
unsigned
int
i
=
0
;
i
<
stl_triangles
.
size
();
i
+=
3
){
SPoint2
gp1
=
stl_vertices
[
stl_triangles
[
i
]];
SPoint2
gp1
=
stl_vertices
[
stl_triangles
[
i
]];
SPoint2
gp2
=
stl_vertices
[
stl_triangles
[
i
+
1
]];
SPoint2
gp2
=
stl_vertices
[
stl_triangles
[
i
+
1
]];
SPoint2
gp3
=
stl_vertices
[
stl_triangles
[
i
+
2
]];
SPoint2
gp3
=
stl_vertices
[
stl_triangles
[
i
+
2
]];
double
s1
=
robustPredicates
::
orient2d
(
gp1
,
gp2
,
mine
);
double
s1
=
robustPredicates
::
orient2d
(
gp1
,
gp2
,
mine
);
double
s2
=
robustPredicates
::
orient2d
(
gp2
,
gp3
,
mine
);
double
s2
=
robustPredicates
::
orient2d
(
gp2
,
gp3
,
mine
);
...
@@ -496,7 +493,7 @@ bool OCCFace::containsParam(const SPoint2 &pt) {
...
@@ -496,7 +493,7 @@ bool OCCFace::containsParam(const SPoint2 &pt) {
gp1.x(),gp1.y(),0.0,
gp1.x(),gp1.y(),0.0,
gp2.x(),gp2.y(),0.0,
gp2.x(),gp2.y(),0.0,
gp3.x(),gp3.y(),0.0);
gp3.x(),gp3.y(),0.0);
printf("%g %g %g\n",s1,s2,s3);
printf("%g %g %g\n",s1,s2,s3);
*/
*/
if
(
s1
*
s2
>=
0
&&
s1
*
s3
>=
0
){
if
(
s1
*
s2
>=
0
&&
s1
*
s3
>=
0
){
...
@@ -509,8 +506,6 @@ bool OCCFace::containsParam(const SPoint2 &pt) {
...
@@ -509,8 +506,6 @@ bool OCCFace::containsParam(const SPoint2 &pt) {
// fclose(F);
// fclose(F);
// return ok;
// return ok;
return
false
;
return
false
;
}
}
#endif
#endif
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