0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / ChFi2d / ChFi2d_ChamferAPI.hxx
... / ...
CommitLineData
1// Created on: 2013-05-20
2// Created by: Mikhail PONIKAROV
3// Copyright (c) 2003-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _CHAMFERAPI_H_
17#define _CHAMFERAPI_H_
18
19#include <TopoDS_Edge.hxx>
20#include <TopoDS_Wire.hxx>
21#include <Geom_Curve.hxx>
22
23//! A class making a chamfer between two linear edges.
24class ChFi2d_ChamferAPI
25{
26public:
27
28 //! An empty constructor.
29 Standard_EXPORT ChFi2d_ChamferAPI();
30
31 //! A constructor accepting a wire consisting of two linear edges.
32 Standard_EXPORT ChFi2d_ChamferAPI(const TopoDS_Wire& theWire);
33
34 //! A constructor accepting two linear edges.
35 Standard_EXPORT ChFi2d_ChamferAPI(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2);
36
37 //! Initializes the class by a wire consisting of two libear edges.
38 Standard_EXPORT void Init(const TopoDS_Wire& theWire);
39
40 //! Initializes the class by two linear edges.
41 Standard_EXPORT void Init(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2);
42
43 //! Constructs a chamfer edge.
44 //! Returns true if the edge is constructed.
45 Standard_EXPORT Standard_Boolean Perform();
46
47 // Returns the result (chamfer edge, modified edge1, modified edge2).
48 Standard_EXPORT TopoDS_Edge Result(TopoDS_Edge& theEdge1, TopoDS_Edge& theEdge2,
49 const Standard_Real theLength1, const Standard_Real theLength2);
50
51private:
52
53 TopoDS_Edge myEdge1, myEdge2;
54 Handle(Geom_Curve) myCurve1, myCurve2;
55 Standard_Real myStart1, myEnd1, myStart2, myEnd2;
56 Standard_Boolean myCommonStart1, myCommonStart2;
57};
58
59#endif // _CHAMFERAPI_H_