Skip to content

Commit 861b01f

Browse files
committed
Merge branch 'master' into github_master
2 parents 8ee52b3 + c9b7a45 commit 861b01f

File tree

94 files changed

+1556
-992
lines changed

Some content is hidden

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

94 files changed

+1556
-992
lines changed

range/Range/doc/RELEASE_NOTES.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
------------------------------------------------------------------
22
Version 3.2.2
33

4-
* Use HTTPS as default when contacting Range server
4+
* GUI: Use HTTPS as default when contacting Range server
5+
* GUI: When selected, display roller boundary condition in 3D area
6+
* SOLVER: Roller boundary condition can be applied also on points and lines
57

68
Bug fixes:
79

8-
* Correctly calculate line elements
9-
* If 3D is disabled for vector field, then vectors should project to underlying entity. Applies for surface, cut and ISO surface.
10-
* Corrections in tutorials
11-
* Handle HTTP redirections
10+
* SOLVER: Correctly calculate line elements
11+
* GUI: Do not use icons in output browsers tabs which can cause GUI to freeze
12+
* GUI: If 3D is disabled for vector field, then vectors should project to underlying entity. Applies for surfaces, cuts and ISO surfaces
13+
* GUI: Handle HTTP redirections
14+
* DOC: Corrections in tutorials
1215

1316
------------------------------------------------------------------
1417
Version 3.2.1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
<h1>Remove duplicate elements</h1>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Remove duplicate nodes</h1>

range/Range/src/action.cpp

Lines changed: 40 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,9 @@ void Action::onModelOpen()
263263

264264
void Action::onModelSave()
265265
{
266-
QList<uint> selectedModelIDs = Session::getInstance().getSelectedModelIDs();
267-
268-
for (int i=0;i<selectedModelIDs.size();i++)
266+
foreach (uint selectedModelID,Session::getInstance().getSelectedModelIDs())
269267
{
270-
Model &rModel = Session::getInstance().getModel(selectedModelIDs[i]);
268+
Model &rModel = Session::getInstance().getModel(selectedModelID);
271269

272270
QString fileName = ModelIO::getModelSaveName(MainSettings::getInstance(),this->mainWindow,rModel);
273271

@@ -395,7 +393,7 @@ void Action::onModelClose()
395393
QList<uint> modelIDs = Session::getInstance().getSelectedModelIDs();
396394
for (int i=0;i<modelIDs.size();i++)
397395
{
398-
RLogger::info("Closing model \'%s\'\n",Session::getInstance().getModel(modelIDs.size()-i-1).getName().toUtf8().constData());
396+
RLogger::info("Closing model \'%s\'\n",Session::getInstance().getModel(uint(modelIDs.size()-i-1)).getName().toUtf8().constData());
399397
Session::getInstance().removeModel(modelIDs[modelIDs.size()-i-1]);
400398
}
401399
}
@@ -1218,13 +1216,11 @@ void Action::onGeometrySurfaceCloseHole()
12181216
return;
12191217
}
12201218

1221-
QList<uint> modelIDs = pickList.getModelIDs();
1222-
1223-
for (int i=0;i<modelIDs.size();i++)
1219+
foreach (uint modelID,pickList.getModelIDs())
12241220
{
12251221
QList<uint> holeIDs;
12261222

1227-
QVector<PickItem> pickItems = pickList.getItems(modelIDs[i]);
1223+
QVector<PickItem> pickItems = pickList.getItems(modelID);
12281224
for (int j=0;j<pickItems.size();j++)
12291225
{
12301226
if (pickItems[j].getItemType() == PICK_ITEM_HOLE_ELEMENT)
@@ -1238,7 +1234,7 @@ void Action::onGeometrySurfaceCloseHole()
12381234
}
12391235
}
12401236

1241-
ModelActionInput modelActionInput(modelIDs[i]);
1237+
ModelActionInput modelActionInput(modelID);
12421238
modelActionInput.setCloseSurfaceHole(holeIDs);
12431239

12441240
ModelAction *modelAction = new ModelAction;
@@ -1446,11 +1442,9 @@ void Action::onGeometryDevExportSliverElements()
14461442

