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
Analyze
Contributor 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
gmsh
gmsh
Commits
575da2aa
Commit
575da2aa
authored
2 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
use relative paths w.r.t. script file directory using @__DIR__
parent
d86ec45a
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
tutorials/julia/t20.jl
+2
-3
2 additions, 3 deletions
tutorials/julia/t20.jl
tutorials/julia/t4.jl
+5
-5
5 additions, 5 deletions
tutorials/julia/t4.jl
tutorials/julia/t7.jl
+1
-1
1 addition, 1 deletion
tutorials/julia/t7.jl
tutorials/julia/t9.jl
+1
-1
1 addition, 1 deletion
tutorials/julia/t9.jl
with
9 additions
and
10 deletions
tutorials/julia/t20.jl
+
2
−
3
View file @
575da2aa
...
@@ -17,7 +17,7 @@ gmsh.model.add("t20")
...
@@ -17,7 +17,7 @@ gmsh.model.add("t20")
# Load a STEP file (using `importShapes' instead of `merge' allows to directly
# Load a STEP file (using `importShapes' instead of `merge' allows to directly
# retrieve the tags of the highest dimensional imported entities):
# retrieve the tags of the highest dimensional imported entities):
path
=
abspath
(
joinpath
(
".."
,
"t20_data.step"
))
path
=
abspath
(
joinpath
(
@__DIR__
,
".."
,
"t20_data.step"
))
v
=
gmsh
.
model
.
occ
.
importShapes
(
path
)
v
=
gmsh
.
model
.
occ
.
importShapes
(
path
)
# If we had specified
# If we had specified
...
@@ -91,13 +91,12 @@ if surf
...
@@ -91,13 +91,12 @@ if surf
# won't modify any OpenCASCADE entities later on):
# won't modify any OpenCASCADE entities later on):
dels
=
gmsh
.
model
.
getEntities
(
2
)
dels
=
gmsh
.
model
.
getEntities
(
2
)
for
e
in
s
for
e
in
s
deleteat!
(
dels
,
findall
(
x
->
x
==
e
,
dels
))
deleteat!
(
dels
,
findall
(
x
->
x
==
e
,
dels
))
end
end
gmsh
.
model
.
removeEntities
(
gmsh
.
model
.
getEntities
(
3
))
gmsh
.
model
.
removeEntities
(
gmsh
.
model
.
getEntities
(
3
))
gmsh
.
model
.
removeEntities
(
dels
)
gmsh
.
model
.
removeEntities
(
dels
)
gmsh
.
model
.
removeEntities
(
gmsh
.
model
.
getEntities
(
1
))
gmsh
.
model
.
removeEntities
(
gmsh
.
model
.
getEntities
(
1
))
gmsh
.
model
.
removeEntities
(
gmsh
.
model
.
getEntities
(
0
))
gmsh
.
model
.
removeEntities
(
gmsh
.
model
.
getEntities
(
0
))
end
end
# Finally, let's specify a global mesh size and mesh the partitioned model:
# Finally, let's specify a global mesh size and mesh the partitioned model:
...
...
This diff is collapsed.
Click to expand it.
tutorials/julia/t4.jl
+
5
−
5
View file @
575da2aa
...
@@ -120,22 +120,22 @@ gmsh.view.addListDataString(v, [0, 0.11, 0], ["Hole"],
...
@@ -120,22 +120,22 @@ gmsh.view.addListDataString(v, [0, 0.11, 0], ["Hole"],
# a `@' symbol in the form `widthxheight' (if one of `width' or `height' is
# a `@' symbol in the form `widthxheight' (if one of `width' or `height' is
# zero, natural scaling is used; if both are zero, original image dimensions in
# zero, natural scaling is used; if both are zero, original image dimensions in
# pixels are used):
# pixels are used):
gmsh
.
view
.
addListDataString
(
v
,
[
0
,
0.09
,
0
],
[
"file://../t4_image.png@0.01x0"
],
png
=
abspath
(
joinpath
(
@__DIR__
,
".."
,
"t4_image.png"
))
gmsh
.
view
.
addListDataString
(
v
,
[
0
,
0.09
,
0
],
[
"file://"
*
png
*
"@0.01x0"
],
[
"Align"
,
"Center"
])
[
"Align"
,
"Center"
])
# The 3D orientation of the image can be specified by proving the direction
# The 3D orientation of the image can be specified by proving the direction
# of the bottom and left edge of the image in model space:
# of the bottom and left edge of the image in model space:
gmsh
.
view
.
addListDataString
(
v
,
[
-
0.01
,
0.09
,
0
],
gmsh
.
view
.
addListDataString
(
v
,
[
-
0.01
,
0.09
,
0
],
[
"file://
../t4_image.png
@0.01x0,0,0,1,0,1,0"
])
[
"file://
"
*
png
*
"
@0.01x0,0,0,1,0,1,0"
])
# The image can also be drawn in "billboard" mode, i.e. always parallel to
# The image can also be drawn in "billboard" mode, i.e. always parallel to
# the camera, by using the `#' symbol:
# the camera, by using the `#' symbol:
gmsh
.
view
.
addListDataString
(
v
,
[
0
,
0.12
,
0
],
gmsh
.
view
.
addListDataString
(
v
,
[
0
,
0.12
,
0
],
[
"file://"
*
png
*
"@0.01x0#"
],
[
"file://../t4_image.png@0.01x0#"
],
[
"Align"
,
"Center"
])
[
"Align"
,
"Center"
])
# The size of 2D annotations is given directly in pixels:
# The size of 2D annotations is given directly in pixels:
gmsh
.
view
.
addListDataString
(
v
,
[
150
,
-
7
],
[
"file://
../t4_image.png
@20x0"
])
gmsh
.
view
.
addListDataString
(
v
,
[
150
,
-
7
],
[
"file://
"
*
png
*
"
@20x0"
])
# These annotations are handled by a list-based post-processing view. For
# These annotations are handled by a list-based post-processing view. For
# large post-processing datasets, that contain actual field values defined on
# large post-processing datasets, that contain actual field values defined on
...
...
This diff is collapsed.
Click to expand it.
tutorials/julia/t7.jl
+
1
−
1
View file @
575da2aa
...
@@ -14,7 +14,7 @@ import gmsh
...
@@ -14,7 +14,7 @@ import gmsh
gmsh
.
initialize
()
gmsh
.
initialize
()
# Merge a list-based post-processing view containing the target mesh sizes:
# Merge a list-based post-processing view containing the target mesh sizes:
path
=
abspath
(
joinpath
(
".."
,
"t7_bgmesh.pos"
))
path
=
abspath
(
joinpath
(
@__DIR__
,
".."
,
"t7_bgmesh.pos"
))
gmsh
.
merge
(
path
)
gmsh
.
merge
(
path
)
# If the post-processing view was model-based instead of list-based (i.e. if it
# If the post-processing view was model-based instead of list-based (i.e. if it
...
...
This diff is collapsed.
Click to expand it.
tutorials/julia/t9.jl
+
1
−
1
View file @
575da2aa
...
@@ -20,7 +20,7 @@ import gmsh
...
@@ -20,7 +20,7 @@ import gmsh
gmsh
.
initialize
()
gmsh
.
initialize
()
# Let us for example include a three-dimensional scalar view:
# Let us for example include a three-dimensional scalar view:
path
=
abspath
(
joinpath
(
".."
,
"view3.pos"
))
path
=
abspath
(
joinpath
(
@__DIR__
,
".."
,
"view3.pos"
))
gmsh
.
merge
(
path
)
gmsh
.
merge
(
path
)
v
=
gmsh
.
view
.
getTags
()
v
=
gmsh
.
view
.
getTags
()
...
...
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