Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:14:30

0001 // Created on: 1997-12-15
0002 // Created by: Philippe MANGIN
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _GeomFill_SectionPlacement_HeaderFile
0018 #define _GeomFill_SectionPlacement_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Ax1.hxx>
0025 #include <GeomAdaptor_Curve.hxx>
0026 #include <Extrema_ExtPC.hxx>
0027 #include <gp_Pnt.hxx>
0028 class GeomFill_LocationLaw;
0029 class Geom_Curve;
0030 class Geom_Geometry;
0031 class gp_Trsf;
0032 class gp_Mat;
0033 class gp_Vec;
0034 
0035 //! To place section in sweep Function
0036 class GeomFill_SectionPlacement
0037 {
0038 public:
0039   DEFINE_STANDARD_ALLOC
0040 
0041   Standard_EXPORT GeomFill_SectionPlacement(const occ::handle<GeomFill_LocationLaw>& L,
0042                                             const occ::handle<Geom_Geometry>&        Section);
0043 
0044   //! To change the section Law
0045   Standard_EXPORT void SetLocation(const occ::handle<GeomFill_LocationLaw>& L);
0046 
0047   Standard_EXPORT void Perform(const double Tol);
0048 
0049   Standard_EXPORT void Perform(const occ::handle<Adaptor3d_Curve>& Path, const double Tol);
0050 
0051   Standard_EXPORT void Perform(const double ParamOnPath, const double Tol);
0052 
0053   Standard_EXPORT bool IsDone() const;
0054 
0055   Standard_EXPORT double ParameterOnPath() const;
0056 
0057   Standard_EXPORT double ParameterOnSection() const;
0058 
0059   Standard_EXPORT double Distance() const;
0060 
0061   Standard_EXPORT double Angle() const;
0062 
0063   Standard_EXPORT gp_Trsf Transformation(const bool WithTranslation,
0064                                          const bool WithCorrection = false) const;
0065 
0066   //! Compute the Section, in the coordinate system given by
0067   //! the Location Law.
0068   //! If <WithTranslation> contact between
0069   //! <Section> and <Path> is forced.
0070   Standard_EXPORT occ::handle<Geom_Curve> Section(const bool WithTranslation) const;
0071 
0072   //! Compute the Section, in the coordinate system given by
0073   //! the Location Law.
0074   //! To have the Normal to section equal to the Location
0075   //! Law Normal. If <WithTranslation> contact between
0076   //! <Section> and <Path> is forced.
0077   Standard_EXPORT occ::handle<Geom_Curve> ModifiedSection(const bool WithTranslation) const;
0078 
0079 private:
0080   Standard_EXPORT void SectionAxis(const gp_Mat& M, gp_Vec& T, gp_Vec& N, gp_Vec& BN) const;
0081 
0082   Standard_EXPORT bool Choix(const double Dist, const double Angle) const;
0083 
0084   bool                              done;
0085   bool                              isplan;
0086   gp_Ax1                            TheAxe;
0087   double                            Gabarit;
0088   occ::handle<GeomFill_LocationLaw> myLaw;
0089   GeomAdaptor_Curve                 myAdpSection;
0090   occ::handle<Geom_Curve>           mySection;
0091   double                            SecParam;
0092   double                            PathParam;
0093   double                            Dist;
0094   double                            AngleMax;
0095   Extrema_ExtPC                     myExt;
0096   bool                              myIsPoint;
0097   gp_Pnt                            myPoint;
0098 };
0099 
0100 #endif // _GeomFill_SectionPlacement_HeaderFile