Skip to content

Commit

Permalink
+ fix issues with force constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 10, 2014
1 parent 96e286a commit 71154f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Mod/Fem/App/FemConstraint.cpp
Expand Up @@ -309,7 +309,10 @@ const Base::Vector3d Constraint::getDirection(const App::PropertyLinkSub &direct
return Base::Vector3d(0,0,0);
std::string subName = names.front();
Part::Feature* feat = static_cast<Part::Feature*>(obj);
TopoDS_Shape sh = feat->Shape.getShape().getSubShape(subName.c_str());
const Part::TopoShape& shape = feat->Shape.getShape();
if (shape.isNull())
return Base::Vector3d(0,0,0);
TopoDS_Shape sh = shape.getSubShape(subName.c_str());
gp_Dir dir;

if (sh.ShapeType() == TopAbs_FACE) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/Gui/TaskFemConstraintForce.cpp
Expand Up @@ -142,7 +142,7 @@ void TaskFemConstraintForce::updateUI()
else if (ref.substr(pos+1, 4) == "Edge")
ui->labelForce->setText(tr("Force [N/mm]"));
else if (ref.substr(pos+1, 4) == "Face")
ui->labelForce->setText(tr("Force [N/mm²]"));
ui->labelForce->setText(trUtf8("Force [N/mm\xc2\xb2]"));
}

void TaskFemConstraintForce::onSelectionChanged(const Gui::SelectionChanges& msg)
Expand Down
2 changes: 0 additions & 2 deletions src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp
Expand Up @@ -55,8 +55,6 @@ ViewProviderFemConstraintForce::~ViewProviderFemConstraintForce()

bool ViewProviderFemConstraintForce::setEdit(int ModNum)
{
Base::Console().Error("ViewProviderFemConstraintForce::setEdit(%u)\n", ModNum);

if (ModNum == ViewProvider::Default ) {
// When double-clicking on the item for this constraint the
// object unsets and sets its edit mode without closing
Expand Down

0 comments on commit 71154f5

Please sign in to comment.