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
4354c388
Commit
4354c388
authored
16 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
canevas for edge constrain
parent
199b821f
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/GModelIO_OCC.cpp
+22
-7
22 additions, 7 deletions
Geo/GModelIO_OCC.cpp
with
22 additions
and
7 deletions
Geo/GModelIO_OCC.cpp
+
22
−
7
View file @
4354c388
// $Id: GModelIO_OCC.cpp,v 1.3
5
2008-0
6-30
1
7
:4
2:49
geuzaine Exp $
// $Id: GModelIO_OCC.cpp,v 1.3
6
2008-0
7-01
1
2
:4
6:08
geuzaine Exp $
//
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -488,6 +488,7 @@ int GModel::importOCCShape(const void *shape, const void *options)
...
@@ -488,6 +488,7 @@ int GModel::importOCCShape(const void *shape, const void *options)
_occ_internals
->
buildGModel
(
this
);
_occ_internals
->
buildGModel
(
this
);
snapVertices
();
snapVertices
();
SetBoundingBox
();
SetBoundingBox
();
if
(
!
options
)
return
1
;
if
(
!
options
)
return
1
;
#if defined(HAVE_OCC_MESH_CONSTRAINTS)
#if defined(HAVE_OCC_MESH_CONSTRAINTS)
...
@@ -498,12 +499,26 @@ int GModel::importOCCShape(const void *shape, const void *options)
...
@@ -498,12 +499,26 @@ int GModel::importOCCShape(const void *shape, const void *options)
// iterate on all the edges of the model and set constraints (if
// iterate on all the edges of the model and set constraints (if
// any)
// any)
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
++
it
){
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
++
it
){
TopoDS_Edge
*
edge
=
(
*
it
)
->
getNativePtr
();
TopoDS_Shape
*
shape
=
(
TopoDS_Shape
*
)(
*
it
)
->
getNativePtr
();
try
{
if
(
ecmap
.
IsBound
(
*
shape
))
{
MeshGmsh_EdgeConstrain
&
ec
=
ecmap
.
Find
(
*
edge
);
Msg
::
Debug
(
"Got meshing contraints for edge %d"
,
(
*
it
)
->
tag
());
printf
(
"got edge constraints
\n
"
);
const
MeshGmsh_EdgeConstrain
&
ec
(
ecmap
.
Find
(
*
shape
));
}
if
(
ec
.
IsMeshImposed
()){
catch
(...){
TColStd_SequenceOfInteger
num
;
ec
.
GetNodesNumber
(
num
);
TColStd_SequenceOfReal
par
;
ec
.
GetParameters
(
par
);
int
n
=
num
.
Length
();
if
(
par
.
Length
()
!=
n
){
Msg
::
Error
(
"Wrong number of parameters in edge constraint: %d != %d"
,
num
.
Length
(),
par
.
Length
());
}
else
{
for
(
int
i
=
0
;
i
<
n
;
i
++
){
printf
(
"node %d param %g
\n
"
,
num
.
Value
(
i
),
par
.
Value
(
i
));
}
}
}
}
}
}
}
#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