From 430052e907156573afd1d880805853719c930b8c Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 29 Dec 2004 07:28:57 +0000
Subject: [PATCH] *** empty log message ***

---
 demos/multislice.script | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/demos/multislice.script b/demos/multislice.script
index 40fd08336e..4a59ff0b5a 100644
--- a/demos/multislice.script
+++ b/demos/multislice.script
@@ -12,7 +12,7 @@ xmin = View[0].MinX; xmax = View[0].MaxX;
 ymin = View[0].MinY; ymax = View[0].MaxY;
 zmin = View[0].MinZ; zmax = View[0].MaxZ;
 
-If(xslices)
+If(xslices && xmin != xmax)
   For x In {xmin : xmax : (xmax-xmin) / (xslices > 1 ? (xslices-1) : 0.1)}
     If(!regular)
       Plugin(CutPlane).A = -1 ; Plugin(CutPlane).B = 0 ; Plugin(CutPlane).C = 0 ; 
@@ -27,7 +27,7 @@ If(xslices)
   EndFor
 EndIf
 
-If(yslices)
+If(yslices && ymin != ymax)
   For y In {ymin : ymax : (ymax-ymin) / (yslices > 1 ? (yslices-1) : 0.1)}
     If(!regular)
       Plugin(CutPlane).A = 0 ; Plugin(CutPlane).B = -1 ; Plugin(CutPlane).C = 0 ; 
@@ -42,7 +42,7 @@ If(yslices)
   EndFor
 EndIf
 
-If(zslices)
+If(zslices && zmin != zmax)
   For z In {zmin : zmax : (zmax-zmin) / (zslices > 1 ? (zslices-1) : 0.1)}
     If(!regular)
       Plugin(CutPlane).A = 0 ; Plugin(CutPlane).B = 0 ; Plugin(CutPlane).C = -1 ; 
-- 
GitLab