OCCT_DUMP_VECTOR_CLASS (theOStream, "XDirection", 3, vxdir.X(), vxdir.Y(), vxdir.Z())
OCCT_DUMP_VECTOR_CLASS (theOStream, "YDirection", 3, vydir.X(), vydir.Y(), vydir.Z())
}
+
+Standard_Boolean gp_Ax2::InitFromJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
+{
+ Standard_Integer aPos = theStreamPos;
+ TCollection_AsciiString aStreamStr = Standard_Dump::Text (theSStream);
+
+ gp_XYZ anXYZLoc;
+ OCCT_INIT_VECTOR_CLASS (aStreamStr, "Location", aPos, 3,
+ &anXYZLoc.ChangeCoord (1), &anXYZLoc.ChangeCoord (2), &anXYZLoc.ChangeCoord (3))
+ SetLocation (anXYZLoc);
+
+ gp_XYZ aDir;
+ OCCT_INIT_VECTOR_CLASS (aStreamStr, "Direction", aPos, 3,
+ &aDir.ChangeCoord (1), &aDir.ChangeCoord (2), &aDir.ChangeCoord (3))
+ gp_XYZ aXDir;
+ OCCT_INIT_VECTOR_CLASS (aStreamStr, "XDirection", aPos, 3,
+ &aXDir.ChangeCoord (1), &aXDir.ChangeCoord (2), &aXDir.ChangeCoord (3))
+ gp_XYZ anYDir;
+ OCCT_INIT_VECTOR_CLASS (aStreamStr, "YDirection", aPos, 3,
+ &anYDir.ChangeCoord (1), &anYDir.ChangeCoord (2), &anYDir.ChangeCoord (3))
+
+ axis.SetDirection (gp_Dir (aDir));
+ vxdir = gp_Dir (aXDir);
+ vydir = gp_Dir (anYDir);
+
+ if (!Direction().IsEqual (aDir, Precision::Confusion()))
+ return Standard_False;
+
+ theStreamPos = aPos;
+ return Standard_True;
+}