1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/src/Blend/Blend_Point.lxx
2015-02-19 16:10:25 +03:00

160 lines
3.4 KiB
Plaintext

// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_DomainError.hxx>
#include <gp_Vec2d.hxx>
inline void Blend_Point::SetParameter(const Standard_Real Param)
{
prm = Param;
}
inline const gp_Pnt& Blend_Point::PointOnS1 () const
{
return pt1;
}
inline const gp_Pnt& Blend_Point::PointOnS2 () const
{
return pt2;
}
inline Standard_Real Blend_Point::Parameter () const
{
return prm;
}
inline void Blend_Point::ParametersOnS1 (Standard_Real& U1,
Standard_Real& V1) const
{
if (!hass1) {Standard_DomainError::Raise();}
U1 = u1;
V1 = v1;
}
inline void Blend_Point::ParametersOnS2 (Standard_Real& U2,
Standard_Real& V2) const
{
if (!hass2) {Standard_DomainError::Raise();}
U2 = u2;
V2 = v2;
}
inline Standard_Boolean Blend_Point::IsTangencyPoint () const
{
return istgt;
}
inline const gp_Vec& Blend_Point::TangentOnS1 () const
{
if (istgt) {Standard_DomainError::Raise();}
return tg1;
}
inline const gp_Vec& Blend_Point::TangentOnS2 () const
{
if (istgt) {Standard_DomainError::Raise();}
return tg2;
}
inline gp_Vec2d Blend_Point::Tangent2dOnS1 () const
{
if (istgt || !hass1) {Standard_DomainError::Raise();}
return gp_Vec2d(utg12d,vtg12d);
}
inline gp_Vec2d Blend_Point::Tangent2dOnS2 () const
{
if (istgt || !hass2) {Standard_DomainError::Raise();}
return gp_Vec2d(utg22d,vtg22d);
}
inline const gp_Pnt& Blend_Point::PointOnS () const
{
return pt1;
}
inline const gp_Pnt& Blend_Point::PointOnC () const
{
return pt2;
}
inline void Blend_Point::ParametersOnS (Standard_Real& U1,
Standard_Real& V1) const
{
if (!hass1) {Standard_DomainError::Raise();}
U1 = u1;
V1 = v1;
}
inline Standard_Real Blend_Point::ParameterOnC () const
{
if (!hasc2) {Standard_DomainError::Raise();}
return pc2;
}
inline const gp_Vec& Blend_Point::TangentOnS () const
{
if (istgt || !hass1) {Standard_DomainError::Raise();}
return tg1;
}
inline const gp_Vec& Blend_Point::TangentOnC () const
{
if (istgt) {Standard_DomainError::Raise();}
return tg2;
}
inline gp_Vec2d Blend_Point::Tangent2d () const
{
if (istgt || !hass1) {Standard_DomainError::Raise();}
return gp_Vec2d(utg12d,vtg12d);
}
inline const gp_Pnt& Blend_Point::PointOnC1 () const
{
return pt1;
}
inline const gp_Pnt& Blend_Point::PointOnC2 () const
{
return pt2;
}
inline Standard_Real Blend_Point::ParameterOnC1 () const
{
if (!hasc1) {Standard_DomainError::Raise();}
return pc1;
}
inline Standard_Real Blend_Point::ParameterOnC2 () const
{
if (!hasc2) {Standard_DomainError::Raise();}
return pc2;
}
inline const gp_Vec& Blend_Point::TangentOnC1 () const
{
if (istgt || !hass1) {Standard_DomainError::Raise();}
return tg1;
}
inline const gp_Vec& Blend_Point::TangentOnC2 () const
{
if (istgt) {Standard_DomainError::Raise();}
return tg2;
}