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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
792f3c49
Commit
792f3c49
authored
13 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
oups
parent
045a3b44
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/gmshLevelset.cpp
+36
-9
36 additions, 9 deletions
Geo/gmshLevelset.cpp
with
36 additions
and
9 deletions
Geo/gmshLevelset.cpp
+
36
−
9
View file @
792f3c49
...
@@ -499,15 +499,42 @@ double gLevelsetMathEval::operator() (const double x, const double y, const doub
...
@@ -499,15 +499,42 @@ double gLevelsetMathEval::operator() (const double x, const double y, const doub
gLevelsetDistGeom
::
gLevelsetDistGeom
(
std
::
string
name
,
int
tag
)
:
gLevelsetPrimitive
(
tag
)
{
gLevelsetDistGeom
::
gLevelsetDistGeom
(
std
::
string
name
,
int
tag
)
:
gLevelsetPrimitive
(
tag
)
{
_model
=
new
GModel
();
_model
=
new
GModel
();
_model
->
load
(
name
);
_model
->
load
(
name
);
for
(
GModel
::
fiter
fit
=
_model
->
firstFace
();
fit
!=
_model
->
lastFace
();
fit
++
){
// std::vector<double> distances;
if
((
*
it
)
->
geomType
()
==
GEntity
::
DiscreteSurface
){
// distances.clear();
// for (GModel::fiter fit = _model->firstFace(); fit != _model->lastFace(); fit++){
}
// if((*it)->geomType() == GEntity::DiscreteSurface){
else
{
// for(unsigned int k = 0; k < fit->getNumMeshElements(); k++){
for
(
int
i
=
0
;
i
<
(
*
fit
)
->
stl_triangles
.
size
();
i
+=
3
){
// std::vector<double> iDistances;
}
// std::vector<SPoint3> iClosePts;
}
// std::vector<double> iDistancesE;
}
// MElement *e = fit->getMeshElement(k);
// MVertex *v1 = e->getVertex(0);
// MVertex *v2 = e->getVertex(1);
// SPoint3 p1(v1->x(), v1->y(), v1->z());
// SPoint3 p2(v2->x(), v2->y(), v2->z());
// if((e->getNumVertices() == 2 && order==1) || (e->getNumVertices() == 3 && order==2)){
// signedDistancesPointsLine(iDistances, iClosePts, pts, p1,p2);
// }
// else if((e->getNumVertices() == 3 && order == 1) || (e->getNumVertices() == 6 && order==2)){
// MVertex *v3 = e->getVertex(2);
// SPoint3 p3 (v3->x(),v3->y(),v3->z());
// signedDistancesPointsTriangle(iDistances, iClosePts, pts, p1, p2, p3);
// }
// for (unsigned int kk = 0; kk< pts.size(); kk++) {
// if (std::abs(iDistances[kk]) < distances[kk]){
// distances[kk] = std::abs(iDistances[kk]);
// MVertex *v = pt2Vertex[kk];
// _distance_map[v] = distances[kk];
// }
// }
// }
// }
// else{
// //look in utils_api_demos maincartesian
// // for (int i = 0; i < (*fit)->stl_triangles.size(); i += 3){
// // }
// }
// }
}
}
double
gLevelsetDistGeom
::
operator
()
(
const
double
x
,
const
double
y
,
const
double
z
)
const
{
double
gLevelsetDistGeom
::
operator
()
(
const
double
x
,
const
double
y
,
const
double
z
)
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