LDView Edge Lines export bug in LDView 4.5


Edge Lines export bug in LDView 4.5
#1
Bug 
Hello Travis,

I just tried out the "export edge lines to POVRay" feature of LDView 4.5.

It sadly is broken: it outputs a syntactically invalid *.pov file because the generated file contains a stray "#end".

Here is the output I got, the line I tagged with "SYNTAX ERROR" is wrong.

I also noticed that logic for the switch LDXSkipEdges is wrong:
it currently is:
Code:
#if (LDXSkipEdges = 0) object { LDXEdges } #end object { LDXConditionalEdges }
but IMHO should be
Code:
#if (LDXSkipEdges = 0) object { LDXEdges } object { LDXConditionalEdges } #end

   

Code:
// Generated By: LDView 4.5 Copyright (C) 2023 Travis Cobbs & Peter Bartfai // See: https://tcobbs.github.io/ldview/ // Date: Wed Mar 13 21:52:16 2024 // Input LDraw File: Scene08_LampsOnly.ldr // LDraw File Author: Steffen [Steffen] // // This file was automatically generated from an LDraw file by the program // LDView.  See comments above for further details. #version 3.7; #if (version >= 3.7) global_settings {assumed_gamma 1} #end #ifndef (LDXQual) #declare LDXQual = 3; #end // Quality (0 = Bounding Box; 1 = No Refraction; 2 = Normal; 3 = Stud Logos) #ifndef (LDXSW) #declare LDXSW = 0.5; #end // Seam Width (0 for no seams) #ifndef (LDXStuds) #declare LDXStuds = 1; #end // Show studs? (1 = YES; 0 = NO) #ifndef (LDXRefls) #declare LDXRefls = 1; #end // Reflections? (1 = YES; 0 = NO) #ifndef (LDXShads) #declare LDXShads = 1; #end // Shadows? (1 = YES; 0 = NO) #ifndef (LDXBackground) #declare LDXBackground = 0; #end // Include Background? (1 = YES; 0 = NO) #ifndef (LDXFloor) #declare LDXFloor = 1; #end // Include Floor? (1 = YES; 0 = NO) #ifndef (LDXSkipEdges) #declare LDXSkipEdges = 0; #end // Skip Edges? (1 = YES; 0 = NO) // Model bounds information #ifndef (LDXMinX) #declare LDXMinX = -2919.150391; #end #ifndef (LDXMinY) #declare LDXMinY = -352; #end #ifndef (LDXMinZ) #declare LDXMinZ = -714; #end #ifndef (LDXMaxX) #declare LDXMaxX = 640; #end #ifndef (LDXMaxY) #declare LDXMaxY = 0; #end #ifndef (LDXMaxZ) #declare LDXMaxZ = 480; #end #ifndef (LDXCenterX) #declare LDXCenterX = -1139.575195; #end #ifndef (LDXCenterY) #declare LDXCenterY = -176; #end #ifndef (LDXCenterZ) #declare LDXCenterZ = -117; #end #ifndef (LDXCenter) #declare LDXCenter = <LDXCenterX,LDXCenterY,LDXCenterZ>; #end #ifndef (LDXRadius) #declare LDXRadius = 1866.839233; #end // Camera settings #ifndef (LDXCameraLoc) #declare LDXCameraLoc = < -284.332825,-710.17334,1593.536865 >; #end // Camera Location vector #ifndef (LDXCameraLookAt) #declare LDXCameraLookAt = < -613.04332069237375435478,-437.92073246263100827491,-121.79954383964582120825 >; #end // Camera look-at point vector #ifndef (LDXCameraSky) #declare LDXCameraSky = < -0.02898788877173105044,-0.98806765261576068315,-0.15126802755023333047 >; #end // Camera sky vector (<0,-1,0> will usually work for standard "up") #ifndef (LDXCameraAngle) #declare LDXCameraAngle = 72.734352; #end #ifndef (LDXCameraAspect) #declare LDXCameraAspect = 16/9; #end #ifndef (LDXCameraTransform) #declare LDXCameraTransform = transform {}; #end #ifndef (LDXFloorLoc) #declare LDXFloorLoc = LDXMaxY; #end // Floor location. (Dependent on floor axis; MAX_Y is bottom of model) #ifndef (LDXFloorAxis) #declare LDXFloorAxis = y; #end // Floor axis (x, y, or z) #ifndef (LDXFloorR) #declare LDXFloorR = 0.8; #end // Floor Red #ifndef (LDXFloorG) #declare LDXFloorG = 0.8; #end // Floor Green #ifndef (LDXFloorB) #declare LDXFloorB = 0.8; #end // Floor Blue #ifndef (LDXFloorAmb) #declare LDXFloorAmb = 0.4; #end // Floor Ambient #ifndef (LDXFloorDif) #declare LDXFloorDif = 0.4; #end // Floor Diffuse #ifndef (LDXAmb) #declare LDXAmb = 0.4; #end #ifndef (LDXDif) #declare LDXDif = 0.4; #end #ifndef (LDXRefl) #declare LDXRefl = 0.08; #end #ifndef (LDXPhong) #declare LDXPhong = 0.5; #end #ifndef (LDXPhongS) #declare LDXPhongS = 40; #end #ifndef (LDXTRefl) #declare LDXTRefl = 0.2; #end #ifndef (LDXTFilt) #declare LDXTFilt = 0.85; #end #ifndef (LDXIoR) #declare LDXIoR = 1.25; #end #ifndef (LDXRubberRefl) #declare LDXRubberRefl = 0; #end #ifndef (LDXRubberPhong) #declare LDXRubberPhong = 0.1; #end #ifndef (LDXRubberPhongS) #declare LDXRubberPhongS = 10; #end #ifndef (LDXChromeRefl) #declare LDXChromeRefl = 0.85; #end #ifndef (LDXChromeBril) #declare LDXChromeBril = 5; #end #ifndef (LDXChromeSpec) #declare LDXChromeSpec = 0.8; #end #ifndef (LDXChromeRough) #declare LDXChromeRough = 0.01; #end #ifndef (LDXOpaqueNormal) #declare LDXOpaqueNormal = normal { bumps 0.001 scale 0.5 }; #end #ifndef (LDXTransNormal) #declare LDXTransNormal = normal { bumps 0.001 scale 0.5 }; #end #ifndef (LDXIPov) #declare LDXIPov = 1; #end // Use inline POV code from LDraw file? (1 = YES; 0 = NO) #ifndef (LDXEdgeRad) #declare LDXEdgeRad = 0.15; #end #ifndef (LDXEdgeR) #declare LDXEdgeR = 0.0; #end #ifndef (LDXEdgeG) #declare LDXEdgeG = 0.0; #end #ifndef (LDXEdgeB) #declare LDXEdgeB = 0.0; #end #ifndef (LDXBgR) #declare LDXBgR = 0.972549; #end // Background Red #ifndef (LDXBgG) #declare LDXBgG = 0.972549; #end // Background Green #ifndef (LDXBgB) #declare LDXBgB = 0.870588; #end // Background Blue #include "C:\LEGO\playbox\scenes\LDView_Preamble.inc" // Camera #ifndef (LDXSkipCamera) camera { location LDXCameraLoc sky LDXCameraSky right LDXCameraAspect * < -1,0,0 > look_at LDXCameraLookAt angle LDXCameraAngle transform {LDXCameraTransform} } #end // Lights #ifndef (LDXSkipLight1) light_source { // Latitude,Longitude: 45,0,LDXRadius*2 <0*LDXRadius,-1.414214*LDXRadius,-1.414214*LDXRadius> + LDXCenter color rgb <1,1,1> } #end #ifndef (LDXSkipLight2) light_source { // Latitude,Longitude: 30,120,LDXRadius*2 <1.5*LDXRadius,-1*LDXRadius,0.866026*LDXRadius> + LDXCenter color rgb <1,1,1> } #end #ifndef (LDXSkipLight3) light_source { // Latitude,Longitude: 60,-120,LDXRadius*2 <-0.866025*LDXRadius,-1.732051*LDXRadius,0.5*LDXRadius> + LDXCenter color rgb <1,1,1> } #end #macro LDXSeamMatrix(Width, Height, Depth, CenterX, CenterY, CenterZ) #local aw = 0; #local ah = 0; #local ad = 0; #local ax = 0; #local ay = 0; #local az = 0; #if (Width != 0) #local aw = 1-LDXSW/Width; #end #if (Height != 0) #local ah = 1-LDXSW/Height; #end #if (Depth != 0) #local ad = 1-LDXSW/Depth; #end #if (Width != 0 & CenterX != 0) #local ax = LDXSW/(Width / CenterX); #end #if (Height != 0 & CenterY != 0) #local ay = LDXSW/(Height / CenterY); #end #if (Depth != 0 & CenterZ != 0) #local az = LDXSW/(Depth / CenterZ); #end #if (aw <= 0) #local aw = 1; #local ax = 0; #end #if (ah <= 0) #local ah = 1; #local ay = 0; #end #if (ad <= 0) #local ad = 1; #local az = 0; #end matrix <aw,0,0,0,ah,0,0,0,ad,ax,ay,az> #end #if (LDXBackground != 0) #if (version >= 3.7) background { color srgb <LDXBgR,LDXBgG,LDXBgB> } #else background { color rgb <LDXBgR,LDXBgG,LDXBgB> } #end #end #macro EdgeLine(Point1, Point2, Color) object { #if (Point1.x != Point2.x | Point1.y != Point2.y | Point1.z != Point2.z) merge { cylinder { Point1,Point2,LDXEdgeRad } sphere { Point1,LDXEdgeRad } sphere { Point2,LDXEdgeRad } #else sphere { Point1,LDXEdgeRad } #end } material { Color } no_shadow } #end #end // SYNTAX ERROR #ifndef (EdgeColor) #declare EdgeColor = material { texture { #if (version >= 3.7) pigment { srgbf <LDXEdgeR,LDXEdgeG,LDXEdgeB,0> } #else pigment { rgbf <LDXEdgeR,LDXEdgeG,LDXEdgeB,0> } #end finish { ambient 1 diffuse 0 } } } #end ...


Attached Files
.zip   Scene08_LampsOnly.zip (Size: 4.58 MB / Downloads: 0)
Reply
RE: Edge Lines export bug in LDView 4.5
#2
Thank you for the report. I have created an issue on GitHub:

https://github.com/tcobbs/ldview/issues/81

I will investigate.
Reply
RE: Edge Lines export bug in LDView 4.5
#3
thanks for the quick reaction, awesome.
I have attached a small example for you there.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)