X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDRO_tests%2FTestShape.cxx;h=3cf4ea201cb6c14099f32aba13c8102ea212c56d;hb=71ba58001e1084f0995fff43bf5e4643b153e5e0;hp=106ee9b579620d81a4e8cda108dc0e31c32cd714;hpb=07ccf1206abd36c104230ae2051110e8e2bf27c0;p=modules%2Fhydro.git diff --git a/src/HYDRO_tests/TestShape.cxx b/src/HYDRO_tests/TestShape.cxx index 106ee9b5..3cf4ea20 100644 --- a/src/HYDRO_tests/TestShape.cxx +++ b/src/HYDRO_tests/TestShape.cxx @@ -1,3 +1,20 @@ +// Copyright (C) 2014-2015 EDF-R&D +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include #include @@ -8,6 +25,7 @@ #include #include #include +#include TopoDS_Edge Edge( const QList& theXYList, bool isClosed ) { @@ -41,3 +59,10 @@ TopoDS_Face Face( const QList& theXYList ) { return BRepBuilderAPI_MakeFace( Wire( theXYList, true ), Standard_True ).Face(); } + +TopoDS_Wire WireCirc( const gp_Pnt& theCenter, double theRadius ) +{ + gp_Circ aCircle( gp_Ax2( theCenter, gp_Dir( 0, 0, 1 ) ), theRadius ); + TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge( aCircle ).Edge(); + return BRepBuilderAPI_MakeWire( anEdge ).Wire(); +}