14471443
void Action::onGeometryDevExportIntersectedElements()
14481444
{
1449-
QList<uint> modelIDs = Session::getInstance().getSelectedModelIDs();
1450-
1451-
for (int i=0;i<modelIDs.size();i++)
1445+
foreach (uint modelID, Session::getInstance().getSelectedModelIDs())
14521446
{
1453-
ModelActionInput modelActionInput(modelIDs[i]);
1447+
ModelActionInput modelActionInput(modelID);
14541448
modelActionInput.setExportIntersectedElements();
14551449

14561450
ModelAction *modelAction = new ModelAction;
@@ -1462,11 +1456,9 @@ void Action::onGeometryDevExportIntersectedElements()
14621456

14631457
void Action::onGeometryDevPurgeUnusedNodes()
14641458
{
1465-
QList<uint> selectedModelIDs = Session::getInstance().getSelectedModelIDs();
1466-
1467-
for (int i=0;i<selectedModelIDs.size();i++)
1459+
foreach (uint modelID, Session::getInstance().getSelectedModelIDs())
14681460
{
1469-
ModelActionInput modelActionInput(selectedModelIDs[i]);
1461+
ModelActionInput modelActionInput(modelID);
14701462
modelActionInput.setPurgeUnusedNodes();
14711463

14721464
ModelAction *modelAction = new ModelAction;
@@ -1478,11 +1470,9 @@ void Action::onGeometryDevPurgeUnusedNodes()
14781470

14791471
void Action::onGeometryDevPurgeUnusedElements()
14801472
{
1481-
QList<uint> selectedModelIDs = Session::getInstance().getSelectedModelIDs();
1482-
1483-
for (int i=0;i<selectedModelIDs.size();i++)
1473+
foreach (uint modelID, Session::getInstance().getSelectedModelIDs())
14841474
{
1485-
ModelActionInput modelActionInput(selectedModelIDs[i]);
1475+
ModelActionInput modelActionInput(modelID);
14861476
modelActionInput.setPurgeUnusedElements();
14871477

14881478
ModelAction *modelAction = new ModelAction;
@@ -1492,6 +1482,34 @@ void Action::onGeometryDevPurgeUnusedElements()
14921482
}
14931483
}
14941484

1485+
void Action::onGeometryDevRemoveDuplicateNodes()
1486+
{
1487+
foreach (uint modelID, Session::getInstance().getSelectedModelIDs())
1488+
{
1489+
ModelActionInput modelActionInput(modelID);
1490+
modelActionInput.setRemoveDuplicateNodes();
1491+
1492+
ModelAction *modelAction = new ModelAction;
1493+
modelAction->setAutoDelete(true);
1494+
modelAction->addAction(modelActionInput);
1495+
JobManager::getInstance().submit(modelAction);
1496+
}
1497+
}
1498+
1499+
void Action::onGeometryDevRemoveDuplicateElements()
1500+
{
1501+
foreach (uint modelID, Session::getInstance().getSelectedModelIDs())
1502+
{
1503+
ModelActionInput modelActionInput(modelID);
1504+
modelActionInput.setRemoveDuplicateElements();
1505+
1506+
ModelAction *modelAction = new ModelAction;
1507+
modelAction->setAutoDelete(true);
1508+
modelAction->addAction(modelActionInput);
1509+
JobManager::getInstance().submit(modelAction);
1510+
}
1511+
}
1512+
14951513
void Action::onGeometryDevPointInsideSurface()
14961514
{
14971515
QList<SessionEntityID> selectedEntityIDs = Session::getInstance().getSelectedEntityIDs();

range/Range/src/action.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@ class Action : public QAction
257257
//! Purge unused elements.
258258
void onGeometryDevPurgeUnusedElements();
259259

260+
//! Merge duplicate nodes.
261+
void onGeometryDevRemoveDuplicateNodes();
262+
263+
//! Merge duplicate elements.
264+
void onGeometryDevRemoveDuplicateElements();
265+
260266
//! Check if point is inside/behind surface.
261267
void onGeometryDevPointInsideSurface();
262268

range/Range/src/action_definition.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ QList<ActionType> ActionDefinition::getActionTypes(ActionGroupTypeMask actionGro
9090
{
9191
QList<ActionType> actionTypes;
9292

93-
for (int i=0;i<this->actionDesc.size();i++)
93+
foreach (ActionDefinitionItem item, this->actionDesc)
9494
{
95-
if (this->actionDesc[i].getGroupType() & actionGroupTypeMask)
95+
if (item.getGroupType() & actionGroupTypeMask)
9696
{
97-
actionTypes.push_back(this->actionDesc[i].getType());
97+
actionTypes.push_back(item.getType());
9898
}
9999
}
100100

@@ -176,6 +176,8 @@ void ActionDefinition::generateActionDescList(QList<ActionDefinitionItem> &actio
176176
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_EXPORT_INTERSECTED_ELEMENTS, ACTION_GROUP_GEOMETRY, "Export intersected elements", "", "", "", &Action::onGeometryDevExportIntersectedElements));
177177
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_PURGE_UNUSED_NODES, ACTION_GROUP_GEOMETRY, "Purge unused nodes", "", "", "", &Action::onGeometryDevPurgeUnusedNodes));
178178
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_PURGE_UNUSED_ELEMENTS, ACTION_GROUP_GEOMETRY, "Purge unused elements", "", "", "", &Action::onGeometryDevPurgeUnusedElements));
179+
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_REMOVE_DUPLICATE_NODES, ACTION_GROUP_GEOMETRY, "Remove duplicate nodes", "", "", "", &Action::onGeometryDevRemoveDuplicateNodes));
180+
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_REMOVE_DUPLICATE_ELEMENTS, ACTION_GROUP_GEOMETRY, "Remove duplicate elements", "", "", "", &Action::onGeometryDevRemoveDuplicateElements));
179181
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_POINT_INSIDE_SURFACE, ACTION_GROUP_GEOMETRY, "Check if point is inside surface", "", "", "", &Action::onGeometryDevPointInsideSurface));
180182
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_TETRAHEDRALIZE_SURFACE, ACTION_GROUP_GEOMETRY, "Tetrahedralize surface", "", "", "", &Action::onGeometryDevTetrahedralizeeSurface));
181183
actionDesc.push_back(ActionDefinitionItem(ACTION_GEOMETRY_DEV_CONSOLIDATE, ACTION_GROUP_GEOMETRY, "Consolidate geometry", "", "", "", &Action::onGeometryDevConsolidate));

