mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-14 20:59:23 +08:00
14d4e91171
- Added automated migration scripts for handle syntax, standard types, and macros - Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents - Introduced modern `occ` namespace with template-based type checking helpers - Enhanced NCollection macros to support variadic arguments for complex template types- Added automated migration scripts for handle syntax, standard types, and macros - Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents - Introduced modern `occ` namespace with template-based type checking helpers - Enhanced NCollection macros to support variadic arguments for complex template types
135 lines
3.3 KiB
Plaintext
135 lines
3.3 KiB
Plaintext
// Created on: 1992-06-10
|
|
// Created by: Laurent BUCHARD
|
|
// Copyright (c) 1992-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>
|
|
|
|
std::ostream& operator<<(std::ostream&, IntRes2d_Transition&);
|
|
|
|
inline IntRes2d_Transition::IntRes2d_Transition(const bool Tangent,
|
|
const IntRes2d_Position Pos,
|
|
const IntRes2d_TypeTrans Type)
|
|
:
|
|
|
|
tangent(Tangent),
|
|
posit(Pos),
|
|
typetra(Type),
|
|
situat(IntRes2d_Unknown),
|
|
oppos(false)
|
|
|
|
{
|
|
}
|
|
|
|
inline IntRes2d_Transition::IntRes2d_Transition(const bool Tangent,
|
|
const IntRes2d_Position Pos,
|
|
const IntRes2d_Situation Situ,
|
|
const bool Oppos)
|
|
: tangent(Tangent),
|
|
posit(Pos),
|
|
typetra(IntRes2d_Touch),
|
|
situat(Situ),
|
|
oppos(Oppos)
|
|
{
|
|
}
|
|
|
|
inline IntRes2d_Transition::IntRes2d_Transition(const IntRes2d_Position Pos)
|
|
:
|
|
|
|
tangent(true),
|
|
posit(Pos),
|
|
typetra(IntRes2d_Undecided),
|
|
situat(IntRes2d_Unknown),
|
|
oppos(false)
|
|
{
|
|
}
|
|
|
|
inline void IntRes2d_Transition::SetValue(const bool Tangent,
|
|
const IntRes2d_Position Pos,
|
|
const IntRes2d_TypeTrans Type)
|
|
{
|
|
|
|
tangent = Tangent;
|
|
posit = Pos;
|
|
typetra = Type;
|
|
}
|
|
|
|
inline void IntRes2d_Transition::SetValue(const bool Tangent,
|
|
const IntRes2d_Position Pos,
|
|
const IntRes2d_Situation Situ,
|
|
const bool Oppos)
|
|
{
|
|
|
|
tangent = Tangent;
|
|
posit = Pos;
|
|
typetra = IntRes2d_Touch;
|
|
situat = Situ;
|
|
oppos = Oppos;
|
|
}
|
|
|
|
inline void IntRes2d_Transition::SetValue(const IntRes2d_Position Pos)
|
|
{
|
|
|
|
posit = Pos;
|
|
typetra = IntRes2d_Undecided;
|
|
}
|
|
|
|
inline void IntRes2d_Transition::SetPosition(const IntRes2d_Position Pos)
|
|
{
|
|
|
|
posit = Pos;
|
|
}
|
|
|
|
inline IntRes2d_Position IntRes2d_Transition::PositionOnCurve() const
|
|
{
|
|
|
|
return posit;
|
|
}
|
|
|
|
inline IntRes2d_TypeTrans IntRes2d_Transition::TransitionType() const
|
|
{
|
|
|
|
return typetra;
|
|
}
|
|
|
|
inline bool IntRes2d_Transition::IsTangent() const
|
|
{
|
|
|
|
if (typetra == IntRes2d_Undecided)
|
|
{
|
|
throw Standard_DomainError();
|
|
}
|
|
return tangent;
|
|
}
|
|
|
|
inline IntRes2d_Situation IntRes2d_Transition::Situation() const
|
|
{
|
|
|
|
if (typetra != IntRes2d_Touch)
|
|
{
|
|
throw Standard_DomainError();
|
|
}
|
|
return situat;
|
|
}
|
|
|
|
inline bool IntRes2d_Transition::IsOpposite() const
|
|
{
|
|
|
|
if (typetra != IntRes2d_Touch)
|
|
{
|
|
throw Standard_DomainError();
|
|
}
|
|
return oppos;
|
|
}
|