0023024: Update headers of OCCT files
[occt.git] / src / BRepExtrema / BRepExtrema_ExtPC.cxx
CommitLineData
b311480e 1// Created on: 1993-12-15
2// Created by: Christophe MARION
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
92d1589b
A
22#include <BRepExtrema_ExtPC.hxx>
23
7fd59977 24#include <BRep_Tool.hxx>
92d1589b
A
25//#include <StdFail_NotDone.hxx>
26//#include <Standard_Failure.hxx>
7fd59977 27#include <BRepAdaptor_Curve.hxx>
28#include <BRepAdaptor_HCurve.hxx>
29
30
31//=======================================================================
32//function : BRepExtrema_ExtPC
33//purpose :
34//=======================================================================
35
92d1589b 36BRepExtrema_ExtPC::BRepExtrema_ExtPC(const TopoDS_Vertex& V, const TopoDS_Edge& E)
7fd59977 37{
38 Initialize(E);
39 Perform(V);
40}
41
42//=======================================================================
43//function : Initialize
44//purpose :
45//=======================================================================
46
47void BRepExtrema_ExtPC::Initialize(const TopoDS_Edge& E)
48{
49 Standard_Real U1,U2;
50 BRepAdaptor_Curve Curv(E);
51 myHC = new BRepAdaptor_HCurve(Curv);
52 BRep_Tool::Range(E,U1,U2);
92d1589b 53 myExtPC.Initialize(myHC->Curve(),U1,U2);
7fd59977 54}
55
56//=======================================================================
57//function : Perform
58//purpose :
59//=======================================================================
60
61void BRepExtrema_ExtPC::Perform(const TopoDS_Vertex& V)
62{
63 gp_Pnt P = BRep_Tool::Pnt(V);
92d1589b 64 myExtPC.Perform(P);
7fd59977 65}