0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / ShapeConstruct / ShapeConstruct.hxx
CommitLineData
42cf5bc1 1// Created on: 1998-07-14
2// Created by: data exchange team
3// Copyright (c) 1998-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _ShapeConstruct_HeaderFile
18#define _ShapeConstruct_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <GeomAbs_Shape.hxx>
26#include <Standard_Integer.hxx>
27#include <Standard_Boolean.hxx>
28#include <TopTools_HSequenceOfShape.hxx>
29#include <TopAbs_Orientation.hxx>
30class Geom_BSplineCurve;
31class Geom_Curve;
32class Geom2d_BSplineCurve;
33class Geom2d_Curve;
34class Geom_BSplineSurface;
35class Geom_Surface;
36class TopoDS_Face;
37class TopoDS_Edge;
38class ShapeConstruct_Curve;
39class ShapeConstruct_ProjectCurveOnSurface;
40class ShapeConstruct_CompBezierCurvesToBSplineCurve;
41class ShapeConstruct_CompBezierCurves2dToBSplineCurve2d;
42class ShapeConstruct_MakeTriangulation;
43
44
45//! This package provides new algorithms for constructing
46//! new geometrical objects and topological shapes. It
47//! complements and extends algorithms available in Open
48//! CASCADE topological and geometrical toolkist.
49//! The functionality provided by this package are the
50//! following:
51//! projecting curves on surface,
52//! adjusting curve to have given start and end points. P
53class ShapeConstruct
54{
55public:
56
57 DEFINE_STANDARD_ALLOC
58
59
60 //! Tool for wire triangulation
61 Standard_EXPORT static Handle(Geom_BSplineCurve) ConvertCurveToBSpline (const Handle(Geom_Curve)& C3D, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const GeomAbs_Shape Continuity, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
62
63 Standard_EXPORT static Handle(Geom2d_BSplineCurve) ConvertCurveToBSpline (const Handle(Geom2d_Curve)& C2D, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol2d, const GeomAbs_Shape Continuity, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
64
65 Standard_EXPORT static Handle(Geom_BSplineSurface) ConvertSurfaceToBSpline (const Handle(Geom_Surface)& surf, const Standard_Real UF, const Standard_Real UL, const Standard_Real VF, const Standard_Real VL, const Standard_Real Tol3d, const GeomAbs_Shape Continuity, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
66
67 //! join pcurves of the <theEdge> on the <theFace>
68 //! try to use pcurves from originas edges <theEdges>
69 //! Returns false if cannot join pcurves
70 Standard_EXPORT static Standard_Boolean JoinPCurves (const Handle(TopTools_HSequenceOfShape)& theEdges, const TopoDS_Face& theFace, TopoDS_Edge& theEdge);
71
72 //! Method for joininig curves 3D.
73 //! Parameters : c3d1,ac3d2 - initial curves
74 //! Orient1, Orient2 - initial edges orientations.
75 //! first1,last1,first2,last2 - parameters for trimming curves
76 //! (re-calculate with account of orientation edges)
77 //! c3dOut - result curve
78 //! isRev1,isRev2 - out parameters indicative on possible errors.
79 //! Return value : True - if curves were joined successfully,
80 //! else - False.
81 Standard_EXPORT static Standard_Boolean JoinCurves (const Handle(Geom_Curve)& c3d1, const Handle(Geom_Curve)& ac3d2, const TopAbs_Orientation Orient1, const TopAbs_Orientation Orient2, Standard_Real& first1, Standard_Real& last1, Standard_Real& first2, Standard_Real& last2, Handle(Geom_Curve)& c3dOut, Standard_Boolean& isRev1, Standard_Boolean& isRev2);
82
83 //! Method for joininig curves 3D.
84 //! Parameters : c3d1,ac3d2 - initial curves
85 //! Orient1, Orient2 - initial edges orientations.
86 //! first1,last1,first2,last2 - parameters for trimming curves
87 //! (re-calculate with account of orientation edges)
88 //! c3dOut - result curve
89 //! isRev1,isRev2 - out parameters indicative on possible errors.
90 //! isError - input parameter indicative possible errors due to that one from edges have one vertex
91 //! Return value : True - if curves were joined successfully,
92 //! else - False.
93 Standard_EXPORT static Standard_Boolean JoinCurves (const Handle(Geom2d_Curve)& c2d1, const Handle(Geom2d_Curve)& ac2d2, const TopAbs_Orientation Orient1, const TopAbs_Orientation Orient2, Standard_Real& first1, Standard_Real& last1, Standard_Real& first2, Standard_Real& last2, Handle(Geom2d_Curve)& c2dOut, Standard_Boolean& isRev1, Standard_Boolean& isRev2, const Standard_Boolean isError = Standard_False);
94
95
96
97
98protected:
99
100
101
102
103
104private:
105
106
107
108
109friend class ShapeConstruct_Curve;
110friend class ShapeConstruct_ProjectCurveOnSurface;
111friend class ShapeConstruct_CompBezierCurvesToBSplineCurve;
112friend class ShapeConstruct_CompBezierCurves2dToBSplineCurve2d;
113friend class ShapeConstruct_MakeTriangulation;
114
115};
116
117
118
119
120
121
122
123#endif // _ShapeConstruct_HeaderFile