X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Ax3.cpp;h=5dd911edf7e10f1d508a43d38ecfbb4223da46bb;hb=f60dc9dd94d5d4b0ea07e3e3cbfd5b3028f0942d;hp=892869a4c9a7f4593af69285648478443bb49e07;hpb=a24b7e6f4d112d5e7889fd76f030298fc428cd01;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Ax3.cpp b/src/GeomAPI/GeomAPI_Ax3.cpp index 892869a4c..5dd911edf 100644 --- a/src/GeomAPI/GeomAPI_Ax3.cpp +++ b/src/GeomAPI/GeomAPI_Ax3.cpp @@ -1,9 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: GeomAPI_Ax3.cpp -// Created: 16 February 2015 -// Author: Vitaly SMETANNIKOV - +// Copyright (C) 2014-2017 CEA/DEN, 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 "GeomAPI_Ax3.h" #include "GeomAPI_XYZ.h" @@ -15,7 +28,7 @@ #include -#define MY_AX3 static_cast(myImpl) +#define MY_AX3 implPtr() GeomAPI_Ax3::GeomAPI_Ax3() @@ -26,8 +39,8 @@ GeomAPI_Ax3::GeomAPI_Ax3() GeomAPI_Ax3::GeomAPI_Ax3(std::shared_ptr theOrigin, std::shared_ptr theDirX, std::shared_ptr theNorm) -: GeomAPI_Interface(new gp_Ax3(theOrigin->impl(), - theNorm->impl(), +: GeomAPI_Interface(new gp_Ax3(theOrigin->impl(), + theNorm->impl(), theDirX->impl())) { } @@ -67,14 +80,14 @@ std::shared_ptr GeomAPI_Ax3::dirY() const return std::shared_ptr(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z())); } -void GeomAPI_Ax3::setNorm(const std::shared_ptr& theNorm) +void GeomAPI_Ax3::setNormal(const std::shared_ptr& theNorm) { gp_Ax1 aAx1 = MY_AX3->Axis(); aAx1.SetDirection(theNorm->impl()); MY_AX3->SetAxis(aAx1); } -std::shared_ptr GeomAPI_Ax3::norm() const +std::shared_ptr GeomAPI_Ax3::normal() const { gp_Dir aDir = MY_AX3->Axis().Direction(); return std::shared_ptr(new GeomAPI_Dir(aDir.X(),aDir.Y(),aDir.Z())); @@ -102,4 +115,4 @@ std::shared_ptr GeomAPI_Ax3::to2D(double theX, double theY, doubl double aX = aVec.X() * aXDir.X() + aVec.Y() * aXDir.Y() + aVec.Z() * aXDir.Z(); double aY = aVec.X() * aYDir.X() + aVec.Y() * aYDir.Y() + aVec.Z() * aYDir.Y(); return std::shared_ptr(new GeomAPI_Pnt2d(aX, aY)); -} \ No newline at end of file +}