myUVNodes.Clear();
}
+//=======================================================================
+//function : AddNode
+//purpose :
+//=======================================================================
+Standard_Integer Poly_Triangulation::AddNode (const gp_Pnt& theNode)
+{
+ myNodes.Append (theNode);
+
+ if (!myUVNodes.IsEmpty())
+ {
+ myUVNodes.Append (gp_Pnt2d (0.0, 0.0));
+ }
+
+ if (!myNormals.IsEmpty())
+ {
+ Standard_Integer aNbNormals = myNodes.Size();
+ myNormals.SetValue (aNbNormals + 2, 0.0);
+ myNormals.SetValue (aNbNormals + 1, 0.0);
+ myNormals.SetValue (aNbNormals, 0.0);
+ }
+
+ return myNodes.Size();
+}
+
//=======================================================================
//function : Node
//purpose :
//! @return true if 2D nodes are associated with 3D nodes for this triangulation.
Standard_Boolean HasUVNodes() const { return !myUVNodes.IsEmpty(); }
+ //! Adds Node to the triangulation. If triangulation has UVNodes or Normals
+ //! they will be expanded and set to zero values to match the new number of nodes.
+ //! @return index of the added Node.
+ Standard_EXPORT Standard_Integer AddNode (const gp_Pnt& theNode);
+
//! @return node at the given index.
//! Raises exception if theIndex is less than 1 or bigger than NbNodes().
Standard_EXPORT const gp_Pnt& Node (const Standard_Integer theIndex) const;
//! Raises exception if theIndex is less than 1 or bigger than NbNodes().
Standard_EXPORT gp_Pnt& ChangeNode (const Standard_Integer theIndex);
- //! Adds UVNode to the triangulation.
- //! @return index of the added UVNode.
- Standard_EXPORT Standard_Integer AddUVNode (const gp_Pnt2d& theUVNode);
-
//! @return UVNode at the given index.
//! Raises Standard_OutOfRange exception.
Standard_EXPORT const gp_Pnt2d& UVNode (const Standard_Integer theIndex) const;