range/Range/src/action_definition_item.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ ActionDefinitionItem &ActionDefinitionItem::operator =(const ActionDefinitionIte
5555
return (*this);
5656
}
5757

58-
ActionType ActionDefinitionItem::getType(void) const
58+
ActionType ActionDefinitionItem::getType() const
5959
{
6060
return this->type;
6161
}
6262

63-
ActionGroupType ActionDefinitionItem::getGroupType(void) const
63+
ActionGroupType ActionDefinitionItem::getGroupType() const
6464
{
6565
return this->groupType;
6666
}
6767

68-
const QString &ActionDefinitionItem::getShortcut(void) const
68+
const QString &ActionDefinitionItem::getShortcut() const
6969
{
7070
return this->shortCut;
7171
}

range/Range/src/action_definition_item.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ typedef enum _ActionType
119119
ACTION_GEOMETRY_DEV_EXPORT_INTERSECTED_ELEMENTS,
120120
ACTION_GEOMETRY_DEV_PURGE_UNUSED_NODES,
121121
ACTION_GEOMETRY_DEV_PURGE_UNUSED_ELEMENTS,
122+
ACTION_GEOMETRY_DEV_REMOVE_DUPLICATE_NODES,
123+
ACTION_GEOMETRY_DEV_REMOVE_DUPLICATE_ELEMENTS,
122124
ACTION_GEOMETRY_DEV_POINT_INSIDE_SURFACE,
123125
ACTION_GEOMETRY_DEV_TETRAHEDRALIZE_SURFACE,
124126
ACTION_GEOMETRY_DEV_CONSOLIDATE,
@@ -148,7 +150,7 @@ typedef enum _ActionType
148150

149151
class Action;
150152

151-
typedef void (Action::*PointerToMemberFunction)(void);
153+
typedef void (Action::*PointerToMemberFunction)();
152154

153155
class ActionDefinitionItem
154156
{
@@ -177,7 +179,7 @@ class ActionDefinitionItem
177179
const QString &desc = QString(),
178180
const QString &shortCut = QString(),
179181
const QString &icon = QString(),
180-
PointerToMemberFunction slot = 0);
182+
PointerToMemberFunction slot = nullptr);
181183

182184
//! Copy constructor.
183185
ActionDefinitionItem(const ActionDefinitionItem &actionDefinitionItem);
@@ -189,13 +191,13 @@ class ActionDefinitionItem
189191
ActionDefinitionItem &operator =(const ActionDefinitionItem &actionDefinitionItem);
190192

191193
//! Return action type.
192-
ActionType getType(void) const;
194+
ActionType getType() const;
193195

194196
//! Return action group type.
195-
ActionGroupType getGroupType(void) const;
197+
ActionGroupType getGroupType() const;
196198

197199
//! Return const reference to shortcut.
198-
const QString &getShortcut(void) const;
200+
const QString &getShortcut() const;
199201

200202
//! Return action group name.
201203
static QString getGroupName(ActionGroupType groupType);

range/Range/src/action_list.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ void ActionList::processAvailability(void)
145145
this->getAction(ACTION_GEOMETRY_DEV_EXPORT_INTERSECTED_ELEMENTS)->setEnabled(true);
146146
this->getAction(ACTION_GEOMETRY_DEV_PURGE_UNUSED_NODES)->setEnabled(true);
147147
this->getAction(ACTION_GEOMETRY_DEV_PURGE_UNUSED_ELEMENTS)->setEnabled(true);
148+
this->getAction(ACTION_GEOMETRY_DEV_REMOVE_DUPLICATE_NODES)->setEnabled(true);
149+
this->getAction(ACTION_GEOMETRY_DEV_REMOVE_DUPLICATE_ELEMENTS)->setEnabled(true);
148150
this->getAction(ACTION_GEOMETRY_DEV_POINT_INSIDE_SURFACE)->setEnabled(true);
149151
this->getAction(ACTION_GEOMETRY_DEV_TETRAHEDRALIZE_SURFACE)->setEnabled(true);
150152
this->getAction(ACTION_GEOMETRY_DEV_CONSOLIDATE)->setEnabled(true);

range/Range/src/bc_manager_tree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ typedef enum _BoundaryConditionTreeColumn
2323
BC_TREE_N_COLUMNS
2424
} BoundaryConditionTreeColumn;
2525

26-
BCManagerTree::BCManagerTree(QObject *parent) :
27-
QTreeWidget((QWidget*)parent),
26+
BCManagerTree::BCManagerTree(QWidget *parent) :
27+
QTreeWidget(parent),
2828
doNotPopulate(false)
2929
{
3030
this->setSelectionMode(QAbstractItemView::SingleSelection);

0 commit comments

Comments
 (0)