1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
occt/src/Contap/Contap_Point.lxx
dln e2065c2fb9 0024763: Convertation of the generic classes to the non-generic. Part 6
Next generic classes:

 "Contap_ArcFunction",
 "Contap_ContourGen",
 "Contap_HContToolGen",
 "Contap_HCurve2dToolGen",
 "Contap_Line",
 "Contap_Point",
 "Contap_SurfFunction",
 "Contap_SurfProps"

from "Contap" package were converted to the non-generic classes. Names of several classes were changed:

 "Contap_Contour",
 "Contap_HContTool",
 "Contap_HCurve2dTool",
 "Contap_Line",
 "Contap_Point"

 Also all instantiations of the "internal" classes of this classes were moved to the "Contap.cdl". And sources of the "Contap_ContourGen" class were merged to one .cxx file.
2014-04-04 12:57:37 +04:00

130 lines
2.9 KiB
Plaintext

// Created on: 1993-03-04
// Created by: Jacques GOUSSARD
// Copyright (c) 1993-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>
inline void Contap_Point::SetValue (const gp_Pnt& Pt,
const Standard_Real U,
const Standard_Real V)
{
pt = Pt;
uparam = U;
vparam = V;
onarc = Standard_False;
isvtx = Standard_False;
ismult= Standard_False;
myInternal = Standard_False;
}
inline void Contap_Point::SetParameter (const Standard_Real Para) {
paraline = Para;
}
inline void Contap_Point::SetVertex(const Handle(Adaptor3d_HVertex)& V) {
isvtx = Standard_True;
vtx = V;
}
inline void Contap_Point::SetArc (const Handle(Adaptor2d_HCurve2d)& A,
const Standard_Real Param,
const IntSurf_Transition& TLine,
const IntSurf_Transition& TArc) {
onarc = Standard_True;
arc = A;
prmarc = Param;
traline = TLine;
traarc = TArc;
}
inline void Contap_Point::SetMultiple ()
{
ismult = Standard_True;
}
inline void Contap_Point::SetInternal ()
{
myInternal = Standard_True;
}
inline Standard_Boolean Contap_Point::IsMultiple () const
{
return ismult;
}
inline Standard_Boolean Contap_Point::IsInternal () const
{
return myInternal;
}
inline const gp_Pnt& Contap_Point::Value () const {
return pt;
}
inline Standard_Real Contap_Point::ParameterOnLine () const {
return paraline;
}
inline void Contap_Point::Parameters (Standard_Real& U1,
Standard_Real& V1) const {
U1 = uparam;
V1 = vparam;
}
inline Standard_Boolean Contap_Point::IsOnArc () const{
return onarc;
}
inline const Handle_Adaptor2d_HCurve2d& Contap_Point::Arc () const {
if (!onarc) {Standard_DomainError::Raise();}
return arc;
}
inline const IntSurf_Transition& Contap_Point::TransitionOnLine () const {
if (!onarc) {Standard_DomainError::Raise();}
return traline;
}
inline const IntSurf_Transition& Contap_Point::TransitionOnArc () const {
if (!onarc) {Standard_DomainError::Raise();}
return traarc;
}
inline Standard_Real Contap_Point::ParameterOnArc () const {
if (!onarc) {Standard_DomainError::Raise();}
return prmarc;
}
inline Standard_Boolean Contap_Point::IsVertex () const {
return isvtx;
}
inline const Handle_Adaptor3d_HVertex& Contap_Point::Vertex () const {
if (!isvtx) {Standard_DomainError::Raise();}
return vtx;
}