Oops, don't export construction lines. And we can't do exact curves
with cutter radius offset, and 2 pixels is a better default chord tolerance than 1. [git-p4: depot-paths = "//depot/solvespace/": change = 1939]
This commit is contained in:
parent
3ca2a6b80b
commit
16de9a485a
11
export.cpp
11
export.cpp
|
@ -68,7 +68,8 @@ void SolveSpace::ExportSectionTo(char *filename) {
|
||||||
ZERO(&bl);
|
ZERO(&bl);
|
||||||
|
|
||||||
g->runningShell.MakeSectionEdgesInto(n, d,
|
g->runningShell.MakeSectionEdgesInto(n, d,
|
||||||
&el, SS.exportPwlCurves ? NULL : &bl);
|
&el,
|
||||||
|
(SS.exportPwlCurves || fabs(SS.exportOffset) > LENGTH_EPS) ? NULL : &bl);
|
||||||
|
|
||||||
el.CullExtraneousEdges();
|
el.CullExtraneousEdges();
|
||||||
bl.CullIdenticalBeziers();
|
bl.CullIdenticalBeziers();
|
||||||
|
@ -103,10 +104,14 @@ void SolveSpace::ExportViewTo(char *filename) {
|
||||||
for(i = 0; i < SS.entity.n; i++) {
|
for(i = 0; i < SS.entity.n; i++) {
|
||||||
Entity *e = &(SS.entity.elem[i]);
|
Entity *e = &(SS.entity.elem[i]);
|
||||||
if(!e->IsVisible()) continue;
|
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
|
// 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);
|
e->GenerateEdges(&edges);
|
||||||
} else {
|
} else {
|
||||||
e->GenerateBezierCurves(&beziers);
|
e->GenerateBezierCurves(&beziers);
|
||||||
|
|
|
@ -39,7 +39,7 @@ void SolveSpace::Init(char *cmdLine) {
|
||||||
lightDir[1].y = CnfThawFloat( 0.0f, "LightDir_1_Up" );
|
lightDir[1].y = CnfThawFloat( 0.0f, "LightDir_1_Up" );
|
||||||
lightDir[1].z = CnfThawFloat( 0.0f, "LightDir_1_Forward" );
|
lightDir[1].z = CnfThawFloat( 0.0f, "LightDir_1_Forward" );
|
||||||
// Chord tolerance
|
// Chord tolerance
|
||||||
chordTol = CnfThawFloat(1.0f, "ChordTolerance");
|
chordTol = CnfThawFloat(2.0f, "ChordTolerance");
|
||||||
// Max pwl segments to generate
|
// Max pwl segments to generate
|
||||||
maxSegments = CnfThawDWORD(40, "MaxSegments");
|
maxSegments = CnfThawDWORD(40, "MaxSegments");
|
||||||
// View units
|
// View units
|
||||||
|
|
|
@ -681,6 +681,10 @@ void TextWindow::ShowConfiguration(void) {
|
||||||
&ScreenChangeShadedTriangles,
|
&ScreenChangeShadedTriangles,
|
||||||
(!SS.exportShadedTriangles ? "" : "no"),
|
(!SS.exportShadedTriangles ? "" : "no"),
|
||||||
(!SS.exportShadedTriangles ? "no" : ""));
|
(!SS.exportShadedTriangles ? "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: "
|
Printf(false, "%Ft curves as piecewise linear: "
|
||||||
"%Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E",
|
"%Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E",
|
||||||
&ScreenChangePwlCurves,
|
&ScreenChangePwlCurves,
|
||||||
|
@ -689,6 +693,7 @@ void TextWindow::ShowConfiguration(void) {
|
||||||
&ScreenChangePwlCurves,
|
&ScreenChangePwlCurves,
|
||||||
(!SS.exportPwlCurves ? "" : "no"),
|
(!SS.exportPwlCurves ? "" : "no"),
|
||||||
(!SS.exportPwlCurves ? "no" : ""));
|
(!SS.exportPwlCurves ? "no" : ""));
|
||||||
|
}
|
||||||
|
|
||||||
Printf(false, "");
|
Printf(false, "");
|
||||||
Printf(false, "%Ft draw back faces: "
|
Printf(false, "%Ft draw back faces: "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user