diff --git a/file.cpp b/file.cpp index c60e670f..99a81752 100644 --- a/file.cpp +++ b/file.cpp @@ -13,7 +13,7 @@ hGroup SolveSpace::CreateDefaultDrawingGroup(void) { g.predef.q = Quaternion::From(1, 0, 0, 0); hRequest hr = Request::HREQUEST_REFERENCE_XY; g.predef.origin = hr.entity(1); - g.name.strcpy("draw-in-plane"); + g.name.strcpy("sketch-in-plane"); group.AddAndAssignId(&g); SS.GetGroup(g.h)->activeWorkplane = g.h.entity(0); return g.h; diff --git a/graphicswin.cpp b/graphicswin.cpp index 9b39a1cd..42637317 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -42,8 +42,8 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 1, "Dimensions in &Millimeters", MNU_UNITS_MM, 0, mView }, { 0, "&New Group", 0, 0, NULL }, -{ 1, "&Drawing in 3d\tShift+D", MNU_GROUP_3D, 'D'|S, mGrp }, -{ 1, "Drawing in Workplane\tShift+W", MNU_GROUP_WRKPL, 'W'|S, mGrp }, +{ 1, "Sketch In &3d\tShift+3", MNU_GROUP_3D, '3'|S, mGrp }, +{ 1, "Sketch In New &Workplane\tShift+W", MNU_GROUP_WRKPL, 'W'|S, mGrp }, { 1, NULL, 0, NULL }, { 1, "Step &Translating\tShift+T", MNU_GROUP_TRANS, 'T'|S, mGrp }, { 1, "Step &Rotating\tShift+R", MNU_GROUP_ROT, 'R'|S, mGrp }, @@ -96,7 +96,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 0, "&Help", 0, NULL }, { 1, "&Load License...", 0, NULL }, { 1, NULL, 0, NULL }, -{ 1, "Open &Website", 0, NULL }, +{ 1, "&Website / Manual", 0, NULL }, { 1, "&About", 0, NULL }, { -1 }, }; diff --git a/group.cpp b/group.cpp index a9dcfd13..3ee9e149 100644 --- a/group.cpp +++ b/group.cpp @@ -32,12 +32,12 @@ void Group::MenuGroup(int id) { switch(id) { case GraphicsWindow::MNU_GROUP_3D: g.type = DRAWING_3D; - g.name.strcpy("draw-in-3d"); + g.name.strcpy("sketch-in-3d"); break; case GraphicsWindow::MNU_GROUP_WRKPL: g.type = DRAWING_WORKPLANE; - g.name.strcpy("draw-in-plane"); + g.name.strcpy("sketch-in-plane"); if(gs.points == 1 && gs.n == 1) { g.subtype = WORKPLANE_BY_POINT_ORTHO; diff --git a/groupmesh.cpp b/groupmesh.cpp index 990bac08..d4dc3aab 100644 --- a/groupmesh.cpp +++ b/groupmesh.cpp @@ -612,30 +612,37 @@ void Group::Draw(void) { // And finally show the polygons too if(!SS.GW.showShaded) return; if(polyError.how == POLY_NOT_CLOSED) { - glDisable(GL_DEPTH_TEST); - glxColor4d(1, 0, 0, 0.2); - glLineWidth(10); - glBegin(GL_LINES); - glxVertex3v(polyError.notClosedAt.a); - glxVertex3v(polyError.notClosedAt.b); - glEnd(); - glLineWidth(1); - glxColor3d(1, 0, 0); - glPushMatrix(); - glxTranslatev(polyError.notClosedAt.b); - glxOntoWorkplane(SS.GW.projRight, SS.GW.projUp); - glxWriteText("not closed contour!"); - glPopMatrix(); - glEnable(GL_DEPTH_TEST); + // Report this error only in sketch-in-workplane groups; otherwise + // it's just a nuisance. + if(type == DRAWING_WORKPLANE) { + glDisable(GL_DEPTH_TEST); + glxColor4d(1, 0, 0, 0.2); + glLineWidth(10); + glBegin(GL_LINES); + glxVertex3v(polyError.notClosedAt.a); + glxVertex3v(polyError.notClosedAt.b); + glEnd(); + glLineWidth(1); + glxColor3d(1, 0, 0); + glPushMatrix(); + glxTranslatev(polyError.notClosedAt.b); + glxOntoWorkplane(SS.GW.projRight, SS.GW.projUp); + glxWriteText("not closed contour!"); + glPopMatrix(); + glEnable(GL_DEPTH_TEST); + } } else if(polyError.how == POLY_NOT_COPLANAR) { - glDisable(GL_DEPTH_TEST); - glxColor3d(1, 0, 0); - glPushMatrix(); - glxTranslatev(polyError.notCoplanarAt); - glxOntoWorkplane(SS.GW.projRight, SS.GW.projUp); - glxWriteText("points not all coplanar!"); - glPopMatrix(); - glEnable(GL_DEPTH_TEST); + // And this one too + if(type == DRAWING_WORKPLANE) { + glDisable(GL_DEPTH_TEST); + glxColor3d(1, 0, 0); + glPushMatrix(); + glxTranslatev(polyError.notCoplanarAt); + glxOntoWorkplane(SS.GW.projRight, SS.GW.projUp); + glxWriteText("points not all coplanar!"); + glPopMatrix(); + glEnable(GL_DEPTH_TEST); + } } else { glxColor4d(0, 0.1, 0.1, 0.5); glxDepthRangeOffset(1); diff --git a/polygon.cpp b/polygon.cpp index 57914020..4e68e7fd 100644 --- a/polygon.cpp +++ b/polygon.cpp @@ -105,6 +105,7 @@ bool SEdgeList::AssembleContour(Vector first, Vector last, bool SEdgeList::AssemblePolygon(SPolygon *dest, SEdge *errorAt) { dest->Clear(); + bool allClosed = true; for(;;) { Vector first, last; int i; @@ -117,14 +118,15 @@ bool SEdgeList::AssemblePolygon(SPolygon *dest, SEdge *errorAt) { } } if(i >= l.n) { - return true; + return allClosed; } // Create a new empty contour in our polygon, and finish assembling // into that contour. dest->AddEmptyContour(); if(!AssembleContour(first, last, &(dest->l.elem[dest->l.n-1]), errorAt)) - return false; + allClosed = false; + // But continue assembling, even if some of the contours are open } }