mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-28 04:20:46 +08:00
0027241: Create a complete test case to verify reading of all attribute types from MDTV-Standard document
Added test case that works in one of two modes: 1) create synthetic document (in old version of OCCT) containing all possible attributes. 2) open the document and compare all attributes with expected values. Fixed reading of TDataStd_NamedData, TDataXtd_PatternStd, and PColStd_HArray2OfReal. Point and curve representations are created even from NULL geometry handles. The code is simplified by abandoning usage of templates from StdObjMgt_ContentTypes class for persistent data elements. Fixed SetAsciiString Draw command failed when the target label contained NamedData attribute.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#define _ShapePersistent_HArray1_HeaderFile
|
||||
|
||||
#include <StdLPersistent_HArray1.hxx>
|
||||
#include <StdObject_gp_Vectors.hxx>
|
||||
#include <StdObject_gp_Curves.hxx>
|
||||
|
||||
#include <TColgp_HArray1OfXYZ.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
@@ -32,13 +34,6 @@
|
||||
|
||||
class ShapePersistent_HArray1 : private StdLPersistent_HArray1
|
||||
{
|
||||
template <class ArrayClass>
|
||||
class instance : public StdLPersistent_HArray1::base<ArrayClass>
|
||||
{
|
||||
virtual void readValue (StdObjMgt_ReadData& theReadData,
|
||||
const Standard_Integer theIndex);
|
||||
};
|
||||
|
||||
public:
|
||||
typedef instance<TColgp_HArray1OfXYZ> XYZ;
|
||||
typedef instance<TColgp_HArray1OfPnt> Pnt;
|
||||
@@ -53,4 +48,13 @@ public:
|
||||
typedef instance<Poly_HArray1OfTriangle> Triangle;
|
||||
};
|
||||
|
||||
inline StdObjMgt_ReadData& operator >>
|
||||
(StdObjMgt_ReadData& theReadData, Poly_Triangle& theTriangle)
|
||||
{
|
||||
Standard_Integer N1, N2, N3;
|
||||
theReadData >> N1 >> N2 >> N3;
|
||||
theTriangle.Set (N1, N2, N3);
|
||||
return theReadData;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user