Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:55

0001 // Created on: 1999-06-22
0002 // Created by: Roman LYGIN
0003 // Copyright (c) 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 _ShapeExtend_ComplexCurve_HeaderFile
0018 #define _ShapeExtend_ComplexCurve_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Geom_Curve.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <GeomAbs_Shape.hxx>
0026 class gp_Trsf;
0027 class gp_Pnt;
0028 class gp_Vec;
0029 
0030 
0031 class ShapeExtend_ComplexCurve;
0032 DEFINE_STANDARD_HANDLE(ShapeExtend_ComplexCurve, Geom_Curve)
0033 
0034 //! Defines a curve which consists of several segments.
0035 //! Implements basic interface to it.
0036 class ShapeExtend_ComplexCurve : public Geom_Curve
0037 {
0038 
0039 public:
0040 
0041   
0042   //! Returns number of curves
0043   Standard_EXPORT virtual Standard_Integer NbCurves() const = 0;
0044   
0045   //! Returns curve given by its index
0046   Standard_EXPORT virtual const Handle(Geom_Curve)& Curve (const Standard_Integer index) const = 0;
0047   
0048   //! Returns number of the curve for the given parameter U
0049   //! and local paramete r UOut for the found curve
0050   Standard_EXPORT virtual Standard_Integer LocateParameter (const Standard_Real U, Standard_Real& UOut) const = 0;
0051   
0052   //! Returns global parameter for the whole curve according
0053   //! to the segment and local parameter on it
0054   Standard_EXPORT virtual Standard_Real LocalToGlobal (const Standard_Integer index, const Standard_Real Ulocal) const = 0;
0055   
0056   //! Applies transformation to each curve
0057   Standard_EXPORT virtual void Transform (const gp_Trsf& T) Standard_OVERRIDE;
0058   
0059   //! Returns 1 - U
0060     virtual Standard_Real ReversedParameter (const Standard_Real U) const Standard_OVERRIDE;
0061   
0062   //! Returns 0
0063     virtual Standard_Real FirstParameter() const Standard_OVERRIDE;
0064   
0065   //! Returns 1
0066     virtual Standard_Real LastParameter() const Standard_OVERRIDE;
0067   
0068   //! Returns True if the curve is closed
0069     virtual Standard_Boolean IsClosed() const Standard_OVERRIDE;
0070   
0071   //! Returns False
0072     virtual Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
0073   
0074   //! Returns GeomAbs_C0
0075     virtual GeomAbs_Shape Continuity() const Standard_OVERRIDE;
0076   
0077   //! Returns False if N > 0
0078     virtual Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
0079   
0080   //! Returns point at parameter U.
0081   //! Finds appropriate curve and local parameter on it.
0082   Standard_EXPORT virtual void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
0083   
0084   Standard_EXPORT virtual void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1) const Standard_OVERRIDE;
0085   
0086   Standard_EXPORT virtual void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
0087   
0088   Standard_EXPORT virtual void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
0089   
0090   Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
0091   
0092   //! Returns scale factor for recomputing of deviatives.
0093   Standard_EXPORT virtual Standard_Real GetScaleFactor (const Standard_Integer ind) const = 0;
0094   
0095   //! Checks geometrical connectivity of the curves, including
0096   //! closure (sets fields myClosed)
0097   Standard_EXPORT Standard_Boolean CheckConnectivity (const Standard_Real Preci);
0098 
0099 
0100 
0101 
0102   DEFINE_STANDARD_RTTIEXT(ShapeExtend_ComplexCurve,Geom_Curve)
0103 
0104 protected:
0105 
0106   
0107   Standard_EXPORT ShapeExtend_ComplexCurve();
0108   
0109   //! Transform the derivative according to its order
0110   Standard_EXPORT void TransformDN (gp_Vec& V, const Standard_Integer ind, const Standard_Integer N) const;
0111 
0112   Standard_Boolean myClosed;
0113 
0114 
0115 private:
0116 
0117 
0118 
0119 
0120 };
0121 
0122 
0123 #include <ShapeExtend_ComplexCurve.lxx>
0124 
0125 
0126 
0127 
0128 
0129 #endif // _ShapeExtend_ComplexCurve_HeaderFile