Exemplo n.º 1
0
 public TruckProperties(Document document, double length, double width, double height)
     : base(document)
 {
     _length = length;
     _width = width;
     _height = height;
 }
 /// <summary>
 /// Default constructor used for creating analysis 
 /// </summary>
 public FormNewAnalysisHCylinder(Document document)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
 }
Exemplo n.º 3
0
 public PalletProperties(Document document, string typeName, double length, double width, double height)
     : base(document)
 {
     _typeName = typeName;
     _length = length;
     _width = width;
     _height = height;
 }
 /// <summary>
 /// Default constructor used for creating analysis
 /// </summary>
 public FormNewAnalysisHCylinder(Document document)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
 }
Exemplo n.º 5
0
        public SelCasePalletSolution(Document document, CasePalletAnalysis analysis, CasePalletSolution sol)
            : base(document)
        {
            _analysis = analysis;
            _analysis.AddDependancy(this);

            _solution = sol;
            Name = sol.Title; 
        }
Exemplo n.º 6
0
 /// <summary>
 /// Constructor 2
 /// </summary>
 /// <param name="document">Parent document</param>
 /// <param name="length">Outer length</param>
 /// <param name="width">Outer width</param>
 /// <param name="height">Outer height</param>
 public BoxProperties(Document document, double length, double width, double height)
     : base(document)
 {
     _length     = length;
     _width      = width;
     _height     = height;
     _hasInsideDimensions = false;
     _showTape = false;
 }
 /// <summary>
 /// Constructor used while browsing/editing existing analysis
 /// </summary>
 /// <param name="document">Parent document</param>
 /// <param name="analysis">Analysis</param>
 public FormNewBoxCaseAnalysis(Document document, BoxCaseAnalysis analysis)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     _analysis = analysis;
     // set caption text
     Text = string.Format(Properties.Resources.ID_EDIT, _analysis.Name);
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="document">Parent document</param>
 public FormNewBoxCaseAnalysis(Document document)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     // name
     tbName.Text = _document.GetValidNewAnalysisName(Resources.ID_ANALYSIS);
     tbDescription.Text = tbName.Text;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Constructor 3
 /// </summary>
 /// <param name="document">Parent document</param>
 /// <param name="length">Outer length</param>
 /// <param name="width">Outer width</param>
 /// <param name="height">Outer height</param>
 /// <param name="insideLength">Inner length</param>
 /// <param name="insideWidth">Inner width</param>
 /// <param name="insideHeight">Inner height</param>
 public BoxProperties(Document document, double length, double width, double height, double insideLength, double insideWidth, double insideHeight)
     : base(document)
 {
     _length     = length;
     _width      = width;
     _height     = height;
     _insideLength = insideLength;
     _insideWidth = insideWidth;
     _insideHeight = insideHeight;
     _hasInsideDimensions = true;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Default constructor used for creating analysis
 /// </summary>
 public FormNewAnalysisCylinder(Document document)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     // update interlayer UI
     onInterlayerChecked(this, null);
     onInterlayerAntiSlipChecked(this, null);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Default constructor used for creating analysis 
 /// </summary>
 public FormNewAnalysisCylinder(Document document)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     // update interlayer UI
     onInterlayerChecked(this, null);
     onInterlayerAntiSlipChecked(this, null);
 }
Exemplo n.º 12
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="document">Parent document</param>
 public FormNewBoxCaseAnalysis(Document document)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     // name
     tbName.Text        = _document.GetValidNewAnalysisName(Resources.ID_ANALYSIS);
     tbDescription.Text = tbName.Text;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Constructor used while browsing/editing existing analysis
 /// </summary>
 /// <param name="document">Parent document</param>
 /// <param name="analysis">Analysis</param>
 public FormNewBoxCaseAnalysis(Document document, BoxCaseAnalysis analysis)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     _analysis = analysis;
     // set caption text
     Text = string.Format(Properties.Resources.ID_EDIT, _analysis.Name);
 }
Exemplo n.º 14
0
        static void Main(string[] args)
        {
            ILog log = LogManager.GetLogger(typeof(Program));
            XmlConfigurator.Configure();

            try
            {
                // check arguments
                if (args.Length != 1)
                {
                    log.Info("No command argument. Exiting...");
                    return;
                }
                if (!File.Exists(args[0]))
                {
                    log.Info(string.Format("File {0} could not be found. Exiting...", args[0]));
                    return;
                }

                string filePath = args[0];
                string outputPath = Path.ChangeExtension(filePath, "dae");
                // load document
                Document doc = new Document(filePath, new DocumentListenerLog());
                // get first analysis
                List<CasePalletAnalysis> analyses = doc.Analyses;
                if (analyses.Count == 0)
                {
                    log.Info("Document has no analysis -> Exiting...");
                    return;
                }
                CasePalletAnalysis analysis = analyses[0];
                if (analysis.Solutions.Count == 0)
                {
                    log.Info("Analysis has no solution -> Exiting...");
                    return;
                }

                CasePalletSolution palletSolution = analysis.Solutions[0];
                // export collada file
                ColladaExporter.Exporter exporter = new Exporter(palletSolution);
                exporter.Export(outputPath);
                log.Debug(string.Format("Successfully exported {0} ...", outputPath));

                // browse file
                Exporter.BrowseWithGoogleChrome(outputPath);

            }
            catch (Exception ex)
            {
                log.Error(ex.ToString());
            }
        }
