1 // Created on: 1994-04-13
2 // Created by: Isabelle GRIGNON
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <ChFiKPart_ComputeData_CS.hxx>
25 void ChFiKPart_CornerSpine(const Handle(Adaptor3d_HSurface)& S1,
26 const Handle(Adaptor3d_HSurface)& S2,
28 const gp_Pnt2d& /*P2S1*/,
31 const Standard_Real R,
38 gp_Ax3 ax = S1->Plane().Position();
39 gp_Vec V1(ax.XDirection());
40 gp_Vec V2(ax.YDirection());
43 S2->D1(P1S2.X(),P1S2.Y(),P,du,dv);
44 gp_Vec V(P,S1->Value(P1S1.X(),P1S1.Y()));
45 V = V.Dot(V1)*V1+V.Dot(V2)*V2;
47 gp_Pnt P2 = S2->Value(P2S2.X(),P2S2.Y());
51 if(V.Dot(Vorien) >= 0.){
52 cent.SetCoord(P.X()+R*V.X(),P.Y()+R*V.Y(),P.Z()+R*V.Z());
56 cent.SetCoord(P.X()-R*V.X(),P.Y()-R*V.Y(),P.Z()-R*V.Z());
58 gp_Dir dy(gp_Vec(cent,P2));
60 gp_Ax2 circax2(cent,dx^dy,dx);
61 gp_Ax3 cylax3(circax2);
62 if((du^dv).Dot(dx) < 0.) cylax3.ZReverse();
64 Last = ElCLib::CircleParameter(circax2,P2);
65 circ.SetPosition(circax2);
67 cyl.SetPosition(cylax3);