]> OCCT Git - occt-copy.git/commitdiff
0025936: Modeling Data - reusable data structure for 2D tesselation (3- and 4-nodal... CR25936_4
authorvro <vladislav.romashko@opencascade.com>
Thu, 11 Feb 2021 11:49:44 +0000 (14:49 +0300)
committervro <vladislav.romashko@opencascade.com>
Thu, 11 Feb 2021 11:49:44 +0000 (14:49 +0300)
// Implementation of Poly_PolygonOnTriangulation::Node() was skipped

src/Poly/Poly_PolygonOnTriangulation.cxx
src/Poly/Poly_PolygonOnTriangulation.hxx

index c7832eedbd22ad6710cfb15a12dca7df3be09266..c087894555e249366dc366f19608cb2da8ee8020 100644 (file)
@@ -79,6 +79,18 @@ Handle(Poly_PolygonOnTriangulation) Poly_PolygonOnTriangulation::Copy() const
   return aCopy;
 }
 
+//=======================================================================
+//function : Node
+//purpose  : 
+//=======================================================================
+
+Standard_Integer Poly_PolygonOnTriangulation::Node (const Standard_Integer theIndex) const
+{
+  Standard_OutOfRange_Raise_if ((theIndex < 1 || theIndex > myNodes.Length()),
+                                "Poly_PolygonOnTriangulation::Node : index out of range");
+  return myNodes.Value (theIndex);
+}
+
 //=======================================================================
 //function : SetNode
 //purpose  : 
index a4764e078d820a953de681efeb9f2e2da9b44102..8b2c1d2384173859f2fcb35431d864de1ff219e0 100644 (file)
@@ -86,11 +86,11 @@ public:
 
   //! Return node at the given index.
   //! Raises exception if theIndex is less than NodesLowerIndex or bigger than NodesUpperIndex.
-  Standard_EXPORT Standard_Integer Node(const Standard_Integer theIndex) const;
+  Standard_EXPORT Standard_Integer Node (const Standard_Integer theIndex) const;
 
   //! Sets node at the given index.
   //! Raises exception if theIndex is less than NodesLowerIndex or bigger than NodesUpperIndex.
-  Standard_EXPORT void SetNode(const Standard_Integer theIndex, const Standard_Integer theNode);
+  Standard_EXPORT void SetNode (const Standard_Integer theIndex, const Standard_Integer theNode);
 
   //! Returns true if parameters are associated with the nodes in this polygon.
   Standard_Boolean HasParameters() const { return !myParameters.IsNull(); }
@@ -104,12 +104,12 @@ public:
   //! Return parameter at the given index.
   //! Raises Standard_NullObject exception if parameters has not been initialized.
   //! Raises Standard_OutOfRange exception if theIndex is less than ParametersLowerIndex or bigger than ParametersUpperIndex.
-  Standard_EXPORT Standard_Real Parameter(const Standard_Integer theIndex) const;
+  Standard_EXPORT Standard_Real Parameter (const Standard_Integer theIndex) const;
 
   //! Sets parameter at the given index.
   //! Raises Standard_NullObject exception if parameters has not been initialized.
   //! Raises Standard_OutOfRange exception if theIndex is less than ParametersLowerIndex or bigger than ParametersUpperIndex. 
-  Standard_EXPORT void SetParameter(const Standard_Integer theIndex, const Standard_Real theValue);
+  Standard_EXPORT void SetParameter (const Standard_Integer theIndex, const Standard_Real theValue);
 
 
   //! Sets the table of the parameters associated with each node in this polygon.