3#include "CTrawlNetAssembler.h"
4#include "SCableSectionData.h"
7#include <marenv/marenv.h>
58 int refinedCables = 0;
76 TrawlSpec::ESectionType_t type = TrawlSpec::SECTIONTYPE_BELLY;
78 std::array<Point, TrawlSpec::SectionNode_NUM> corners {};
79 std::array<int, TrawlSpec::SectionNode_NUM> nodes {};
85 TrawlSpec::EPanel_t panel = TrawlSpec::PANEL_UPPER;
89 std::vector<SectionShape> sections;
94 const int copy = index +
wings;
95 return sections[index].type == TrawlSpec::SECTIONTYPE_WING && copy < static_cast<int>(sections.size()) ? §ions[copy] :
nullptr;
103 std::vector<std::pair<Point, Point>> segments;
104 bool divided =
false;
131std::string
Fixed(
double value,
int decimals);
134std::string
Trimmed(
double value,
int decimals);
140std::string
SideName(TrawlSpec::ESectionSide_t side);
150 std::vector<std::string> warnings;
153 std::vector<std::vector<std::pair<SCableSectionData, report::LineEdge>>>
panelLines;
Class used to collect and contain the specification of a trawl net.
Definition CTrawlNetAssembler.h:31
constexpr double gravity
Gravity constant [m/s^2].
Definition marenv.h:19
constexpr double seawaterDensity
Ocean water density [kg/m^3].
Definition marenv.h:20
std::string Trimmed(double value, int decimals)
value with at most decimals decimals, without trailing zeros.
bool IsRefined(CTrawlNetAssembler &net)
Whether the net is refined by Net/NetStructure (MaxNumPanels or MaxEdgeLengthFactor given).
std::string PanelName(TrawlSpec::EPanel_t panel)
"Upper", "Lower" or "Side".
double DiskVolume(double d, double thickness)
The volume of a disk of diameter d and thickness.
Point Along(Point a, Point b, double fraction)
The point fraction of the way from a to b.
double SphereVolume(double d)
The volume of a sphere of diameter d.
constexpr double kMeantAsPoint
... an edge of fewer meshes than this is taken to be meant as a point.
Definition NetSpecReport.h:36
constexpr double kMaxJoinMismatch
Joined edges of adjoining sections that differ by more than this fraction of the longer,...
Definition NetSpecReport.h:31
constexpr double kMinLineToEdge
A line shorter than this fraction of its netting edge stretched gathers the netting more than hanging...
Definition NetSpecReport.h:29
constexpr double kPointEdge
Definition NetSpecReport.h:34
std::vector< Item > ItemsOf(const SCableSectionData &line, bool divided)
The floats and bobbins of line, as Items; divided: the line is a divided one (two halves).
std::string Fixed(double value, int decimals)
value with decimals decimals, never "-0"; "n/a" for a value that is not finite.
std::string SideName(TrawlSpec::ESectionSide_t side)
The name of a section side, as the specification spells it: "Front", "Back", "Outer",...
constexpr double kMaxLineToEdge
A line longer than its netting edge stretched by more than this factor cannot be hung with that edge.
Definition NetSpecReport.h:27
constexpr double kRhoWater
Sea water density (kg/m³) and gravity (m/s²), as Net/NetStructure's elements take them.
Definition NetSpecReport.h:22
constexpr double kMaxElementMeshes
A net element, after refinement, longer than this many meshes along an edge, stretched.
Definition NetSpecReport.h:38
Reads a trawl net from an XML net specification (doc/user/net-specification.md).
Definition NetSpecReport.h:17
NetSpecReport MakeNetSpecReport(const std::string &specPath)
The analysis of the net specification specPath. Throws NetSpecError for a specification ReadNetSpec r...
Definition SCableSectionData.h:11
The analysis of a net specification, by MakeNetSpecReport.
Definition NetSpecReport.h:146
std::string name
The net's Name.
Definition NetSpecReport.h:148
CTrawlNetAssembler net
The meshed net.
Definition NetSpecReport.h:147
std::vector< std::vector< std::pair< SCableSectionData, report::LineEdge > > > panelLines
Per panel (as in panels), its lines with the edges they run along.
Definition NetSpecReport.h:153
std::vector< report::PanelShape > panels
Definition NetSpecReport.h:151
A float or a bobbin on a line.
Definition NetSpecReport.h:110
double size
Along the line: a float's diameter, a bobbin's thickness.
Definition NetSpecReport.h:112
int segment
The LineEdge segment it is on; -1: on each.
Definition NetSpecReport.h:114
double fraction
Along that segment.
Definition NetSpecReport.h:115
double at
From the line's start, m.
Definition NetSpecReport.h:113
Definition NetSpecReport.h:102
double stretched
The netting edge the line holds, stretched: one side's, or the whole of a divided line's.
Definition NetSpecReport.h:105
The totals of the whole net, port and starboard.
Definition NetSpecReport.h:42
double twineWeightInWater
N.
Definition NetSpecReport.h:44
int numSinkingFloats
Floats not lighter than water.
Definition NetSpecReport.h:46
double stretchedArea
m², every mesh stretched
Definition NetSpecReport.h:50
double floatBuoyancy
N, upwards; a float denser than water counts negative.
Definition NetSpecReport.h:47
double solidity
projected twine area / squareMeshArea
Definition NetSpecReport.h:52
int refinedElements
after Net/NetStructure's refinement
Definition NetSpecReport.h:56
double squareMeshArea
m², every mesh open to a square (opening angle 90°)
Definition NetSpecReport.h:51
int cables
cable elements of the lines
Definition NetSpecReport.h:55
double bobbinWeightInWater
N.
Definition NetSpecReport.h:49
double twineLength
m
Definition NetSpecReport.h:43
int elements
net elements, as meshed (the net file)
Definition NetSpecReport.h:53
A panel as drawn: its sections, the wing copies last.
Definition NetSpecReport.h:84
int behindWings
Belly and splitter sections.
Definition NetSpecReport.h:87
int aftMost
The number of its aftmost section.
Definition NetSpecReport.h:86
int wings
Wing sections of one wing.
Definition NetSpecReport.h:88
const SectionShape * Copy(int index) const
The other wing's copy of wing section index, or nullptr.
Definition NetSpecReport.h:92
A position on a panel, as the mesher draws it: metres at square meshes, x forward from the aft end,...
Definition NetSpecReport.h:63
A section as drawn: its corners and their node numbers (-1: none).
Definition NetSpecReport.h:73
int number
Counted from the aft end of the net.
Definition NetSpecReport.h:74
bool mirrored
The other wing's copy of a wing section.
Definition NetSpecReport.h:75