Skip to content

Commit c2a2109

Browse files
lelandaisbnicolaslg
authored andcommitted
Remove GeomEntity -> TopoEntity association
1 parent f310e95 commit c2a2109

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+677
-985
lines changed

src/Core/Geom/Curve.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include "Geom/EntityFactory.h"
99
#include "Geom/OCCHelper.h"
1010
#include "Geom/GeomProjectImplementation.h"
11-
#include "Topo/CoEdge.h"
12-
#include "Topo/Vertex.h"
1311
#include "Group/Group1D.h"
1412
/*----------------------------------------------------------------------------*/
1513
#include <TkUtil/MemoryError.h>
@@ -115,32 +113,6 @@ bool Curve::isEqual(Geom::Curve* curve)
115113
return true;
116114
}
117115
/*----------------------------------------------------------------------------*/
118-
void Curve::get(std::vector<Topo::CoEdge*>& coedges)
119-
{
120-
const std::vector<Topo::TopoEntity* >& topos = getRefTopo();
121-
122-
for (std::vector<Topo::TopoEntity* >::const_iterator iter = topos.begin();
123-
iter != topos.end(); ++iter)
124-
if ((*iter)->getDim() == 1){
125-
Topo::CoEdge* coedge = dynamic_cast<Topo::CoEdge*>(*iter);
126-
if (coedge)
127-
coedges.push_back(coedge);
128-
}
129-
}
130-
/*----------------------------------------------------------------------------*/
131-
void Curve::get(std::vector<Topo::Vertex*>& vertices)
132-
{
133-
const std::vector<Topo::TopoEntity* >& topos = getRefTopo();
134-
135-
for (std::vector<Topo::TopoEntity* >::const_iterator iter = topos.begin();
136-
iter != topos.end(); ++iter)
137-
if ((*iter)->getDim() == 0){
138-
Topo::Vertex* vertex = dynamic_cast<Topo::Vertex*>(*iter);
139-
if (vertex)
140-
vertices.push_back(vertex);
141-
}
142-
}
143-
/*----------------------------------------------------------------------------*/
144116
void Curve::
145117
getPoint(const double& p, Utils::Math::Point& Pt, const bool in01) const
146118
{

src/Core/Geom/GeomEntity.cpp

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
/*----------------------------------------------------------------------------*/
1313
#include "Services/DescriptionService.h"
1414
/*----------------------------------------------------------------------------*/
15-
#include "Topo/TopoEntity.h"
16-
#include "Topo/Vertex.h"
17-
#include "Topo/CoEdge.h"
18-
#include "Topo/CoFace.h"
19-
#include "Topo/Block.h"
20-
/*----------------------------------------------------------------------------*/
2115
#include "Group/Group0D.h"
2216
#include "Group/Group1D.h"
2317
#include "Group/Group2D.h"
@@ -100,7 +94,7 @@ getRepresentation(Utils::DisplayRepresentation& dr, bool checkDestroyed) const
10094
/*----------------------------------------------------------------------------*/
10195
Mgx3D::Utils::SerializedRepresentation* GeomEntity::getDescription (bool alsoComputed) const
10296
{
103-
return Services::DescriptionService::describe(this, alsoComputed);
97+
return Services::DescriptionService::getDescription(this, alsoComputed);
10498
}
10599
/*----------------------------------------------------------------------------*/
106100
GeomProperty::type GeomEntity::getGeomType ( ) const
@@ -109,51 +103,6 @@ GeomProperty::type GeomEntity::getGeomType ( ) const
109103
return getGeomProperty ( )->getType ( );
110104
} // GeomEntity::getGeomType
111105
/*----------------------------------------------------------------------------*/
112-
void GeomEntity::addRefTopo(Topo::TopoEntity* te)
113-
{
114-
#ifdef _DEBUG2
115-
std::cout<<"GeomEntity::addRefTopo("<<(te?te->getName():"0")<<") à "<<getName()<<std::endl;
116-
#endif
117-
118-
// recherche si l'entité topologique ne serait pas déjà référencée
119-
uint i = 0;
120-
for (; i<m_topo_entities.size() && te != m_topo_entities[i]; ++i)
121-
;
122-
123-
// elle est déjà présente, on ne fait rien
124-
if (i != m_topo_entities.size())
125-
return;
126-
127-
m_topo_entities.push_back(te);
128-
}
129-
/*----------------------------------------------------------------------------*/
130-
void GeomEntity::removeRefTopo(Topo::TopoEntity* te)
131-
{
132-
#ifdef _DEBUG2
133-
std::cout<<"GeomEntity::removeRefTopo("<<(te?te->getName():"0")<<") à "<<getName()<<std::endl;
134-
#endif
135-
uint i = 0;
136-
for (; i<m_topo_entities.size() && te != m_topo_entities[i]; ++i)
137-
;
138-
139-
// on la retire si elle est présente
140-
if (i!=m_topo_entities.size())
141-
m_topo_entities.erase(m_topo_entities.begin()+i);
142-
// else {
143-
// std::cout<<"m_topo_entities : ";
144-
// for(int i=0;i<m_topo_entities.size();i++)
145-
// std::cout<<" "<<m_topo_entities[i]->getName();
146-
// std::cout<<std::endl;
147-
// throw TkUtil::Exception (TkUtil::UTF8String ("Erreur interne (pas d'entité), avec GeomEntity::removeRefTopo", TkUtil::Charset::UTF_8));
148-
// }
149-
}
150-
/*----------------------------------------------------------------------------*/
151-
void GeomEntity::getRefTopo(std::vector<Topo::TopoEntity* >& vte) const
152-
{
153-
vte.clear();
154-
vte.insert(vte.end(), m_topo_entities.begin(), m_topo_entities.end());
155-
}
156-
/*----------------------------------------------------------------------------*/
157106
void GeomEntity::getGroupsName (std::vector<std::string>& gn) const
158107
{
159108
MGX_FORBIDDEN("getGroupsName est à redéfinir dans les classes dérivées");

src/Core/Geom/GeomInfo.cpp

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)