From fab1af115a6197d8d31f9746d33436fd99ce5851 Mon Sep 17 00:00:00 2001 From: acrovato <39187559+acrovato@users.noreply.github.com> Date: Wed, 20 Jul 2022 12:27:24 +0200 Subject: [PATCH] Disable all views except first one in gmsh --- tbox/viewer.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tbox/viewer.py b/tbox/viewer.py index ddabbc9..c5f4269 100644 --- a/tbox/viewer.py +++ b/tbox/viewer.py @@ -2,13 +2,13 @@ # -*- coding: utf-8 -*- # Copyright 2020 University of Liège -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,10 +35,13 @@ class GUI: if not os.path.isfile(optfile): self.defopt(optfile) cmd="gmsh %s %s %s" % (mshfile, posfile, optfile) - os.system(cmd) + os.system(cmd) def defopt(self,fname='defaultflowOpt.opt'): f = open(fname,'w') f.write("General.Orthographic = 0;\n") + f.write('View[0].IntervalsType = 3;\n') + f.write('For i In {1:PostProcessing.NbViews-1}\n') + f.write(' View[i].Visible = 0;\n') + f.write('EndFor\n') f.close() - -- GitLab