Warning, /include/opencascade/IntPatch_ALine.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1992-04-06
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1992-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 #include <Standard_DomainError.hxx>
0018 #include <Precision.hxx>
0019 #include <IntPatch_Point.hxx>
0020
0021
0022 inline void IntPatch_ALine::Replace (const Standard_Integer Index, const IntPatch_Point& Pnt)
0023 {
0024 svtx(Index) = Pnt;
0025 }
0026
0027 inline void IntPatch_ALine::SetFirstPoint (const Standard_Integer IndFirst)
0028 {
0029 fipt = Standard_True;
0030 indf = IndFirst;
0031 }
0032
0033 inline void IntPatch_ALine::SetLastPoint (const Standard_Integer IndLast)
0034 {
0035 lapt = Standard_True;
0036 indl = IndLast;
0037 }
0038
0039 inline Standard_Real IntPatch_ALine::FirstParameter (Standard_Boolean& IsIncluded) const
0040 {
0041 Standard_Real bid,first;
0042 curv.Domain(first,bid);
0043 IsIncluded = !curv.IsFirstOpen();
0044 return first;
0045 }
0046
0047 inline Standard_Real IntPatch_ALine::LastParameter (Standard_Boolean& IsIncluded) const
0048 {
0049 Standard_Real bid,last;
0050 curv.Domain(bid,last);
0051 IsIncluded = !curv.IsLastOpen();
0052 return last;
0053 }
0054
0055 inline gp_Pnt IntPatch_ALine::Value (const Standard_Real U)
0056 {
0057 return curv.Value(U);// Value leve l exception DomainError
0058 }
0059
0060 inline Standard_Boolean IntPatch_ALine::D1(const Standard_Real U, gp_Pnt& P, gp_Vec& Du)
0061 {
0062 return curv.D1u(U,P,Du); // D1u leve l exception DomainError
0063 }
0064
0065 inline void IntPatch_ALine::FindParameter(const gp_Pnt& theP,
0066 TColStd_ListOfReal& theParams) const
0067 {
0068 curv.FindParameter(theP, theParams);
0069 }
0070
0071 inline Standard_Boolean IntPatch_ALine::HasFirstPoint () const
0072 {
0073 return fipt;
0074 }
0075
0076 inline Standard_Boolean IntPatch_ALine::HasLastPoint () const
0077 {
0078 return lapt;
0079 }
0080
0081 inline const IntPatch_Point& IntPatch_ALine::FirstPoint () const
0082 {
0083 if (!fipt) {throw Standard_DomainError();}
0084 return svtx(indf);
0085 }
0086
0087 inline const IntPatch_Point& IntPatch_ALine::LastPoint () const
0088 {
0089 if (!lapt) {throw Standard_DomainError();}
0090 return svtx(indl);
0091 }
0092
0093 inline Standard_Integer IntPatch_ALine::NbVertex () const
0094 {
0095 return svtx.Length();
0096 }
0097
0098 inline const IntPatch_Point& IntPatch_ALine::Vertex (const Standard_Integer Index) const
0099 {
0100 return svtx(Index);
0101 }