00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022 #ifndef VOLUMILL_VOLUMILLEXCHANGE_H
00023 #define VOLUMILL_VOLUMILLEXCHANGE_H
00024
00025 #include <Geom/Curve.h>
00026 #include <Util/Params.h>
00027
00028 namespace exchange
00029 {
00030
00031 struct VoluMill2dBoundaries
00032 {
00033 typedef std::vector<geom::CurvePtr2d> Curves;
00034 friend class boost::serialization::access;
00035 template<class Archive>
00036 void serialize(Archive & ar, const unsigned int )
00037 {
00038 ar & boost::serialization::make_nvp ("partBoundaries", m_partBoundaries);
00039 ar & boost::serialization::make_nvp ("materialBoundaries", m_materialBoundaries);
00040 }
00041
00042 Curves m_partBoundaries;
00043 Curves m_materialBoundaries;
00044 };
00045
00046 struct VoluMill2dInput
00047 {
00048 friend class boost::serialization::access;
00049 template<class Archive>
00050 void serialize(Archive & ar, const unsigned int )
00051 {
00052 ar & boost::serialization::make_nvp ("boundaries", m_boundaries);
00053 ar & boost::serialization::make_nvp ("parameters", m_parameters);
00054 }
00055
00056 VoluMill2dBoundaries m_boundaries;
00057 util::Parameterized m_parameters;
00058 };
00059
00060 void fromVoluMill2dInputToXml (std::ostream& os, const VoluMill2dInput& input);
00061 void fromXmlToVoluMill2dInput (std::istream& is, VoluMill2dInput* pInput);
00062 void fromVoluMill2dInputToBinary (std::ostream& os, const VoluMill2dInput& input);
00063 void fromBinaryToVoluMill2dInput (std::istream& is, VoluMill2dInput* pInput);
00064
00065 struct ToolpathRecords;
00066 int submitVoluMill2dJob (
00067 int version, const VoluMill2dInput& input, const std::string& hostname, int port, std::string* pSessionKey);
00068 int getToolpathRecords (
00069 int jobId, const std::string& hostname, int port, const std::string& sessionKey, ToolpathRecords* pRecords, std::string* pErrorMessage);
00070 bool getVoluMillServers (int version, const std::string& hostname, int port, const std::string& uri,
00071 std::vector<std::string>* pHostnames, std::vector<int>* pPorts);
00072 void calculateSlotParameters (double diameter, double stepover, double depth, double feedrate,
00073 double* pSlotDepth, double* pSlotFeedrate);
00074 }
00075 #endif