Added missing initialization to ChFiDS_CommonPoint constructor.
//function : ChFiDS_CommonPoint
//purpose :
//=======================================================================
-ChFiDS_CommonPoint::ChFiDS_CommonPoint() :
-tol(0.),
-isonarc(Standard_False),
-isvtx(Standard_False),
-hasvector(Standard_False)
+ChFiDS_CommonPoint::ChFiDS_CommonPoint()
+: tol (0.0),
+ prmarc (0.0),
+ prmtg (0.0),
+ traarc (TopAbs_FORWARD),
+ isonarc(Standard_False),
+ isvtx (Standard_False),
+ hasvector (Standard_False)
{
}
//! Sets the values of a point which is a vertex on
//! the initial facet of restriction of one
//! of the surface.
- void SetVertex (const TopoDS_Vertex& V);
-
+ void SetVertex (const TopoDS_Vertex& theVertex)
+ {
+ isvtx = Standard_True;
+ vtx = theVertex;
+ }
+
//! Sets the values of a point which is on the arc
//! A, at parameter Param.
Standard_EXPORT void SetArc (const Standard_Real Tol, const TopoDS_Edge& A, const Standard_Real Param, const TopAbs_Orientation TArc);
//! Set the 3d point for a commonpoint that is not
//! a vertex or on an arc.
- void SetPoint (const gp_Pnt& Point);
+ void SetPoint (const gp_Pnt& thePoint) { point = thePoint; }
//! Set the output 3d vector
- void SetVector (const gp_Vec& Vector);
+ void SetVector (const gp_Vec& theVector)
+ {
+ hasvector = Standard_True;
+ vector = theVector;
+ }
//! This method set the fuzziness on the point.
- void SetTolerance (const Standard_Real Tol);
+ void SetTolerance (const Standard_Real Tol)
+ {
+ if (Tol > tol)
+ {
+ tol = Tol;
+ }
+ }
//! This method returns the fuzziness on the point.
- Standard_Real Tolerance() const;
+ Standard_Real Tolerance() const { return tol; }
//! Returns TRUE if the point is a vertex on the initial
//! restriction facet of the surface.
- Standard_Boolean IsVertex() const;
+ Standard_Boolean IsVertex() const { return isvtx; }
//! Returns the information about the point when it is
//! on the domain of the first patch, i-e when the function
//! IsVertex returns True.
//! Otherwise, an exception is raised.
- const TopoDS_Vertex& Vertex() const;
-
+ const TopoDS_Vertex& Vertex() const
+ {
+ if (!isvtx) { throw Standard_DomainError(); }
+ return vtx;
+ }
+
//! Returns TRUE if the point is a on an edge of the initial
//! restriction facet of the surface.
- Standard_Boolean IsOnArc() const;
+ Standard_Boolean IsOnArc() const { return isonarc; }
//! Returns the arc of restriction containing the
//! vertex.
Standard_EXPORT Standard_Real Parameter() const;
//! Returns the 3d point
- const gp_Pnt& Point() const;
+ const gp_Pnt& Point() const { return point; }
//! Returns TRUE if the output vector is stored.
- Standard_Boolean HasVector() const;
+ Standard_Boolean HasVector() const { return hasvector; }
//! Returns the output 3d vector
- const gp_Vec& Vector() const;
-
-
-
-
-protected:
-
-
-
-
+ const gp_Vec& Vector() const
+ {
+ if (!hasvector) { throw Standard_DomainError ("ChFiDS_CommonPoint::Vector"); }
+ return vector;
+ }
private:
-
-
TopoDS_Edge arc;
TopoDS_Vertex vtx;
gp_Pnt point;
Standard_Real tol;
Standard_Real prmarc;
Standard_Real prmtg;
- Standard_Boolean isonarc;
TopAbs_Orientation traarc;
+ Standard_Boolean isonarc;
Standard_Boolean isvtx;
Standard_Boolean hasvector;
-
};
-
-#include <ChFiDS_CommonPoint.lxx>
-
-
-
-
-
#endif // _ChFiDS_CommonPoint_HeaderFile
+++ /dev/null
-// Created on: 1993-11-30
-// Created by: Isabelle GRIGNON
-// 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.
-
-//=======================================================================
-//function : SetVertex
-//purpose :
-//=======================================================================
-
-inline void ChFiDS_CommonPoint::SetVertex(const TopoDS_Vertex& V)
-{
- isvtx = Standard_True;
- vtx = V;
-}
-
-
-//=======================================================================
-//function : SetPoint
-//purpose :
-//=======================================================================
-
- inline void ChFiDS_CommonPoint::SetPoint(const gp_Pnt& Point)
-{
- point = Point;
-}
-
-//=======================================================================
-//function : SetVector
-//purpose :
-//=======================================================================
-
- inline void ChFiDS_CommonPoint::SetVector(const gp_Vec& Vector)
-{
- hasvector = Standard_True;
- vector = Vector;
-}
-
-//=======================================================================
-//function : SetTolerance
-//purpose :
-// PMN : 30/09/1997 : On se contente d'updater la tolerance.
-//=======================================================================
-
- inline void ChFiDS_CommonPoint::SetTolerance(const Standard_Real Tol)
-{
- if (Tol>tol) tol = Tol;
-}
-
-
-//=======================================================================
-//function : Tolerance
-//purpose :
-//=======================================================================
-
- inline Standard_Real ChFiDS_CommonPoint::Tolerance()const
-{
- return tol;
-}
-
-
-//=======================================================================
-//function : IsVertex
-//purpose :
-//=======================================================================
-
- inline Standard_Boolean ChFiDS_CommonPoint::IsVertex()const
-{
- return isvtx;
-}
-
-
-//=======================================================================
-//function : Vertex
-//purpose :
-//=======================================================================
-
- inline const TopoDS_Vertex& ChFiDS_CommonPoint::Vertex()const
-{
- if (!isvtx) {throw Standard_DomainError();}
- return vtx;
-}
-
-//=======================================================================
-//function : Point
-//purpose :
-//=======================================================================
-
- inline const gp_Pnt& ChFiDS_CommonPoint::Point()const
-{
- return point;
-}
-
-//=======================================================================
-//function : HasVector
-//purpose :
-//=======================================================================
-
- inline Standard_Boolean ChFiDS_CommonPoint::HasVector()const
-{
- return hasvector;
-}
-
-//=======================================================================
-//function : Vector
-//purpose :
-//=======================================================================
-
- inline const gp_Vec& ChFiDS_CommonPoint::Vector()const
-{
- if (!hasvector) {
- throw Standard_DomainError("ChFiDS_CommonPoint::Vector");
- }
- return vector;
-}
-
-//=======================================================================
-//function : IsOnArc
-//purpose :
-//=======================================================================
-
- inline Standard_Boolean ChFiDS_CommonPoint::IsOnArc()const
-{
- return isonarc;
-}
-
-
-
-
ChFiDS_CircSection.hxx
ChFiDS_CommonPoint.cxx
ChFiDS_CommonPoint.hxx
-ChFiDS_CommonPoint.lxx
ChFiDS_ElSpine.cxx
ChFiDS_ElSpine.hxx
ChFiDS_ErrorStatus.hxx