From b10aa2d6031a807e0fd9fd7531208f606647ca01 Mon Sep 17 00:00:00 2001 From: rnc Date: Thu, 15 Nov 2012 13:11:17 +0000 Subject: [PATCH] Added a check on orientation input parameter --- src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx index 70f0ab20e..9b982e735 100644 --- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx @@ -2287,7 +2287,14 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR, int theOrientation, int thePattern) { SetErrorCode(KO); - + + if (theOrientation != 1 && + theOrientation != 2 && + theOrientation != 3) + { + SetErrorCode("theOrientation must be 1(=OXY), 2(=OYZ) or 3(=OZX)"); + return NULL; + } //Add a new object Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK); -- 2.39.2