Merge branch 'master' into fixAirfoilImportNumberRegex

This commit is contained in:
Chris Hennes
2020-12-07 13:27:03 -06:00
committed by GitHub
20 changed files with 4602 additions and 13 deletions

View File

@@ -363,7 +363,8 @@ private:
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP");
makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
// https://forum.freecadweb.org/viewtopic.php?f=8&t=52967
//makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str()));
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str()));
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName()));

View File

@@ -662,7 +662,8 @@ private:
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP");
makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
// https://forum.freecadweb.org/viewtopic.php?f=8&t=52967
//makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)Utf8Name.c_str()));
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str()));
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str()));
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::GetApplication().getExecutableName()));

View File

@@ -991,7 +991,8 @@ void TopoShape::exportStep(const char *filename) const
throw Base::FileException("Error in transferring STEP");
APIHeaderSection_MakeHeader makeHeader(aWriter.Model());
makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(encodeFilename(filename).c_str())));
// https://forum.freecadweb.org/viewtopic.php?f=8&t=52967
//makeHeader.SetName(new TCollection_HAsciiString((Standard_CString)(encodeFilename(filename).c_str())));
makeHeader.SetAuthorValue (1, new TCollection_HAsciiString("FreeCAD"));
makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString("FreeCAD"));
makeHeader.SetOriginatingSystem(new TCollection_HAsciiString("FreeCAD"));

View File

@@ -372,6 +372,15 @@ void DrawPage::updateAllViews()
line->recomputeFeature();
}
}
//fourth, try to execute all spreadsheets.
for (it = featViews.begin(); it != featViews.end(); ++it) {
TechDraw::DrawViewSpreadsheet *sheet = dynamic_cast<TechDraw::DrawViewSpreadsheet *>(*it);
if (sheet != nullptr) {
sheet->recomputeFeature();
}
}
}
std::vector<App::DocumentObject*> DrawPage::getAllViews(void)

View File

@@ -31,6 +31,7 @@
#include <App/PropertyStandard.h>
#include <App/PropertyFile.h>
#include <Mod/TechDraw/App/DrawViewPart.h>
#include <Mod/TechDraw/App/DrawViewSpreadsheet.h>
namespace TechDraw
{

View File

@@ -211,13 +211,6 @@ std::string DrawViewSpreadsheet::getSheetImage(void)
}
}
//check for logical range
if ( (sColStart > sColEnd) ||
(iRowStart > iRowEnd) ) {
Base::Console().Error("%s - cell range is illogical\n",getNameInDocument());
return result.str();
}
std::vector<std::string> availcolumns = getAvailColumns();
//validate range start column in sheet's available columns
@@ -236,6 +229,13 @@ std::string DrawViewSpreadsheet::getSheetImage(void)
return result.str();
}
//check for logical range
if ( (iAvailColStart > iAvailColEnd) ||
(iRowStart > iRowEnd) ) {
Base::Console().Error("%s - cell range is illogical\n",getNameInDocument());
return result.str();
}
// build row and column ranges
std::vector<std::string> validColNames;
std::vector<int> validRowNumbers;