Warning, /include/opencascade/BRepBlend_Line.lxx is written in an unsupported language. File is not indexed.
0001 // Copyright (c) 1995-1999 Matra Datavision
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014
0015 #include <Blend_Point.hxx>
0016 #include <NCollection_Sequence.hxx>
0017 #include <Standard_DomainError.hxx>
0018
0019 inline void BRepBlend_Line::Append(const Blend_Point& P)
0020 {
0021 seqpt.Append(P);
0022 }
0023
0024 inline void BRepBlend_Line::Prepend(const Blend_Point& P)
0025 {
0026 seqpt.Prepend(P);
0027 }
0028
0029 inline void BRepBlend_Line::InsertBefore(const int Index, const Blend_Point& P)
0030 {
0031 seqpt.InsertBefore(Index, P);
0032 }
0033
0034 inline void BRepBlend_Line::Remove(const int FromIndex, const int ToIndex)
0035 {
0036 seqpt.Remove(FromIndex, ToIndex);
0037 }
0038
0039 inline void BRepBlend_Line::SetStartPoints(const BRepBlend_Extremity& StartPtOnS1,
0040 const BRepBlend_Extremity& StartPtOnS2)
0041
0042 {
0043 stp1 = StartPtOnS1;
0044 stp2 = StartPtOnS2;
0045 }
0046
0047 inline void BRepBlend_Line::SetEndPoints(const BRepBlend_Extremity& EndPtOnS1,
0048 const BRepBlend_Extremity& EndPtOnS2)
0049
0050 {
0051 endp1 = EndPtOnS1;
0052 endp2 = EndPtOnS2;
0053 }
0054
0055 inline int BRepBlend_Line::NbPoints() const
0056 {
0057 return seqpt.Length();
0058 }
0059
0060 inline const Blend_Point& BRepBlend_Line::Point(const int Index) const
0061 {
0062 return seqpt(Index);
0063 }
0064
0065 inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS1() const
0066 {
0067 if (!hass1)
0068 {
0069 throw Standard_DomainError();
0070 }
0071 return tras1;
0072 }
0073
0074 inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS2() const
0075 {
0076 if (!hass2)
0077 {
0078 throw Standard_DomainError();
0079 }
0080 return tras2;
0081 }
0082
0083 inline const BRepBlend_Extremity& BRepBlend_Line::StartPointOnFirst() const
0084 {
0085 return stp1;
0086 }
0087
0088 inline const BRepBlend_Extremity& BRepBlend_Line::StartPointOnSecond() const
0089 {
0090 return stp2;
0091 }
0092
0093 inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnFirst() const
0094 {
0095 return endp1;
0096 }
0097
0098 inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnSecond() const
0099 {
0100 return endp2;
0101 }
0102
0103 inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS() const
0104 {
0105 if (!hass1)
0106 {
0107 throw Standard_DomainError();
0108 }
0109 return tras1;
0110 }