Common/Exchange/VoluMillExchange.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------------
00004 //  Copyright (c) 2007 Celeritive Technologies, Inc.
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License, or (at your option) any later version.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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 /*version*/)
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 /*version*/)
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

Generated on Tue Jan 29 21:37:56 2008 for VoluMill Universal Client by  doxygen 1.4.6