diff --git a/confscreen.cpp b/confscreen.cpp index 759db56..1cb9c8b 100644 --- a/confscreen.cpp +++ b/confscreen.cpp @@ -79,6 +79,11 @@ void TextWindow::ScreenChangeBackFaces(int link, DWORD v) { InvalidateGraphics(); } +void TextWindow::ScreenChangeCheckClosedContour(int link, DWORD v) { + SS.checkClosedContour = !SS.checkClosedContour; + InvalidateGraphics(); +} + void TextWindow::ScreenChangeShadedTriangles(int link, DWORD v) { SS.exportShadedTriangles = !SS.exportShadedTriangles; InvalidateGraphics(); @@ -246,6 +251,14 @@ void TextWindow::ShowConfiguration(void) { (SS.drawBackFaces ? "" : "yes"), (SS.drawBackFaces ? "yes" : ""), &ScreenChangeBackFaces, (!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, " %Ftgl vendor %E%s", glGetString(GL_VENDOR)); diff --git a/groupmesh.cpp b/groupmesh.cpp index ec84e84..71af139 100644 --- a/groupmesh.cpp +++ b/groupmesh.cpp @@ -410,8 +410,10 @@ void Group::Draw(void) { DrawDisplayItems(type); } - // And finally show the polygons too - if(!SS.GW.showShaded) return; + if(!SS.checkClosedContour) 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) { // Report this error only in sketch-in-workplane groups; otherwise // it's just a nuisance. diff --git a/solvespace.cpp b/solvespace.cpp index 0deca45..dfc91d0 100644 --- a/solvespace.cpp +++ b/solvespace.cpp @@ -29,13 +29,6 @@ void SolveSpace::CheckLicenseFromRegistry(void) { const int SECONDS_IN_DAY = 60*60*24; license.trialDaysRemaining = 30 - (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) { @@ -81,6 +74,8 @@ void SolveSpace::Init(char *cmdLine) { fixExportColors = CnfThawDWORD(1, "FixExportColors"); // Draw back faces of triangles (when mesh is leaky/self-intersecting) drawBackFaces = CnfThawDWORD(1, "DrawBackFaces"); + // Check that contours are closed and not self-intersecting + checkClosedContour = CnfThawDWORD(1, "CheckClosedContour"); // Export shaded triangles in a 2d view exportShadedTriangles = CnfThawDWORD(1, "ExportShadedTriangles"); // Export pwl curves (instead of exact) always @@ -169,6 +164,8 @@ void SolveSpace::Exit(void) { CnfFreezeDWORD(fixExportColors, "FixExportColors"); // Draw back faces of triangles (when mesh is leaky/self-intersecting) CnfFreezeDWORD(drawBackFaces, "DrawBackFaces"); + // Check that contours are closed and not self-intersecting + CnfFreezeDWORD(checkClosedContour, "CheckClosedContour"); // Export shaded triangles in a 2d view CnfFreezeDWORD(exportShadedTriangles, "ExportShadedTriangles"); // Export pwl curves (instead of exact) always @@ -749,12 +746,12 @@ void SolveSpace::LoadLicenseFile(char *filename) { void SolveSpace::MenuHelp(int id) { switch(id) { case GraphicsWindow::MNU_WEBSITE: - OpenWebsite("http://www.solvespace.com/helpmenu"); + OpenWebsite("http://solvespace.com/helpmenu"); break; case GraphicsWindow::MNU_ABOUT: 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" "Copyright 2008-2009 Useful Subset, LLC. All Rights Reserved."); break; diff --git a/solvespace.h b/solvespace.h index 27df7bc..0874a97 100644 --- a/solvespace.h +++ b/solvespace.h @@ -552,6 +552,7 @@ public: float exportOffset; int fixExportColors; int drawBackFaces; + int checkClosedContour; int showToolbar; DWORD backgroundColor; int exportShadedTriangles; diff --git a/textscreens.cpp b/textscreens.cpp index 3e59d36..da97708 100644 --- a/textscreens.cpp +++ b/textscreens.cpp @@ -101,7 +101,7 @@ void TextWindow::ScreenShowConfiguration(int link, DWORD v) { SS.TW.GoToScreen(SCREEN_CONFIGURATION); } void TextWindow::ScreenGoToWebsite(int link, DWORD v) { - OpenWebsite("http://www.solvespace.com/txtlink"); + OpenWebsite("http://solvespace.com/txtlink"); } void TextWindow::ShowListOfGroups(void) { Printf(true, "%Ftactv show ok group-name%E"); @@ -165,7 +165,7 @@ void TextWindow::ShowListOfGroups(void) { } else { 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); } } diff --git a/ui.h b/ui.h index 79e15e5..b8e2dc0 100644 --- a/ui.h +++ b/ui.h @@ -169,6 +169,7 @@ public: static void ScreenChangeFixExportColors(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 ScreenChangeCanvasSizeAuto(int link, DWORD v); static void ScreenChangeCanvasSize(int link, DWORD v);