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
e1025c72
"README.txt" did not exist on "29021c584925fa692cdb6611a23f98e11442580f"
Commit
e1025c72
authored
22 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
add example+explanation for MergeWithBoundingBox
parent
ca019abf
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
benchmarks/misc/low_memory_animation.geo
+53
-0
53 additions, 0 deletions
benchmarks/misc/low_memory_animation.geo
with
53 additions
and
0 deletions
benchmarks/misc/low_memory_animation.geo
0 → 100644
+
53
−
0
View file @
e1025c72
// Define some general options
General
.
Trackball
=
0
;
// use Euler angles
General
.
RotationX
=
30
;
General
.
RotationY
=
10
;
General
.
RotationZ
=
-
15
;
// One can use View.XXX instead of View[YYY].XXX to define general
// View options!
View
.
ShowElement
=
1
;
View
.
ColorTable
=
{
Red
,
Green
,
Blue
};
// Let's load the views one by one:
For
i
In
{
0
:
1000
}
// we have 1001 views
If
(
!
i
)
// we force the bounding box to be the one of the first view:
MergeWithBoundingBox
"view0.pos"
;
EndIf
If
(
i
)
// we merge the other views using the same bounding box as the
// first one:
Merge
Sprintf
(
"view%g.pos"
,
i
);
EndIf
Draw
;
Print
Sprintf
(
"out%g.jpeg"
,
i
);
// and we delete the view:
Delete
View
[
0
];
EndFor
// Why do we have to play such a game with the bounding box?
// If you don't load a geometry or a mesh at the same time as the
// views, the bounding box is only computed at the end of the loading
// of the main model file (the .geo). This is because a view should
// normally NOT affect the bounding box of a scene, except if the .geo
// file is indeed a view... So, without the MergeWithBoundingBox, the
// bounding box is indeed undefined (well, set to some stupid default
// value) when we want to draw our views (since this happens before
// the main file (the script) is completely read)...
// One solution would be to define dummy geometry points in the
// script. This is not general since we may not know beforehand the
// bounding box of the view. The correct way to handle this is to use
// MergeWithBounding box, which forces the computation of the bounding
// box.
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