0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / GeomFill / GeomFill_SectionPlacement.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-12-15
2// Created by: Philippe MANGIN
3// Copyright (c) 1997-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 _GeomFill_SectionPlacement_HeaderFile
18#define _GeomFill_SectionPlacement_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <gp_Ax1.hxx>
26#include <Standard_Real.hxx>
27#include <GeomAdaptor_Curve.hxx>
28#include <Extrema_ExtPC.hxx>
29#include <gp_Pnt.hxx>
30class GeomFill_LocationLaw;
31class Geom_Curve;
32class StdFail_NotDone;
33class Geom_Geometry;
34class Adaptor3d_HCurve;
35class gp_Trsf;
36class gp_Mat;
37class gp_Vec;
38
39
40//! To place section in sweep Function
41class GeomFill_SectionPlacement
42{
43public:
44
45 DEFINE_STANDARD_ALLOC
46
47
48 Standard_EXPORT GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L, const Handle(Geom_Geometry)& Section);
49
50 //! To change the section Law
51 Standard_EXPORT void SetLocation (const Handle(GeomFill_LocationLaw)& L);
52
53 Standard_EXPORT void Perform (const Standard_Real Tol);
54
55 Standard_EXPORT void Perform (const Handle(Adaptor3d_HCurve)& Path, const Standard_Real Tol);
56
57 Standard_EXPORT void Perform (const Standard_Real ParamOnPath, const Standard_Real Tol);
58
59 Standard_EXPORT Standard_Boolean IsDone() const;
60
61 Standard_EXPORT Standard_Real ParameterOnPath() const;
62
63 Standard_EXPORT Standard_Real ParameterOnSection() const;
64
65 Standard_EXPORT Standard_Real Distance() const;
66
67 Standard_EXPORT Standard_Real Angle() const;
68
69 Standard_EXPORT gp_Trsf Transformation (const Standard_Boolean WithTranslation, const Standard_Boolean WithCorrection = Standard_False) const;
70
71 //! Compute the Section, in the coordinate syteme given by
72 //! the Location Law.
73 //! If <WithTranslation> contact beetween
74 //! <Section> and <Path> is forced.
75 Standard_EXPORT Handle(Geom_Curve) Section (const Standard_Boolean WithTranslation) const;
76
77 //! Compute the Section, in the coordinate syteme given by
78 //! the Location Law.
79 //! To have the Normal to section equal to the Location
80 //! Law Normal. If <WithTranslation> contact beetween
81 //! <Section> and <Path> is forced.
82 Standard_EXPORT Handle(Geom_Curve) ModifiedSection (const Standard_Boolean WithTranslation) const;
83
84
85
86
87protected:
88
89
90
91
92
93private:
94
95
96 Standard_EXPORT void SectionAxis (const gp_Mat& M, gp_Vec& T, gp_Vec& N, gp_Vec& BN) const;
97
98 Standard_EXPORT Standard_Boolean Choix (const Standard_Real Dist, const Standard_Real Angle) const;
99
100
101 Standard_Boolean done;
102 Standard_Boolean isplan;
103 gp_Ax1 TheAxe;
104 Standard_Real Gabarit;
105 Handle(GeomFill_LocationLaw) myLaw;
106 GeomAdaptor_Curve myAdpSection;
107 Handle(Geom_Curve) mySection;
108 Standard_Real SecParam;
109 Standard_Real PathParam;
110 Standard_Real Dist;
111 Standard_Real AngleMax;
112 Extrema_ExtPC myExt;
113 Standard_Boolean myIsPoint;
114 gp_Pnt myPoint;
115
116
117};
118
119
120
121
122
123
124
125#endif // _GeomFill_SectionPlacement_HeaderFile