Exemplo n.º 15
0
 /// <summary>
 /// Constructor 2
 /// </summary>
 /// <param name="document">Parent document</param>
 /// <param name="width">Width</param>
 /// <param name="color">Color</param>
 public PalletCornerProperties(Document document,
     string name, string description,
     double length, double width, double thickness,
     double weight,
     Color color)
     : base(document, name, description)
 {
     _length = length;
     _width = width;
     _thickness = thickness;
     _weight = weight;
     _color = color;
 }
Exemplo n.º 16
0
 public CylinderProperties(Document document, string name, string description
     , double radiusOuter, double radiusInner, double height, double weight
     , Color colorTop, Color colorWallOuter, Color colorWallInner)
     : base(document, name, description)
 {
     _radiusOuter = radiusOuter;
     _radiusInner = radiusInner;
     _height = height;
     _weight = weight;
     _colorTop = colorTop;
     _colorWallOuter = colorWallOuter;
     _colorWallInner = colorWallInner;
 }
Exemplo n.º 17
0
 public PalletCapProperties(Document doc,
     string name, string description,
     double length, double width, double height,
     double insideLength, double insideWidth, double insideHeight,
     double weight,
     Color color)
     : base(doc, name, description)
 {
     _length = length; _width = width; _height = height;
     _insideLength = insideLength; _insideWidth = insideWidth; _insideHeight = insideHeight;
     _weight = weight;
     _color = color;
 }
Exemplo n.º 18
0
 /// <summary>
 /// Truck analysis
 /// </summary>
 /// <param name="document">Parent document</param>
 /// <param name="analysis">Parent pallet analysis</param>
 /// <param name="selSolution">Parent selected solution</param>
 /// <param name="truckProperties">TruckProperties item</param>
 /// <param name="constraintSet">Constraint set</param>
 public TruckAnalysis(
     Document document
     , CasePalletAnalysis analysis
     , SelCasePalletSolution selSolution
     , TruckProperties truckProperties
     , TruckConstraintSet constraintSet)
     : base(document)
 {
     Name = truckProperties.Name;
     _analysis = analysis;
     _selSolution = selSolution;
     this.TruckProperties = truckProperties;
     _constraintSet = constraintSet;
 }
Exemplo n.º 19
0
 /// <summary>
 /// Constructor used while browsing/editing existing analysis
 /// </summary>
 public FormNewAnalysisCylinder(Document document, CylinderPalletAnalysis analysis)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     _analysis = analysis;
     // set caption text
     Text = string.Format(Properties.Resources.ID_EDIT, _analysis.Name);
     // update interlayer UI
     onInterlayerChecked(this, null);
     onInterlayerAntiSlipChecked(this, null);
 }
Exemplo n.º 20
0
 /// <summary>
 /// Constructor used while browsing/editing existing analysis
 /// </summary>
 public FormNewAnalysisCylinder(Document document, CylinderPalletAnalysis analysis)
 {
     InitializeComponent();
     // set unit labels
     UnitsManager.AdaptUnitLabels(this);
     // save document reference
     _document = document;
     _analysis = analysis;
     // set caption text
     Text = string.Format(Properties.Resources.ID_EDIT, _analysis.Name);
     // update interlayer UI
     onInterlayerChecked(this, null);
     onInterlayerAntiSlipChecked(this, null);
 }
Exemplo n.º 21
0
 public PalletFilmProperties(Document doc,
     string name, string description,
     bool useTransparency,
     bool useHatching
     , double hatchSpacing
     , double hatchAngle,
     Color color)
     : base(doc, name, description)
 {
     _useTransparency = useTransparency;
     _useHatching = useHatching;
     _hatchSpacing = hatchSpacing;
     _hatchAngle = hatchAngle;
     _color = color;
 }
