Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:40

0001 // Created on: 1994-02-28
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1994-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_SweepSectionGenerator_HeaderFile
0018 #define _GeomFill_SweepSectionGenerator_HeaderFile
0019 
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <gp_Ax1.hxx>
0022 #include <GeomFill_SequenceOfTrsf.hxx>
0023 #include <TColStd_Array1OfReal.hxx>
0024 #include <TColStd_Array1OfInteger.hxx>
0025 #include <TColgp_Array1OfPnt.hxx>
0026 #include <TColgp_Array1OfVec.hxx>
0027 #include <TColgp_Array1OfPnt2d.hxx>
0028 #include <TColgp_Array1OfVec2d.hxx>
0029 
0030 class Geom_BSplineCurve;
0031 class Geom_Curve;
0032 class gp_Trsf;
0033 
0034 
0035 //! class for instantiation of AppBlend.
0036 //! evaluate the sections of a sweep surface.
0037 class GeomFill_SweepSectionGenerator 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   Standard_EXPORT GeomFill_SweepSectionGenerator();
0045   
0046   //! Create a sweept surface with a constant radius.
0047   Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Geom_Curve)& Path, const Standard_Real Radius);
0048   
0049   //! Create a sweept surface with a constant section
0050   Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect);
0051   
0052   //! Create a sweept surface with an evolving section
0053   //! The section evaluate from First to Last Section
0054   Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect, const Handle(Geom_Curve)& LastSect);
0055   
0056   //! Create  a pipe  with  a constant  radius with  2
0057   //! guide-line.
0058   Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& Curve1, const Handle(Geom_Curve)& Curve2, const Standard_Real Radius);
0059   
0060   //! Create  a pipe  with  a constant  radius with  2
0061   //! guide-line.
0062   Standard_EXPORT GeomFill_SweepSectionGenerator(const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius);
0063   
0064   Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Standard_Real Radius);
0065   
0066   Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect);
0067   
0068   Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect, const Handle(Geom_Curve)& LastSect);
0069   
0070   Standard_EXPORT void Init (const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& Curve1, const Handle(Geom_Curve)& Curve2, const Standard_Real Radius);
0071   
0072   Standard_EXPORT void Init (const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius);
0073   
0074   Standard_EXPORT void Perform (const Standard_Boolean Polynomial = Standard_False);
0075   
0076   Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) const;
0077   
0078   Standard_EXPORT void Knots (TColStd_Array1OfReal& TKnots) const;
0079   
0080   Standard_EXPORT void Mults (TColStd_Array1OfInteger& TMults) const;
0081   
0082     Standard_Integer NbSections() const;
0083   
0084   //! Used for the first and last section
0085   //! The method returns Standard_True if the derivatives
0086   //! are computed, otherwise it returns Standard_False.
0087   Standard_EXPORT Standard_Boolean Section (const Standard_Integer P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) const;
0088   
0089   Standard_EXPORT void Section (const Standard_Integer P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) const;
0090   
0091   //! raised if <Index> not in the range [1,NbSections()]
0092   Standard_EXPORT const gp_Trsf& Transformation (const Standard_Integer Index) const;
0093   
0094   //! Returns  the parameter of   <P>, to impose  it for the
0095   //! approximation.
0096   Standard_EXPORT Standard_Real Parameter (const Standard_Integer P) const;
0097 
0098 
0099 
0100 
0101 protected:
0102 
0103 
0104 
0105 
0106 
0107 private:
0108 
0109 
0110 
0111   Handle(Geom_BSplineCurve) myPath;
0112   Handle(Geom_BSplineCurve) myFirstSect;
0113   Handle(Geom_BSplineCurve) myLastSect;
0114   Handle(Adaptor3d_Curve) myAdpPath;
0115   Handle(Adaptor3d_Curve) myAdpFirstSect;
0116   Handle(Adaptor3d_Curve) myAdpLastSect;
0117   gp_Ax1 myCircPathAxis;
0118   Standard_Real myRadius;
0119   Standard_Boolean myIsDone;
0120   Standard_Integer myNbSections;
0121   GeomFill_SequenceOfTrsf myTrsfs;
0122   Standard_Integer myType;
0123   Standard_Boolean myPolynomial;
0124 
0125 
0126 };
0127 
0128 
0129 #include <GeomFill_SweepSectionGenerator.lxx>
0130 
0131 
0132 
0133 
0134 
0135 #endif // _GeomFill_SweepSectionGenerator_HeaderFile