Skip to content
Snippets Groups Projects
Commit 0dd85feb authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

No commit message

No commit message
parent 6c10be5b
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* Gmsh tutorial 4 * Gmsh tutorial 4
* *
* Built-in functions, holes, strings, mesh color * Built-in functions, surface holes, annotations, mesh colors
* *
*********************************************************************/ *********************************************************************/
...@@ -76,7 +76,7 @@ Plane Surface(24) = {23,21}; ...@@ -76,7 +76,7 @@ Plane Surface(24) = {23,21};
// boundaries of the holes. // boundaries of the holes.
// Finally, we can add some comments by embedding a post-processing view // Finally, we can add some comments by embedding a post-processing view
// containing some strings, and change the color of some mesh entities: // containing some strings:
View "comments" { View "comments" {
// Add a text string in window coordinates, 10 pixels from the left and 10 // Add a text string in window coordinates, 10 pixels from the left and 10
...@@ -106,10 +106,13 @@ View "comments" { ...@@ -106,10 +106,13 @@ View "comments" {
}; };
// Views and geometrical entities can be made to respond to double-click events: // Views and geometrical entities can be made to respond to double-click events:
View[0].DoubleClickedCommand = "Printf('View[0] has been double-clicked!');"; View[0].DoubleClickedCommand = "Printf('View[0] has been double-clicked!');";
Geometry.DoubleClickedLineCommand = "Printf('Line %g has been double-clicked!', Geometry.DoubleClickedLineCommand = "Printf('Line %g has been double-clicked!',
Geometry.DoubleClickedEntityTag);"; Geometry.DoubleClickedEntityTag);";
// We can also change the color of some mesh entities:
Color Grey50{ Surface{ 22 }; } Color Grey50{ Surface{ 22 }; }
Color Purple{ Surface{ 24 }; } Color Purple{ Surface{ 24 }; }
Color Red{ Line{ 1:14 }; } Color Red{ Line{ 1:14 }; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment