HIghlighting references when editing constraints

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

HIghlighting references when editing constraints

Post by jnxd »

This topic is created to discuss PR #5391, which is intended to highlight geometries on which an FEM constraint is being applied when we are editing the constraint.

I am starting with the Displacement constraint and using PartDesignGui::ViewProviderDressUp as the base. Currently, I am having some problem importing a class PartDesignGui::ReferenceHighlighter. The exact error report is as follows:

Code: Select all

/usr/bin/ld: CMakeFiles/FemGui.dir/ViewProviderFemConstraintDisplacement.cpp.o: in function `FemGui::ViewProviderFemConstraintDisplacement::highlightReferences(bool)':
.../src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp:122: undefined reference to `PartDesignGui::ReferenceHighlighter::ReferenceHighlighter(TopoDS_Shape const&, App::Color const&)'
/usr/bin/ld: .../src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp:133: undefined reference to `PartDesignGui::ReferenceHighlighter::ReferenceHighlighter(TopoDS_Shape const&, App::Color const&)'
/usr/bin/ld: .../src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp:134: undefined reference to `PartDesignGui::ReferenceHighlighter::getEdgeColors(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<App::Color, std::allocator<App::Color> >&) const'
/usr/bin/ld: .../src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp:142: undefined reference to `PartDesignGui::ReferenceHighlighter::ReferenceHighlighter(TopoDS_Shape const&, App::Color const&)'
/usr/bin/ld: .../src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp:143: undefined reference to `PartDesignGui::ReferenceHighlighter::getFaceColors(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::vector<App::Color, std::allocator<App::Color> >&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [src/Mod/Fem/Gui/CMakeFiles/FemGui.dir/build.make:1765: Mod/Fem/FemGui.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:5600: src/Mod/Fem/Gui/CMakeFiles/FemGui.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
A bit of searching suggests that this issue happens because the functions are declared but not defined correctly. However, the same header is already being used in PDGui, so that doesn't appear to be the problem. Also, there doesn't appear to be anything from PartDesignGui that is imported anywhere so I can't use that to compare and find an issue.
My latest (or last) project: B-spline Construction Project.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: HIghlighting references when editing constraints

Post by jnxd »

For anyone in the future encountering this issue, it was fixed by adding PartGui (previously PartDesignGui before git commit af868ed079414be0967dda6240125a7a33d15a09) to CMakeLists.txt.
My latest (or last) project: B-spline Construction Project.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: HIghlighting references when editing constraints

Post by Kunda1 »

Can you add this to Release_notes_0.20 please ? :D
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply