Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:11:31

0001 // Created on: 1993-12-02
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1993-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 _BRepBlend_Line_HeaderFile
0018 #define _BRepBlend_Line_HeaderFile
0019 
0020 #include <Blend_Point.hxx>
0021 #include <NCollection_Sequence.hxx>
0022 #include <BRepBlend_Extremity.hxx>
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_Integer.hxx>
0025 
0026 class Blend_Point;
0027 
0028 class BRepBlend_Line : public Standard_Transient
0029 {
0030 
0031 public:
0032   Standard_EXPORT BRepBlend_Line();
0033 
0034   //! Clears the content of the line.
0035   Standard_EXPORT void Clear();
0036 
0037   //! Adds a point in the line.
0038   void Append(const Blend_Point& P);
0039 
0040   //! Adds a point in the line at the first place.
0041   void Prepend(const Blend_Point& P);
0042 
0043   //! Adds a point in the line at the first place.
0044   void InsertBefore(const int Index, const Blend_Point& P);
0045 
0046   //! Removes from <me> all the items of
0047   //! positions between <FromIndex> and <ToIndex>.
0048   //! Raises an exception if the indices are out of bounds.
0049   void Remove(const int FromIndex, const int ToIndex);
0050 
0051   //! Sets the value of the transition of the line on S1 and
0052   //! the line on S2.
0053   Standard_EXPORT void Set(const IntSurf_TypeTrans TranS1, const IntSurf_TypeTrans TranS2);
0054 
0055   //! Sets the value of the transition of the line on a surface
0056   Standard_EXPORT void Set(const IntSurf_TypeTrans Trans);
0057 
0058   //! Sets the values of the start points for the line.
0059   void SetStartPoints(const BRepBlend_Extremity& StartPt1, const BRepBlend_Extremity& StartPt2);
0060 
0061   //! Sets tne values of the end points for the line.
0062   void SetEndPoints(const BRepBlend_Extremity& EndPt1, const BRepBlend_Extremity& EndPt2);
0063 
0064   //! Returns the number of points in the line.
0065   int NbPoints() const;
0066 
0067   //! Returns the point of range Index.
0068   const Blend_Point& Point(const int Index) const;
0069 
0070   //! Returns the type of the transition of the line defined
0071   //! on the first surface. The transition is "constant"
0072   //! along the line.
0073   //! The transition is IN if the line is oriented in such
0074   //! a way that the system of vectors (N,DRac,T) is
0075   //! right-handed, where
0076   //! N is the normal to the first surface at a point P,
0077   //! DRac is a vector tangent to the blending patch,
0078   //! oriented towards the valid part of this patch,
0079   //! T is the tangent to the line on S1 at P.
0080   //! The transitioon is OUT when the system of vectors is
0081   //! left-handed.
0082   IntSurf_TypeTrans TransitionOnS1() const;
0083 
0084   //! Returns the type of the transition of the line defined
0085   //! on the second surface. The transition is "constant"
0086   //! along the line.
0087   IntSurf_TypeTrans TransitionOnS2() const;
0088 
0089   //! Returns the start point on S1.
0090   const BRepBlend_Extremity& StartPointOnFirst() const;
0091 
0092   //! Returns the start point on S2
0093   const BRepBlend_Extremity& StartPointOnSecond() const;
0094 
0095   //! Returns the end point on S1.
0096   const BRepBlend_Extremity& EndPointOnFirst() const;
0097 
0098   //! Returns the point on S2.
0099   const BRepBlend_Extremity& EndPointOnSecond() const;
0100 
0101   //! Returns the type of the transition of the line defined
0102   //! on the surface.
0103   IntSurf_TypeTrans TransitionOnS() const;
0104 
0105   DEFINE_STANDARD_RTTIEXT(BRepBlend_Line, Standard_Transient)
0106 
0107 private:
0108   NCollection_Sequence<Blend_Point> seqpt;
0109   IntSurf_TypeTrans                 tras1;
0110   IntSurf_TypeTrans                 tras2;
0111   BRepBlend_Extremity               stp1;
0112   BRepBlend_Extremity               stp2;
0113   BRepBlend_Extremity               endp1;
0114   BRepBlend_Extremity               endp2;
0115   bool                              hass1;
0116   bool                              hass2;
0117 };
0118 
0119 #include <BRepBlend_Line.lxx>
0120 
0121 #endif // _BRepBlend_Line_HeaderFile