Exemplo n.º 22
0
        /// <summary>
        /// Instantiate a new case from a box, a case definition and a case optimization constraintset
        /// </summary>
        /// <param name="document">Parent document</param>
        /// <param name="bProperties">Box properties</param>
        /// <param name="constraintSet">Case optimization constraint set</param>
        public CaseOfBoxesProperties(Document document
            , BoxProperties boxProperties
            , CaseDefinition caseDefinition
            , CaseOptimConstraintSet constraintSet)
            : base(document)
        {
            _boxProperties = boxProperties;
            _boxProperties.AddDependancy(this);
            _caseDefinition = caseDefinition;
            _constraintSet = constraintSet;

            base.Weight = _caseDefinition.CaseEmptyWeight(_boxProperties, _constraintSet);

            OnAttributeModified(boxProperties);
        }
Exemplo n.º 23
0
 public BundleProperties(Document document, string name, string description,
     double length, double width
     , double unitThickness
     , double unitWeight
     , int noFlats
     , Color color)
     : base(document, name, description)
 {
     _length = length;
     _width = width;
     _unitThickness = unitThickness;
     _unitWeight = unitWeight;
     _noFlats = noFlats;
     _color = color;
 }
Exemplo n.º 24
0
        static void Main(string[] args)
        {
            ILog log = LogManager.GetLogger(typeof(Program));
            XmlConfigurator.Configure();

            try
            {
                // check arguments
                if (args.Length != 1)
                {
                    log.Info("No command argument. Exiting...");
                    return;
                }
                if (!File.Exists(args[0]))
                { 
                    log.Info(string.Format("File {0} could not be found. Exiting...", args[0]));
                    return;
                }

                string filePath = args[0];
                // load document
                Document doc = new Document(filePath,  new DocumentListenerLog());
                // get first analysis
                List<CasePalletAnalysis> analyses = doc.Analyses;
                if (analyses.Count == 0)
                {
                    log.Info("Document has no analysis -> Exiting...");
                    return;
                }
                // build output file path
                string outputFilePath = Path.ChangeExtension(Path.GetTempFileName(), "doc");
                string templatePath = @"..\..\..\treeDiM.StackBuilder.Reporting\ReportTemplates\";
                ReporterMSWord reporter = new ReporterMSWord(
                    new ReportData(analyses[0], analyses[0].GetSelSolutionBySolutionIndex(0))
                    , templatePath, outputFilePath, new Margins());
                Console.WriteLine("Saved report to: {0}", outputFilePath);

                // Display resulting report in Word
                Process.Start(new ProcessStartInfo(outputFilePath));                
            }
            catch (Exception ex)
            {
                log.Error(ex.ToString());
            }
        }
Exemplo n.º 25
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ECTAnalysis(
     Document document
     , CasePalletAnalysis analysis
     , SelCasePalletSolution selSolution)
     : base(document)
 {
     _analysis = analysis;
     _selSolution = selSolution;
     // get a cardboard quality
     foreach (string skey in McKeeFormula.CardboardQualityDictionary.Keys)
     {
         _qualityData = McKeeFormula.CardboardQualityDictionary[skey];
         break;
     }
     // get a _printSurface value
     foreach (string skey in McKeeFormula.PrintCoefDictionary.Keys)
     {
         _printSurface = skey;
         break;
     }                       
 }
Exemplo n.º 26
0
 public BProperties(Document document, string name, string description)
     : base(document, name, description)
 { 
 }
Exemplo n.º 27
0
 public void OnNewTypeCreated(Document doc, ItemBase itemBase)
 {
     _log.Info(string.Format("Loaded item {0}", itemBase.Name));
 }
Exemplo n.º 28
0
 public BProperties(Document document)
     : base(document)
 { 
 }
Exemplo n.º 29
0
 public void OnNewCylinderPalletAnalysisCreated(Document doc, CylinderPalletAnalysis analysis)
 {
     _log.Info(string.Format("Loaded cylinder/pallet analysis {0}", analysis.Name));
 }
Exemplo n.º 30
0
 public void OnNewHCylinderPalletAnalysisCreated(Document doc, HCylinderPalletAnalysis analysis)
 { 
 }
Exemplo n.º 31
0
 public void OnNewBoxCasePalletAnalysisCreated(Document doc, BoxCasePalletAnalysis caseAnalysis)
 {
     _log.Info(string.Format("Loaded box/case/pallet analysis {0}", caseAnalysis.Name));
 }
Exemplo n.º 32
0
 /// <summary>
 /// Constructor 1
 /// </summary>
 /// <param name="document">Parent document</param>
 public BoxProperties(Document document)
     : base(document)
 {
     _length = 0.0; _width = 0.0; _height = 0.0;
     _hasInsideDimensions = true;
 }
Exemplo n.º 33
0
 public TruckProperties(Document document)
     : base(document)
 { 
 }
Exemplo n.º 34
0
 public void OnNewDocument(Document doc)
 {
     _log.Info(string.Format("Opened document {0}", doc.Name));
 }
Exemplo n.º 35
0
 public CylinderProperties(Document document)
     : base(document)
 {
 }