diff --git a/export.cpp b/export.cpp index f3c2615..bddaae3 100644 --- a/export.cpp +++ b/export.cpp @@ -68,7 +68,8 @@ void SolveSpace::ExportSectionTo(char *filename) { ZERO(&bl); g->runningShell.MakeSectionEdgesInto(n, d, - &el, SS.exportPwlCurves ? NULL : &bl); + &el, + (SS.exportPwlCurves || fabs(SS.exportOffset) > LENGTH_EPS) ? NULL : &bl); el.CullExtraneousEdges(); bl.CullIdenticalBeziers(); @@ -103,10 +104,14 @@ void SolveSpace::ExportViewTo(char *filename) { for(i = 0; i < SS.entity.n; i++) { Entity *e = &(SS.entity.elem[i]); if(!e->IsVisible()) continue; + if(e->construction) continue; - if(SS.exportPwlCurves || (sm && !SS.GW.showHdnLines)) { + if(SS.exportPwlCurves || (sm && !SS.GW.showHdnLines) || + fabs(SS.exportOffset) > LENGTH_EPS) + { // We will be doing hidden line removal, which we can't do on - // exact curves; so we need things broken down to pwls. + // exact curves; so we need things broken down to pwls. Same + // problem with cutter radius compensation. e->GenerateEdges(&edges); } else { e->GenerateBezierCurves(&beziers); diff --git a/solvespace.cpp b/solvespace.cpp index 1ce0814..6c7d03e 100644 --- a/solvespace.cpp +++ b/solvespace.cpp @@ -39,7 +39,7 @@ void SolveSpace::Init(char *cmdLine) { lightDir[1].y = CnfThawFloat( 0.0f, "LightDir_1_Up" ); lightDir[1].z = CnfThawFloat( 0.0f, "LightDir_1_Forward" ); // Chord tolerance - chordTol = CnfThawFloat(1.0f, "ChordTolerance"); + chordTol = CnfThawFloat(2.0f, "ChordTolerance"); // Max pwl segments to generate maxSegments = CnfThawDWORD(40, "MaxSegments"); // View units diff --git a/textscreens.cpp b/textscreens.cpp index c26ba26..2e8ccb3 100644 --- a/textscreens.cpp +++ b/textscreens.cpp @@ -681,14 +681,19 @@ void TextWindow::ShowConfiguration(void) { &ScreenChangeShadedTriangles, (!SS.exportShadedTriangles ? "" : "no"), (!SS.exportShadedTriangles ? "no" : "")); - Printf(false, "%Ft curves as piecewise linear: " - "%Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E", - &ScreenChangePwlCurves, - (SS.exportPwlCurves ? "" : "yes"), - (SS.exportPwlCurves ? "yes" : ""), - &ScreenChangePwlCurves, - (!SS.exportPwlCurves ? "" : "no"), - (!SS.exportPwlCurves ? "no" : "")); + if(fabs(SS.exportOffset) > LENGTH_EPS) { + Printf(false, "%Ft curves as piecewise linear:%E %Fsyes"); + Printf(false, " (always pwl if cutter radius offset isn't 0)"); + } else { + Printf(false, "%Ft curves as piecewise linear: " + "%Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E", + &ScreenChangePwlCurves, + (SS.exportPwlCurves ? "" : "yes"), + (SS.exportPwlCurves ? "yes" : ""), + &ScreenChangePwlCurves, + (!SS.exportPwlCurves ? "" : "no"), + (!SS.exportPwlCurves ? "no" : "")); + } Printf(false, ""); Printf(false, "%Ft draw back faces: "