Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-12-02
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_CurveAndTrihedron_HeaderFile
0018 #define _GeomFill_CurveAndTrihedron_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <gp_Mat.hxx>
0023 #include <GeomFill_LocationLaw.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <TColgp_Array1OfPnt2d.hxx>
0026 #include <TColgp_Array1OfVec2d.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <GeomAbs_Shape.hxx>
0029 #include <TColStd_Array1OfReal.hxx>
0030 class GeomFill_TrihedronLaw;
0031 
0032 
0033 class GeomFill_CurveAndTrihedron;
0034 DEFINE_STANDARD_HANDLE(GeomFill_CurveAndTrihedron, GeomFill_LocationLaw)
0035 
0036 //! Define location law with an TrihedronLaw and an
0037 //! curve
0038 //! Definition Location is :
0039 //! transformed  section   coordinates  in  (Curve(v)),
0040 //! (Normal(v),   BiNormal(v), Tangente(v))) systeme are
0041 //! the  same like section  shape coordinates in
0042 //! (O,(OX, OY, OZ)) systeme.
0043 class GeomFill_CurveAndTrihedron : public GeomFill_LocationLaw
0044 {
0045 
0046 public:
0047 
0048   
0049   Standard_EXPORT GeomFill_CurveAndTrihedron(const Handle(GeomFill_TrihedronLaw)& Trihedron);
0050   
0051   //! initialize curve of trihedron law
0052   //! @return Standard_True in case if execution end correctly
0053   Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE;
0054   
0055   Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE;
0056   
0057   //! Set a transformation Matrix like   the law M(t) become
0058   //! Mat * M(t)
0059   Standard_EXPORT virtual void SetTrsf (const gp_Mat& Transfo) Standard_OVERRIDE;
0060   
0061   Standard_EXPORT virtual Handle(GeomFill_LocationLaw) Copy() const Standard_OVERRIDE;
0062   
0063   //! compute Location and 2d points
0064   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V) Standard_OVERRIDE;
0065   
0066   //! compute Location and 2d points
0067   Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, TColgp_Array1OfPnt2d& Poles2d) Standard_OVERRIDE;
0068   
0069   //! compute location 2d  points and  associated
0070   //! first derivatives.
0071   //! Warning : It used only for C1 or C2 approximation
0072   Standard_EXPORT virtual Standard_Boolean D1 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d) Standard_OVERRIDE;
0073   
0074   //! compute location 2d  points and associated
0075   //! first and seconde  derivatives.
0076   //! Warning : It used only for C2 approximation
0077   Standard_EXPORT virtual Standard_Boolean D2 (const Standard_Real Param, gp_Mat& M, gp_Vec& V, gp_Mat& DM, gp_Vec& DV, gp_Mat& D2M, gp_Vec& D2V, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d) Standard_OVERRIDE;
0078   
0079   //! Returns  the number  of  intervals for  continuity
0080   //! <S>.
0081   //! May be one if Continuity(me) >= <S>
0082   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0083   
0084   //! Stores in <T> the  parameters bounding the intervals
0085   //! of continuity <S>.
0086   //!
0087   //! The array must provide  enough room to  accommodate
0088   //! for the parameters. i.e. T.Length() > NbIntervals()
0089   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0090   
0091   //! Sets the bounds of the parametric interval on
0092   //! the function
0093   //! This determines the derivatives in these values if the
0094   //! function is not Cn.
0095   Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE;
0096   
0097   //! Gets the bounds of the parametric interval on
0098   //! the function
0099   Standard_EXPORT virtual void GetInterval (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
0100   
0101   //! Gets the bounds of the function parametric domain.
0102   //! Warning: This domain it is  not modified by the
0103   //! SetValue method
0104   Standard_EXPORT virtual void GetDomain (Standard_Real& First, Standard_Real& Last) const Standard_OVERRIDE;
0105   
0106   //! Get the maximum Norm  of the matrix-location part.  It
0107   //! is usful to find an good Tolerance to approx M(t).
0108   Standard_EXPORT virtual Standard_Real GetMaximalNorm() Standard_OVERRIDE;
0109   
0110   //! Get average value of M(t) and V(t) it is usfull to
0111   //! make fast approximation of rational  surfaces.
0112   Standard_EXPORT virtual void GetAverageLaw (gp_Mat& AM, gp_Vec& AV) Standard_OVERRIDE;
0113   
0114   //! Say if the Location  Law, is an translation of  Location
0115   //! The default implementation is " returns False ".
0116   Standard_EXPORT virtual Standard_Boolean IsTranslation (Standard_Real& Error) const Standard_OVERRIDE;
0117   
0118   //! Say if the Location  Law, is a rotation of Location
0119   //! The default implementation is " returns False ".
0120   Standard_EXPORT virtual Standard_Boolean IsRotation (Standard_Real& Error) const Standard_OVERRIDE;
0121   
0122   Standard_EXPORT virtual void Rotation (gp_Pnt& Center) const Standard_OVERRIDE;
0123 
0124 
0125 
0126 
0127   DEFINE_STANDARD_RTTIEXT(GeomFill_CurveAndTrihedron,GeomFill_LocationLaw)
0128 
0129 protected:
0130 
0131 
0132 
0133 
0134 private:
0135 
0136 
0137   Standard_Boolean WithTrans;
0138   Handle(GeomFill_TrihedronLaw) myLaw;
0139   Handle(Adaptor3d_Curve) myCurve;
0140   Handle(Adaptor3d_Curve) myTrimmed;
0141   gp_Pnt Point;
0142   gp_Vec V1;
0143   gp_Vec V2;
0144   gp_Vec V3;
0145   gp_Mat Trans;
0146 
0147 
0148 };
0149 
0150 
0151 
0152 
0153 
0154 
0155 
0156 #endif // _GeomFill_CurveAndTrihedron_HeaderFile