Skip to content

Commit 1f6d9e5

Browse files
committed
Rebase with main
1 parent 77e0354 commit 1f6d9e5

File tree

7 files changed

+99
-191
lines changed

7 files changed

+99
-191
lines changed

src/Core/Geom/Curve.cpp

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -634,80 +634,6 @@ bool Curve::isA(const std::string& name)
634634
return (name.compare(0,getTinyName().size(),getTinyName()) == 0);
635635
}
636636
/*----------------------------------------------------------------------------*/
637-
<<<<<<< HEAD
638-
void Curve::add(Group::Group1D* grp)
639-
{
640-
//std::cout<<"Curve::add("<<grp->getName()<<") à "<<getName()<<std::endl;
641-
m_groups.push_back(grp);
642-
643-
TkUtil::Color color (0, 0, 0);
644-
std::vector<Group::GroupEntity*> groups = Internal::groupsFromTypedGroups (m_groups);
645-
if (true == getContext ( ).getGroupColor (groups, color))
646-
{
647-
getDisplayProperties ( ).setCloudColor (color);
648-
getDisplayProperties ( ).setWireColor (color);
649-
getDisplayProperties ( ).setSurfacicColor (color);
650-
getDisplayProperties ( ).setFontColor (color);
651-
} // if (true == getContext ( ).getGroupColor (groups, color))
652-
}
653-
/*----------------------------------------------------------------------------*/
654-
void Curve::remove(Group::Group1D* grp)
655-
{
656-
uint i = 0;
657-
for (; i<m_groups.size() && grp != m_groups[i]; ++i)
658-
;
659-
660-
if (i!=m_groups.size())
661-
m_groups.erase(m_groups.begin()+i);
662-
else
663-
throw TkUtil::Exception(TkUtil::UTF8String ("Erreur interne (pas de groupe), avec Curve::remove", TkUtil::Charset::UTF_8));
664-
}
665-
/*----------------------------------------------------------------------------*/
666-
bool Curve::find(Group::Group1D* grp)
667-
{
668-
uint i = 0;
669-
for (; i<m_groups.size() && grp != m_groups[i]; ++i)
670-
;
671-
672-
return (i!=m_groups.size());
673-
}
674-
/*----------------------------------------------------------------------------*/
675-
void Curve::getGroupsName (std::vector<std::string>& gn) const
676-
{
677-
gn.clear();
678-
for (uint i = 0; i<m_groups.size(); ++i)
679-
gn.push_back(m_groups[i]->getName());
680-
}
681-
/*----------------------------------------------------------------------------*/
682-
void Curve::getGroups(std::vector<Group::GroupEntity*>& grp) const
683-
{
684-
grp.insert(grp.end(), m_groups.begin(), m_groups.end());
685-
}
686-
/*----------------------------------------------------------------------------*/
687-
int Curve::getNbGroups() const
688-
{
689-
return m_groups.size();
690-
}
691-
/*----------------------------------------------------------------------------*/
692-
void Curve::setDestroyed(bool b)
693-
{
694-
if (isDestroyed() == b)
695-
return;
696-
697-
// supprime la relation du groupe vers la courbe en cas de destruction
698-
if (b)
699-
for (uint i = 0; i<m_groups.size(); ++i)
700-
m_groups[i]->remove(this);
701-
else
702-
// et inversement en cas de ressurection
703-
for (uint i = 0; i<m_groups.size(); ++i)
704-
m_groups[i]->add(this);
705-
706-
Entity::setDestroyed(b);
707-
}
708-
/*----------------------------------------------------------------------------*/
709-
=======
710-
>>>>>>> 3e32643 (Reduce dependencencies Geom --> Group)
711637
bool Curve::isLinear() const
712638
{
713639
if (m_occ_edges.size() == 1)

src/Core/Group/GroupHelperForCommand.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ addToGroup(const std::string& group_name, Geom::GeomEntity* e)
3636
if (! (m_group_manager.getGroupsFor(e).size() > 0 && group->isDefaultGroup())) {
3737
group->add(e);
3838
m_group_manager.addGroupFor(e, group);
39+
m_info_command.addGeomInfoEntity (e, Internal::InfoCommand::DISPMODIFIED);
3940
m_info_command.addGroupInfoEntity(group, Internal::InfoCommand::DISPMODIFIED);
4041
}
4142

src/Core/Group/GroupManager.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,18 +1920,27 @@ const std::vector<GroupEntity*>& GroupManager::getGroupsFor(const Geom::GeomEnti
19201920
return m_entities_groups[e];
19211921
}
19221922
/*----------------------------------------------------------------------------*/
1923-
void GroupManager::addGroupFor(const Geom::GeomEntity* e, GroupEntity* g)
1923+
void GroupManager::addGroupFor(Geom::GeomEntity* e, GroupEntity* g)
19241924
{
19251925
if (e->getDim() != g->getDim()) {
19261926
TkUtil::UTF8String messErr (TkUtil::Charset::UTF_8);
19271927
messErr << e->getName() << " doit être de même dimension que " << g->getName();
19281928
throw TkUtil::Exception(messErr);
19291929
}
1930-
if (!hasGroupFor(e, g))
1930+
if (!hasGroupFor(e, g)) {
19311931
m_entities_groups[e].push_back(g);
1932+
1933+
TkUtil::Color color (0, 0, 0);
1934+
if (true == getContext().getGroupColor(m_entities_groups[e], color)) {
1935+
e->getDisplayProperties().setCloudColor(color);
1936+
e->getDisplayProperties().setWireColor(color);
1937+
e->getDisplayProperties().setSurfacicColor(color);
1938+
e->getDisplayProperties().setFontColor(color);
1939+
} // if (true == getContext ( ).getGroupColor (groups, color))
1940+
}
19321941
}
19331942
/*----------------------------------------------------------------------------*/
1934-
void GroupManager::setGroupsFor(const Geom::GeomEntity* e, const std::vector<GroupEntity*>& gs)
1943+
void GroupManager::setGroupsFor(Geom::GeomEntity* e, const std::vector<GroupEntity*>& gs)
19351944
{
19361945
m_entities_groups[e].clear();
19371946
for (GroupEntity* g : gs) addGroupFor(e, g);

src/Core/Topo/CommandSplitFaces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void CommandSplitFaces::init(std::vector<Topo::CoFace* > &cofaces)
114114
for (Topo::CoFace* hcf : cofaces){
115115

116116
if (hcf->isStructured()){
117-
if (hcf->getNbFaces()) {
117+
if (hcf->getFaces().size() > 0) {
118118
// si hcf est 2D, elle n'a pas de face
119119
// et si au moins une coface est 3D, le cas est 3D
120120
m_cas_2D = false;

0 commit comments

Comments
 (0)