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//using namespace LibBoard;
17struct Point
18{
19 Point(double x=0, double y=0)
20 {
21 this->x = x;
22 this->y = y;
23 }
24 double x;
25 double y;
26};
27
29{
30 struct PosAndText
31 {
32 Point pos;
33 std::string text;
34 PosAndText(double x, double y, std::string txt)
35 {
36 pos = Point(x, y);
37 text = txt;
38 };
39 };
40
41public:
42 void AddText(double x, double y, std::string txt);
43 void AddPoly(std::vector<Point> points);
44 void ToFile(std::string filename);
45 void Clear();
46
47private:
48 //std::string svg;
49 std::vector<std::vector<Point>> polylines;
50 std::vector<PosAndText> texts;
51};
52
54{
55public:
59
60 static void DrawNet(CTrawlNetAssembler& Net, std::string sFileName);
61 static void DrawNet(std::vector<std::vector<TrawlSpec::SPosXY>> VVSSectionPos, std::string sFileName);
62 static void DrawBoardLogo();
63 static void DrawSection(std::vector<TrawlSpec::SPosXY> VPoints, std::vector<int> VViNodes);
64 static void DrawPolyline(std::vector<TrawlSpec::SPosXY> VPoints);
65 static Point PosToPoint(TrawlSpec::SPosXY Pos);
66 static TrawlNetSvgPrinter svgprinter;
67
68protected:
69
70};
Class used to collect and contain the specification of a trawl net.
Definition CTrawlNetAssembler.h:29
Definition CTrawlNetPrinter.h:54
CTrawlNetPrinter(void)
Constructor.
Definition CTrawlNetPrinter.h:29
Class used to make a drawing to postscript of the trawl net.
Definition CTrawlNetPrinter.h:18
Definition NTrawlSpec.h:264