mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
[bos #42217][EDF 28921] Horseshoe with bodyfitting.
Added operators << for nodes and links debug output.
This commit is contained in:
parent
312549ec64
commit
dda7e97469
@ -32,7 +32,7 @@
|
||||
class SMDS_EXPORT SMDS_FaceOfNodes: public SMDS_CellOfNodes
|
||||
{
|
||||
public:
|
||||
void Print(std::ostream & OS) const;
|
||||
virtual void Print(std::ostream & OS) const override;
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3);
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
|
||||
SMDS_Mesh* GetMesh() const;
|
||||
|
||||
void Print(std::ostream & OS) const;
|
||||
virtual void Print(std::ostream & OS) const;
|
||||
|
||||
friend SMDS_EXPORT std::ostream & operator <<(std::ostream & OS, const SMDS_MeshElement *);
|
||||
friend class SMDS_ElementFactory;
|
||||
|
@ -65,7 +65,7 @@ class SMDS_EXPORT SMDS_MeshNode: public SMDS_MeshElement
|
||||
virtual bool IsMediumNode(const SMDS_MeshNode* /*node*/) const { return false; }
|
||||
virtual int NbCornerNodes() const { return 1; }
|
||||
|
||||
void Print(std::ostream & OS) const;
|
||||
virtual void Print(std::ostream & OS) const override;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -47,7 +47,7 @@ class SMDS_EXPORT SMDS_PolygonalFaceOfNodes : public SMDS_CellOfNodes
|
||||
virtual int NbEdges() const;
|
||||
virtual int NbFaces() const;
|
||||
|
||||
virtual void Print (std::ostream & OS) const;
|
||||
virtual void Print (std::ostream & OS) const override;
|
||||
|
||||
virtual const SMDS_MeshNode* GetNode(const int ind) const;
|
||||
|
||||
|
@ -62,7 +62,7 @@ class SMDS_EXPORT SMDS_VolumeOfNodes: public SMDS_CellOfNodes
|
||||
const int nbNodes);
|
||||
~SMDS_VolumeOfNodes();
|
||||
|
||||
void Print(std::ostream & OS) const;
|
||||
virtual void Print(std::ostream & OS) const override;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
int NbEdges() const;
|
||||
|
@ -539,6 +539,9 @@ namespace Cartesian3D
|
||||
{
|
||||
threads.emplace_back(f, std::ref(*it));
|
||||
}
|
||||
|
||||
// This line for debug in sequential mode
|
||||
// std::for_each(it, last, f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -157,6 +157,24 @@ namespace Cartesian3D
|
||||
|
||||
void Add( const StdMeshers::Cartesian3D::E_IntersectPoint* ip );
|
||||
void clear();
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const _Node& node)
|
||||
{
|
||||
if (node._node)
|
||||
{
|
||||
os << "Node at hexahedron corner: ";
|
||||
node._node->Print(os);
|
||||
}
|
||||
else if (node._intPoint && node._intPoint->_node)
|
||||
{
|
||||
os << "Node at intersection point: ";
|
||||
node._intPoint->_node->Print(os); // intersection point
|
||||
}
|
||||
else
|
||||
os << "mesh node is null\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
@ -172,6 +190,25 @@ namespace Cartesian3D
|
||||
_Link(): _nodes{ 0, 0 }, _faces{ 0, 0 } {}
|
||||
|
||||
void clear();
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const _Link& link)
|
||||
{
|
||||
os << "Link:\n";
|
||||
|
||||
for (std::size_t i = 0; i < nodesNum; ++i)
|
||||
{
|
||||
if (link._nodes[i])
|
||||
os << *link._nodes[i];
|
||||
else
|
||||
os << "link node with index " << i << " is null\n";
|
||||
}
|
||||
|
||||
os << "_fIntPoints: " << link._fIntPoints.size() << '\n';
|
||||
os << "_fIntNodes: " << link._fIntNodes.size() << '\n';
|
||||
os << "_splits: " << link._splits.size() << '\n';
|
||||
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
@ -241,6 +278,16 @@ namespace Cartesian3D
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const _OrientedLink& link)
|
||||
{
|
||||
if (link._link)
|
||||
os << "Oriented " << *link._link;
|
||||
else
|
||||
os << "Oriented link is null\n";
|
||||
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
@ -314,6 +361,34 @@ namespace Cartesian3D
|
||||
_polyLinks.push_back( l );
|
||||
_links.push_back( _OrientedLink( &_polyLinks.back() ));
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const _Face& face)
|
||||
{
|
||||
os << "Face " << face._name << '\n';
|
||||
|
||||
os << "Links on GridLines: \n";
|
||||
for (const auto& link : face._links)
|
||||
{
|
||||
os << link;
|
||||
}
|
||||
|
||||
os << "Links added to close a polygonal face: \n";
|
||||
for (const auto& link : face._polyLinks)
|
||||
{
|
||||
os << link;
|
||||
}
|
||||
|
||||
os << "Nodes at intersection with EDGEs: \n";
|
||||
for (const auto node : face._eIntNodes)
|
||||
{
|
||||
if (node)
|
||||
{
|
||||
os << *node;
|
||||
}
|
||||
}
|
||||
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user