Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad

This commit is contained in:
Yorik van Havre 2012-06-11 17:15:00 -03:00
commit a82d8bfc26
5 changed files with 33 additions and 16 deletions

View File

@ -34,6 +34,7 @@
#include <App/Application.h>
#include <boost/regex.hpp>
#include <iostream>
#include <iterator>
#include "FeaturePage.h"
#include "FeatureView.h"
@ -86,10 +87,11 @@ void FeaturePage::onChanged(const App::Property* prop)
App::DocumentObjectExecReturn *FeaturePage::execute(void)
{
if(Template.getValue() == "")
std::string temp = Template.getValue();
if (temp.empty())
return App::DocumentObject::StdReturn;
Base::FileInfo fi(Template.getValue());
Base::FileInfo fi(temp);
if (!fi.isReadable()) {
// if there is a old absolute template file set use a redirect
fi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName());
@ -186,8 +188,9 @@ std::vector<std::string> FeaturePage::getEditableTextsFromTemplate(void) const {
std::vector<string> eds;
if (Template.getValue() != "") {
Base::FileInfo tfi(Template.getValue());
std::string temp = Template.getValue();
if (!temp.empty()) {
Base::FileInfo tfi(temp);
if (!tfi.isReadable()) {
// if there is a old absolute template file set use a redirect
tfi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + tfi.fileName());

View File

@ -71,21 +71,21 @@ public:
virtual std::vector<PyObject *> getPySubObjects(const std::vector<std::string>&) const;
/**
/* Find the origin of a reference, e.g. the vertex or edge in a sketch that
/* produced a face
*/
* Find the origin of a reference, e.g. the vertex or edge in a sketch that
* produced a face
*/
const TopoDS_Shape findOriginOf(const TopoDS_Shape& reference);
protected:
void onChanged(const App::Property* prop);
TopLoc_Location getLocation() const;
/**
/* Build a history of changes
/* MakeShape: The operation that created the changes, e.g. BRepAlgoAPI_Common
/* type: The type of object we are interested in, e.g. TopAbs_FACE
/* newS: The new shape that was created by the operation
/* oldS: The original shape prior to the operation
*/
* Build a history of changes
* MakeShape: The operation that created the changes, e.g. BRepAlgoAPI_Common
* type: The type of object we are interested in, e.g. TopAbs_FACE
* newS: The new shape that was created by the operation
* oldS: The original shape prior to the operation
*/
ShapeHistory buildHistory(BRepBuilderAPI_MakeShape&, TopAbs_ShapeEnum type,
const TopoDS_Shape& newS, const TopoDS_Shape& oldS);
ShapeHistory joinHistory(const ShapeHistory&, const ShapeHistory&);
@ -121,9 +121,9 @@ public:
// Utility methods
/**
/* Find all faces cut by a line through the centre of gravity of a given face
/* Useful for the "up to face" options to pocket or pad
*/
* Find all faces cut by a line through the centre of gravity of a given face
* Useful for the "up to face" options to pocket or pad
*/
struct cutFaces {
TopoDS_Face face;
double distsq;
@ -137,3 +137,4 @@ std::vector<cutFaces> findAllFacesCutBy(const TopoDS_Shape& shape,
#endif // PART_FEATURE_H

View File

@ -19,6 +19,7 @@ BUILT_SOURCES=\
ui_TaskFaceColors.h \
ui_TaskShapeBuilder.h \
ui_TaskLoft.h \
ui_TaskSweep.h \
moc_CrossSections.cpp \
moc_DlgBooleanOperation.cpp \
moc_DlgExtrusion.cpp \
@ -35,6 +36,7 @@ BUILT_SOURCES=\
moc_TaskFaceColors.cpp \
moc_TaskShapeBuilder.cpp \
moc_TaskLoft.cpp \
moc_TaskSweep.cpp \
qrc_Part.cpp
libPartGui_la_SOURCES=\
@ -73,6 +75,8 @@ libPartGui_la_SOURCES=\
TaskShapeBuilder.h \
TaskLoft.cpp \
TaskLoft.h \
TaskSweep.cpp \
TaskSweep.h \
PreCompiled.cpp \
PreCompiled.h \
SoBrepShape.cpp \
@ -230,6 +234,7 @@ EXTRA_DIST = \
TaskFaceColors.ui \
TaskShapeBuilder.ui \
TaskLoft.ui \
TaskSweep.ui \
Resources/Part.qrc \
Resources/translations/Part_af.qm \
Resources/translations/Part_af.ts \

View File

@ -17,6 +17,8 @@ libPartDesign_la_SOURCES=\
FeatureChamfer.h \
FeatureDressUp.cpp \
FeatureDressUp.h \
FeatureGroove.cpp \
FeatureGroove.h \
Body.cpp \
Body.h \
FeatureSketchBased.cpp \

View File

@ -8,8 +8,10 @@ BUILT_SOURCES=\
moc_TaskPocketParameters.cpp \
moc_TaskChamferParameters.cpp \
moc_TaskFilletParameters.cpp \
moc_TaskGrooveParameters.cpp \
moc_TaskHoleParameters.cpp \
moc_TaskRevolutionParameters.cpp \
ui_TaskGrooveParameters.h \
ui_TaskPadParameters.h \
ui_TaskPatternRectangularParameters.h \
ui_TaskPocketParameters.h \
@ -32,6 +34,8 @@ libPartDesignGui_la_SOURCES=\
Command.cpp \
PreCompiled.cpp \
PreCompiled.h \
TaskGrooveParameters.cpp \
TaskGrooveParameters.h \
TaskPadParameters.cpp \
TaskPadParameters.h \
TaskPatternRectangularParameters.cpp \
@ -58,6 +62,8 @@ libPartDesignGui_la_SOURCES=\
ViewProviderChamfer.h \
ViewProviderFillet.cpp \
ViewProviderFillet.h \
ViewProviderGroove.cpp \
ViewProviderGroove.h \
ViewProviderRevolution.cpp \
ViewProviderRevolution.h \
ViewProviderPatternRectangular.cpp \