10#ifndef C_TRAWL_NET_SPEC_H
11#define C_TRAWL_NET_SPEC_H
13#include "CModelWriter.h"
14#include "SCableSectionData.h"
16#include "net/NetElementDef.h"
17#include "net/NTrawlSpec.h"
18#include "net/SNetSectionData.h"
24#ifdef FH_VISUALIZATION
25# include "OgreColourValue.h"
38 void AddSectionToFront(TrawlSpec::EPanel_t EWhichPanel,
double barD,
double barRho,
double barE,
39 double barL,
double N,
double T1,
double T2,
double T3 = -1,
double cutN = 0,
40 double cutB = 0,
double cutT = 0,
double reinforcementRatio = 0,
double refineFactor = 1
41#ifdef FH_VISUALIZATION
43 Ogre::ColourValue twineColour = Ogre::ColourValue(0.1f, 0.3f, 0.2f, 0.5f)
53#ifdef FH_VISUALIZATION
55 Ogre::ColourValue twineColour = Ogre::ColourValue(0.1f, 0.3f, 0.2f, 0.5f)
60 void AddSectionToBack(TrawlSpec::EPanel_t EWhichPanel,
double barD,
double barRho,
double barE,
61 double barL,
double N,
double T1,
double T2,
double T3 = -1,
double cutN = 0,
62 double cutB = 0,
double cutT = 0,
double reinforcementRatio = 0,
double refineFactor = 1
63#ifdef FH_VISUALIZATION
65 Ogre::ColourValue twineColour = Ogre::ColourValue(0.1f, 0.3f, 0.2f, 0.5f)
75#ifdef FH_VISUALIZATION
77 Ogre::ColourValue twineColour = Ogre::ColourValue(0.1f, 0.3f, 0.2f, 0.5f)
85 void DeleteSection(TrawlSpec::EPanel_t EWhichPanel,
int iSecNo,
bool bFromBack =
true);
100 int GetNumSections(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::EPanelEdge_t EWhichEdge);
106 void AddLine(
int sectionNum, TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::ESectionSide_t side,
107 double L,
double D,
double E,
double rho);
110 void AddLine(
int sectionNum, TrawlSpec::EPanel_t EWhichPanel,
177 double GetStretchedEdge(
int sectionNum, TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::ESectionSide_t side);
179#ifdef FH_VISUALIZATION
181 void SetNetSectionColour(Ogre::ColourValue twineColour, TrawlSpec::EPanel_t EWhichPanel,
int iSecNo,
bool bFromBack =
true);
184 void SetNetColour(Ogre::ColourValue twineColour);
204 bool HasTriangularFront(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::EPanelEdge_t EWhichEdge);
207 bool HasTriangularAft(TrawlSpec::EPanel_t EWhichPanel);
210 int GetWingSectionIndex(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::EPanelEdge_t EWhichEdge,
int iWingSecNum);
Class used to collect and contain the specification of a trawl net.
Definition CTrawlNetSpec.h:29
void SetError(std::string sErrorMsg)
Sets the error state.
bool m_bMirrorWingsIsDone[3]
Reflects for which panels the wings have been mirrored.
Definition CTrawlNetSpec.h:230
int GetNumExternalConnections()
Gets the number of external connections on each side of the trawl net.
void AddLine(int sectionNum, TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::ESectionSide_t side, SCableSectionData SCableSection)
Adds a line, chain, gear or Headline to the trawl net.
bool m_bExternalNodesAreSet
Indicates if the external nodes have been set by calling SetExternalNodeIndices.
Definition CTrawlNetSpec.h:228
bool m_bHasSidePanel
A bool telling if the trawl net has four panels.
Definition CTrawlNetSpec.h:226
CTrawlNetSpec(void)
Constructor.
void AddSectionToFront(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::SMeshBar SBar, TrawlSpec::SPanelCut SCut, double reinforcementRatio=0, double refineFactor=1)
Adds a section to the front of the trawl net.
int GetNumSections(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::EPanelEdge_t EWhichEdge)
Gets the number of sections in a panel.
double m_dMinNodeSeparation
The minimum separation between two nodes in front or aft of a section before it is handled as one nod...
Definition CTrawlNetSpec.h:225
void AddLine(SCableSectionData SCableSection)
Adds a line, chain, gear or Headline to the trawl net.
bool SetMirrorWings(TrawlSpec::EPanel_t EWhichPanel, bool bMirror)
Sets the wings of a specified panel to be mirrored or not.
TrawlSpec::ESectionType_t DetermineSectionType(TrawlSpec::EPanel_t EWhichPanel, int iSecNo)
Determines if the section is a wing, splitter or belly section, based on its placement.
double GetStretchedEdge(int sectionNum, TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::ESectionSide_t side)
Get stretched length of section side.
void AddExternalConnection(TrawlSpec::ENetExternalNodes_t ENode)
Adds an external connection to the net.
TrawlSpec::SNetSection GetSection(TrawlSpec::EPanel_t EWhichPanel, int iSecNo, bool bFromBack=true)
Gets the specification of a specified net section.
void AddSectionToFront(TrawlSpec::EPanel_t EWhichPanel, double barD, double barRho, double barE, double barL, double N, double T1, double T2, double T3=-1, double cutN=0, double cutB=0, double cutT=0, double reinforcementRatio=0, double refineFactor=1)
Adds a section to the front of the trawl net.
void AddSectionToFront(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::SNetSection NetSection)
Adds a section to the front of the trawl net.
int GetNumBellySections(TrawlSpec::EPanel_t EWhichPanel)
Gets the number of belly sections in a panel, not counting splitter section.
void MirrorWings(TrawlSpec::EPanel_t EWhichPanel)
Mirrors the wings for the specified panels.
void SetAftMostSectionNumber(TrawlSpec::EPanel_t EWhichPanel, int iAftSection)
Defines the aft-forward placement of a panel in relation to a common baseline.
bool m_bMirrorWings[3]
Reflects for which panels the wings should be mirrored.
Definition CTrawlNetSpec.h:229
void ResetInput(bool bResetError)
Resets both input and output data of the object.
bool GetMirrorWings(TrawlSpec::EPanel_t EWhichPanel)
Gets if the wings of a specified panel are to be mirrored or not.
void AddLine(int sectionNum, TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::ESectionSide_t side, double L, double D, double E, double rho)
Adds a line or chain to the trawl net.
bool HasError()
Returns if an error has occured in this class.
bool m_bHasError
Have there been any errors in this object?
Definition CTrawlNetSpec.h:227
std::set< TrawlSpec::ENetExternalNodes_t > m_ViExternalConnections
The indices of the nodes to select for external connections. 0 - 5 designate the wings,...
Definition CTrawlNetSpec.h:223
int m_aiAftSection[3]
The relative section number of the aftmost section of each panel, counted from the aft.
Definition CTrawlNetSpec.h:222
double GetMinNodeSeparation() const
The mesh count under which an aft or front end edge of a panel is meshed as a point.
Definition CTrawlNetSpec.h:147
void SetNumConnectedSections(TrawlSpec::EPanel_t EWhichPanel, int iNumSections)
Defines how far forward the a panel is connected to other panels.
void AddSectionToBack(TrawlSpec::EPanel_t EWhichPanel, double barD, double barRho, double barE, double barL, double N, double T1, double T2, double T3=-1, double cutN=0, double cutB=0, double cutT=0, double reinforcementRatio=0, double refineFactor=1)
Adds a section to the back of the trawl net.
int GetNumSplitterSections(TrawlSpec::EPanel_t EWhichPanel)
Gets the number of splitter sections in a panel.
std::string GetPanelString(TrawlSpec::EPanel_t EWhichPanel)
Creates a string specifying the panel.
std::set< TrawlSpec::ENetExternalNodes_t > m_ViExternalNodesOutput
The indices of the nodes to select for external connections. 0 - 5 designate the wings,...
Definition CTrawlNetSpec.h:224
void AddExternalNodeOutput(TrawlSpec::ENetExternalNodes_t ENode)
Adds an external output node to the net.
int m_aiConnectedSections[3]
The number of sections connected to each panel.
Definition CTrawlNetSpec.h:221
int MirrorWings()
Mirrors the wings for the appropriate panels.
void AddSectionToBack(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::SMeshBar SBar, TrawlSpec::SPanelCut SCut, double reinforcementRatio=0, double refineFactor=1)
Adds a section to the back of the trawl net.
const std::set< TrawlSpec::ENetExternalNodes_t > & GetExternalOutputs() const
Gets the external nodes that only output their positions and velocities (AddExternalNodeOutput).
Definition CTrawlNetSpec.h:165
std::string m_sError
A string describing the first error string.
Definition CTrawlNetSpec.h:220
bool IsSidepanel(TrawlSpec::EPanel_t EWhichPanel)
Tests if a specified panel is a side panel;.
void AddSectionToBack(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::SNetSection NetSection)
Adds a section to the back of the trawl net.
int GetWingSectionIndex(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::EPanelEdge_t EWhichEdge, int iWingSecNum)
Gets the index of a specified wing section.
void DeletePanel(TrawlSpec::EPanel_t EWhichPanel)
Deletes all net sections of the specified panel.
void UpdateSection(TrawlSpec::SNetSection NetSection, TrawlSpec::EPanel_t EWhichPanel, int iSecNo, bool bFromBack=true)
Updates the specified net section.
int GetNumLines(TrawlSpec::EPanel_t EWhichPanel)
Gets the number of lines in a specified panel.
int GetNumWingSections(TrawlSpec::EPanel_t EWhichPanel, TrawlSpec::EPanelEdge_t EWhichEdge)
Gets the number of wing sections in a panel.
void SetExternalNodeIndices(std::set< TrawlSpec::ENetExternalNodes_t > ViExternalNodes)
Sets the indices of the nodes to be used for external connections.
TrawlSpec::SNetPanel * GetPanelPtr(TrawlSpec::EPanel_t EWhichPanel)
Gets a pointer to the panel defined by an enum.
int GetAftMostSectionNumber(TrawlSpec::EPanel_t EWhichPanel)
Gets the aft-forward placement of a panel in relation to a common baseline.
SCableSectionData GetLine(TrawlSpec::EPanel_t EWhichPanel, int iLineIndex)
Gets the specification of a line connected to the trawl net.
~CTrawlNetSpec(void)
Destructor.
std::set< TrawlSpec::ENetExternalNodes_t > GetExternalConnections()
Gets the external connections on each side of the trawl net.
std::string GetError()
Returns a string specifying the first error that occured in this class.
SCableSectionData * GetLinePtr(TrawlSpec::EPanel_t EWhichPanel, int iLineIndex)
Gets a pointer to a line connected to the trawl net.
void DeleteSection(TrawlSpec::EPanel_t EWhichPanel, int iSecNo, bool bFromBack=true)
Deletes the specified net section.
int GetNumConnectedSections(TrawlSpec::EPanel_t EWhichPanel)
Gets how far forward the upper panel is connected to other panels.
std::vector< TrawlSpec::SNetPanel > m_VSPanelInfo
A vector of structures containing the sections comprising the various panels.
Definition CTrawlNetSpec.h:219
Definition SCableSectionData.h:17
Definition NTrawlSpec.h:79
Definition SNetPanel.h:22
Definition NTrawlSpec.h:128
Definition NTrawlSpec.h:95