Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-17 08:17:27

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 Handle(GeomFill_LocationLaw)& L,
0042                                             const Handle(Geom_Geometry)&        Section);
0043 
0044   //! To change the section Law
0045   Standard_EXPORT void SetLocation(const Handle(GeomFill_LocationLaw)& L);
0046 
0047   Standard_EXPORT void Perform(const Standard_Real Tol);
0048 
0049   Standard_EXPORT void Perform(const Handle(Adaptor3d_Curve)& Path, const Standard_Real Tol);
0050 
0051   Standard_EXPORT void Perform(const Standard_Real ParamOnPath, const Standard_Real Tol);
0052 
0053   Standard_EXPORT Standard_Boolean IsDone() const;
0054 
0055   Standard_EXPORT Standard_Real ParameterOnPath() const;
0056 
0057   Standard_EXPORT Standard_Real ParameterOnSection() const;
0058 
0059   Standard_EXPORT Standard_Real Distance() const;
0060 
0061   Standard_EXPORT Standard_Real Angle() const;
0062 
0063   Standard_EXPORT gp_Trsf
0064     Transformation(const Standard_Boolean WithTranslation,
0065                    const Standard_Boolean WithCorrection = Standard_False) const;
0066 
0067   //! Compute the Section, in the coordinate system given by
0068   //! the Location Law.
0069   //! If <WithTranslation> contact between
0070   //! <Section> and <Path> is forced.
0071   Standard_EXPORT Handle(Geom_Curve) Section(const Standard_Boolean WithTranslation) const;
0072 
0073   //! Compute the Section, in the coordinate system given by
0074   //! the Location Law.
0075   //! To have the Normal to section equal to the Location
0076   //! Law Normal.  If <WithTranslation> contact between
0077   //! <Section> and <Path> is forced.
0078   Standard_EXPORT Handle(Geom_Curve) ModifiedSection(const Standard_Boolean WithTranslation) const;
0079 
0080 protected:
0081 private:
0082   Standard_EXPORT void SectionAxis(const gp_Mat& M, gp_Vec& T, gp_Vec& N, gp_Vec& BN) const;
0083 
0084   Standard_EXPORT Standard_Boolean Choix(const Standard_Real Dist, const Standard_Real Angle) const;
0085 
0086   Standard_Boolean             done;
0087   Standard_Boolean             isplan;
0088   gp_Ax1                       TheAxe;
0089   Standard_Real                Gabarit;
0090   Handle(GeomFill_LocationLaw) myLaw;
0091   GeomAdaptor_Curve            myAdpSection;
0092   Handle(Geom_Curve)           mySection;
0093   Standard_Real                SecParam;
0094   Standard_Real                PathParam;
0095   Standard_Real                Dist;
0096   Standard_Real                AngleMax;
0097   Extrema_ExtPC                myExt;
0098   Standard_Boolean             myIsPoint;
0099   gp_Pnt                       myPoint;
0100 };
0101 
0102 #endif // _GeomFill_SectionPlacement_HeaderFile