Miscellaneous fixes
This commit is contained in:
committed by
Stefan Tröger
parent
4addc00d97
commit
fb9d56911d
@@ -69,7 +69,8 @@ public:
|
||||
* That is, sketches and datum features are skipped
|
||||
* If inclusive is true, start or the Tip is returned if it is a solid feature
|
||||
*/
|
||||
virtual App::DocumentObject *getPrevSolidFeature(App::DocumentObject *start = NULL, const bool inclusive = true){}
|
||||
virtual App::DocumentObject *getPrevSolidFeature(App::DocumentObject *start = NULL, const bool inclusive = true)
|
||||
{ return NULL; }
|
||||
|
||||
/// Return the body which this feature belongs too, or NULL
|
||||
static BodyBase* findBodyOf(const App::DocumentObject* f);
|
||||
|
||||
@@ -16,6 +16,7 @@ include_directories(
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${QT_INCLUDE_DIR}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
# include <Standard_Version.hxx>
|
||||
#endif
|
||||
|
||||
#include <QObject>
|
||||
#include <App/Plane.h>
|
||||
#include "DatumFeature.h"
|
||||
#include <Base/Tools.h>
|
||||
|
||||
@@ -155,7 +155,7 @@ void ViewProviderDatumPlane::updateData(const App::Property* prop)
|
||||
m /= points.size();
|
||||
|
||||
// Sort by angles
|
||||
double a[points.size()];
|
||||
std::vector<double> a(points.size());
|
||||
for (int i = 0; i < points.size() - 1; i++) {
|
||||
if (longest == 0)
|
||||
a[i] = atan2(points[i].z - m.z, points[i].y - m.y);
|
||||
|
||||
@@ -4486,9 +4486,9 @@ namespace SketcherGui {
|
||||
if (!sSubName || sSubName[0] == '\0')
|
||||
return false;
|
||||
std::string element(sSubName);
|
||||
// for the moment we allow only edges and vertices
|
||||
if ((element.size() > 4 && element.substr(0,4) == "Edge") ||
|
||||
(element.size() > 6 && element.substr(0,6) == "Vertex")) {
|
||||
(element.size() > 6 && element.substr(0,6) == "Vertex") ||
|
||||
(element.size() > 4 && element.substr(0,4) == "Face")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -4596,7 +4596,8 @@ public:
|
||||
if (obj->getTypeId().isDerivedFrom(App::Plane::getClassTypeId()) ||
|
||||
obj->getTypeId().isDerivedFrom(Part::Datum::getClassTypeId()) ||
|
||||
(subName.size() > 4 && subName.substr(0,4) == "Edge") ||
|
||||
(subName.size() > 6 && subName.substr(0,6) == "Vertex")) {
|
||||
(subName.size() > 6 && subName.substr(0,6) == "Vertex") ||
|
||||
(subName.size() > 4 && subName.substr(0,4) == "Face")) {
|
||||
try {
|
||||
Gui::Command::openCommand("Add external geometry");
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.addExternal(\"%s\",\"%s\")",
|
||||
|
||||
Reference in New Issue
Block a user