From: jfa Date: Fri, 3 Aug 2012 13:38:37 +0000 (+0000) Subject: IMP 0021537: [CEA 554] Add behaviour in GetAngle and GetAngleRadians. X-Git-Tag: V6_6_0a1~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3d2b8673518b2d9ca5252d1befb3227e001ebedf;p=modules%2Fgeom.git IMP 0021537: [CEA 554] Add behaviour in GetAngle and GetAngleRadians. --- diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 73800fb7f..98abba29c 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -2111,6 +2111,11 @@ Standard_Real GEOMImpl_IMeasureOperations::GetAngleBtwVectors (Handle(GEOM_Objec if (theVec1.IsNull() || theVec2.IsNull()) return anAngle; + if (theVec1->GetType() != GEOM_VECTOR || theVec2->GetType() != GEOM_VECTOR) { + SetErrorCode("Two vectors must be given"); + return anAngle; + } + Handle(GEOM_Function) aRefVec1 = theVec1->GetLastFunction(); Handle(GEOM_Function) aRefVec2 = theVec2->GetLastFunction(); if (aRefVec1.IsNull() || aRefVec2.IsNull())