FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CTrawlNetPrinter.h
1#pragma once
2
3#include "CTrawlNetAssembler.h"
4#include "net/NTrawlSpec.h"
5
6//#include <Board.h>
7#include <cmath>
8#include <cstdlib>
9#include <fstream>
10#include <iostream>
11#include <string>
12#include <vector>
13//using namespace LibBoard;
19struct Point
20{
21 Point(double x=0, double y=0)
22 {
23 this->x = x;
24 this->y = y;
25 }
26 double x;
27 double y;
28};
29
31{
32 struct PosAndText
33 {
34 Point pos;
35 std::string text;
36 PosAndText(double x, double y, std::string txt)
37 {
38 pos = Point(x, y);
39 text = txt;
40 };
41 };
42
43public:
44 void AddText(double x, double y, std::string txt);
45 void AddPoly(std::vector<Point> points);
46 void ToFile(std::string filename);
47 void Clear();
48
49private:
50 //std::string svg;
51 std::vector<std::vector<Point>> polylines;
52 std::vector<PosAndText> texts;
53};
54
56{
57public:
61
62 static void DrawNet(CTrawlNetAssembler& Net, std::string sFileName);
63 static void DrawNet(std::vector<std::vector<TrawlSpec::SPosXY>> VVSSectionPos, std::string sFileName);
64 static void DrawBoardLogo();
65 static void DrawSection(std::vector<TrawlSpec::SPosXY> VPoints, std::vector<int> VViNodes);
66 static void DrawPolyline(std::vector<TrawlSpec::SPosXY> VPoints);
67 static Point PosToPoint(TrawlSpec::SPosXY Pos);
68 static TrawlNetSvgPrinter svgprinter;
69
70protected:
71
72};
Class used to collect and contain the specification of a trawl net.
Definition CTrawlNetAssembler.h:31
Definition CTrawlNetPrinter.h:56
CTrawlNetPrinter(void)
Constructor.
Definition CTrawlNetPrinter.h:31
Class used to make a drawing to postscript of the trawl net.
Definition CTrawlNetPrinter.h:20
Definition NTrawlSpec.h:264