Add option to disable the "not closed contour" warnings and such,
instead of tying that to whether the shaded model is shown. And rewrite all URLs to solvespace.com, not www.solvespace.com, and get rid of the nag screen that I just added because opening the website with ShellExecute seems to freeze a bit on startup. [git-p4: depot-paths = "//depot/solvespace/": change = 2044]
This commit is contained in:
parent
6e5b503ac6
commit
33dfff2a78
|
@ -79,6 +79,11 @@ void TextWindow::ScreenChangeBackFaces(int link, DWORD v) {
|
||||||
InvalidateGraphics();
|
InvalidateGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextWindow::ScreenChangeCheckClosedContour(int link, DWORD v) {
|
||||||
|
SS.checkClosedContour = !SS.checkClosedContour;
|
||||||
|
InvalidateGraphics();
|
||||||
|
}
|
||||||
|
|
||||||
void TextWindow::ScreenChangeShadedTriangles(int link, DWORD v) {
|
void TextWindow::ScreenChangeShadedTriangles(int link, DWORD v) {
|
||||||
SS.exportShadedTriangles = !SS.exportShadedTriangles;
|
SS.exportShadedTriangles = !SS.exportShadedTriangles;
|
||||||
InvalidateGraphics();
|
InvalidateGraphics();
|
||||||
|
@ -247,6 +252,14 @@ void TextWindow::ShowConfiguration(void) {
|
||||||
&ScreenChangeBackFaces,
|
&ScreenChangeBackFaces,
|
||||||
(!SS.drawBackFaces ? "" : "no"), (!SS.drawBackFaces ? "no" : ""));
|
(!SS.drawBackFaces ? "" : "no"), (!SS.drawBackFaces ? "no" : ""));
|
||||||
|
|
||||||
|
bool ccc = (SS.checkClosedContour != 0);
|
||||||
|
Printf(false, "%Ft check for closed contour: "
|
||||||
|
"%Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E",
|
||||||
|
&ScreenChangeCheckClosedContour,
|
||||||
|
(ccc ? "" : "yes"), (ccc ? "yes" : ""),
|
||||||
|
&ScreenChangeCheckClosedContour,
|
||||||
|
(!ccc ? "" : "no"), (!ccc ? "no" : ""));
|
||||||
|
|
||||||
Printf(false, "");
|
Printf(false, "");
|
||||||
Printf(false, " %Ftgl vendor %E%s", glGetString(GL_VENDOR));
|
Printf(false, " %Ftgl vendor %E%s", glGetString(GL_VENDOR));
|
||||||
Printf(false, " %Ft renderer %E%s", glGetString(GL_RENDERER));
|
Printf(false, " %Ft renderer %E%s", glGetString(GL_RENDERER));
|
||||||
|
|
|
@ -410,8 +410,10 @@ void Group::Draw(void) {
|
||||||
DrawDisplayItems(type);
|
DrawDisplayItems(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// And finally show the polygons too
|
if(!SS.checkClosedContour) return;
|
||||||
if(!SS.GW.showShaded) return;
|
|
||||||
|
// And finally show the polygons too, and any errors if it's not possible
|
||||||
|
// to assemble the lines into closed polygons.
|
||||||
if(polyError.how == POLY_NOT_CLOSED) {
|
if(polyError.how == POLY_NOT_CLOSED) {
|
||||||
// Report this error only in sketch-in-workplane groups; otherwise
|
// Report this error only in sketch-in-workplane groups; otherwise
|
||||||
// it's just a nuisance.
|
// it's just a nuisance.
|
||||||
|
|
|
@ -29,13 +29,6 @@ void SolveSpace::CheckLicenseFromRegistry(void) {
|
||||||
const int SECONDS_IN_DAY = 60*60*24;
|
const int SECONDS_IN_DAY = 60*60*24;
|
||||||
license.trialDaysRemaining = 30 -
|
license.trialDaysRemaining = 30 -
|
||||||
(int)(((now - license.firstUse))/SECONDS_IN_DAY);
|
(int)(((now - license.firstUse))/SECONDS_IN_DAY);
|
||||||
|
|
||||||
if((!license.licensed) && (license.trialDaysRemaining < 0)) {
|
|
||||||
Message("The 30-day demo has expired. All exported content will "
|
|
||||||
"contain a message noting that it was generated by an "
|
|
||||||
"unregistered version of SolveSpace.");
|
|
||||||
OpenWebsite("http://solvespace.com/buyunreg");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SolveSpace::Init(char *cmdLine) {
|
void SolveSpace::Init(char *cmdLine) {
|
||||||
|
@ -81,6 +74,8 @@ void SolveSpace::Init(char *cmdLine) {
|
||||||
fixExportColors = CnfThawDWORD(1, "FixExportColors");
|
fixExportColors = CnfThawDWORD(1, "FixExportColors");
|
||||||
// Draw back faces of triangles (when mesh is leaky/self-intersecting)
|
// Draw back faces of triangles (when mesh is leaky/self-intersecting)
|
||||||
drawBackFaces = CnfThawDWORD(1, "DrawBackFaces");
|
drawBackFaces = CnfThawDWORD(1, "DrawBackFaces");
|
||||||
|
// Check that contours are closed and not self-intersecting
|
||||||
|
checkClosedContour = CnfThawDWORD(1, "CheckClosedContour");
|
||||||
// Export shaded triangles in a 2d view
|
// Export shaded triangles in a 2d view
|
||||||
exportShadedTriangles = CnfThawDWORD(1, "ExportShadedTriangles");
|
exportShadedTriangles = CnfThawDWORD(1, "ExportShadedTriangles");
|
||||||
// Export pwl curves (instead of exact) always
|
// Export pwl curves (instead of exact) always
|
||||||
|
@ -169,6 +164,8 @@ void SolveSpace::Exit(void) {
|
||||||
CnfFreezeDWORD(fixExportColors, "FixExportColors");
|
CnfFreezeDWORD(fixExportColors, "FixExportColors");
|
||||||
// Draw back faces of triangles (when mesh is leaky/self-intersecting)
|
// Draw back faces of triangles (when mesh is leaky/self-intersecting)
|
||||||
CnfFreezeDWORD(drawBackFaces, "DrawBackFaces");
|
CnfFreezeDWORD(drawBackFaces, "DrawBackFaces");
|
||||||
|
// Check that contours are closed and not self-intersecting
|
||||||
|
CnfFreezeDWORD(checkClosedContour, "CheckClosedContour");
|
||||||
// Export shaded triangles in a 2d view
|
// Export shaded triangles in a 2d view
|
||||||
CnfFreezeDWORD(exportShadedTriangles, "ExportShadedTriangles");
|
CnfFreezeDWORD(exportShadedTriangles, "ExportShadedTriangles");
|
||||||
// Export pwl curves (instead of exact) always
|
// Export pwl curves (instead of exact) always
|
||||||
|
@ -749,12 +746,12 @@ void SolveSpace::LoadLicenseFile(char *filename) {
|
||||||
void SolveSpace::MenuHelp(int id) {
|
void SolveSpace::MenuHelp(int id) {
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case GraphicsWindow::MNU_WEBSITE:
|
case GraphicsWindow::MNU_WEBSITE:
|
||||||
OpenWebsite("http://www.solvespace.com/helpmenu");
|
OpenWebsite("http://solvespace.com/helpmenu");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GraphicsWindow::MNU_ABOUT:
|
case GraphicsWindow::MNU_ABOUT:
|
||||||
Message("This is SolveSpace version 1.5.\r\n\r\n"
|
Message("This is SolveSpace version 1.5.\r\n\r\n"
|
||||||
"For more information, see http://www.solvespace.com/\r\n\r\n"
|
"For more information, see http://solvespace.com/\r\n\r\n"
|
||||||
"Built " __TIME__ " " __DATE__ ".\r\n\r\n"
|
"Built " __TIME__ " " __DATE__ ".\r\n\r\n"
|
||||||
"Copyright 2008-2009 Useful Subset, LLC. All Rights Reserved.");
|
"Copyright 2008-2009 Useful Subset, LLC. All Rights Reserved.");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -552,6 +552,7 @@ public:
|
||||||
float exportOffset;
|
float exportOffset;
|
||||||
int fixExportColors;
|
int fixExportColors;
|
||||||
int drawBackFaces;
|
int drawBackFaces;
|
||||||
|
int checkClosedContour;
|
||||||
int showToolbar;
|
int showToolbar;
|
||||||
DWORD backgroundColor;
|
DWORD backgroundColor;
|
||||||
int exportShadedTriangles;
|
int exportShadedTriangles;
|
||||||
|
|
|
@ -101,7 +101,7 @@ void TextWindow::ScreenShowConfiguration(int link, DWORD v) {
|
||||||
SS.TW.GoToScreen(SCREEN_CONFIGURATION);
|
SS.TW.GoToScreen(SCREEN_CONFIGURATION);
|
||||||
}
|
}
|
||||||
void TextWindow::ScreenGoToWebsite(int link, DWORD v) {
|
void TextWindow::ScreenGoToWebsite(int link, DWORD v) {
|
||||||
OpenWebsite("http://www.solvespace.com/txtlink");
|
OpenWebsite("http://solvespace.com/txtlink");
|
||||||
}
|
}
|
||||||
void TextWindow::ShowListOfGroups(void) {
|
void TextWindow::ShowListOfGroups(void) {
|
||||||
Printf(true, "%Ftactv show ok group-name%E");
|
Printf(true, "%Ftactv show ok group-name%E");
|
||||||
|
@ -165,7 +165,7 @@ void TextWindow::ShowListOfGroups(void) {
|
||||||
} else {
|
} else {
|
||||||
Printf(false, "%Fx demo expired, now running in light mode");
|
Printf(false, "%Fx demo expired, now running in light mode");
|
||||||
}
|
}
|
||||||
Printf(false, "%Fx buy at %Fl%f%Llhttp://www.solvespace.com/%E",
|
Printf(false, "%Fx buy at %Fl%f%Llhttp://solvespace.com/%E",
|
||||||
&ScreenGoToWebsite);
|
&ScreenGoToWebsite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
ui.h
1
ui.h
|
@ -169,6 +169,7 @@ public:
|
||||||
|
|
||||||
static void ScreenChangeFixExportColors(int link, DWORD v);
|
static void ScreenChangeFixExportColors(int link, DWORD v);
|
||||||
static void ScreenChangeBackFaces(int link, DWORD v);
|
static void ScreenChangeBackFaces(int link, DWORD v);
|
||||||
|
static void ScreenChangeCheckClosedContour(int link, DWORD v);
|
||||||
static void ScreenChangePwlCurves(int link, DWORD v);
|
static void ScreenChangePwlCurves(int link, DWORD v);
|
||||||
static void ScreenChangeCanvasSizeAuto(int link, DWORD v);
|
static void ScreenChangeCanvasSizeAuto(int link, DWORD v);
|
||||||
static void ScreenChangeCanvasSize(int link, DWORD v);
|
static void ScreenChangeCanvasSize(int link, DWORD v);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user