diff --git a/i/dxf/gcode/three2gcode.js b/i/dxf/gcode/three2gcode.js index a7d9789..e09aea6 100644 --- a/i/dxf/gcode/three2gcode.js +++ b/i/dxf/gcode/three2gcode.js @@ -132,6 +132,7 @@ console.log('RapidSpeed', rapidSpeed); g += " Y" + worldPt.y.toFixed(3); g += " S" + options.lasersvalue + "\n"; + } } diff --git a/i/dxf/renderer.js b/i/dxf/renderer.js index 4288551..0e04e25 100644 --- a/i/dxf/renderer.js +++ b/i/dxf/renderer.js @@ -75,7 +75,7 @@ THREE.BulgeGeometry.prototype = Object.create( THREE.Geometry.prototype ); * @constructor */ function processDXF(data) { - console.log(data); + //console.log(data); if (typeof(dxfObject) !== 'undefined') { scene.remove(dxfObject); @@ -107,7 +107,7 @@ function processDXF(data) { function drawEntity(index, entity) { - console.log('inside drawEntity: Entity ', entity, ' Index: ', index) + //console.log('inside drawEntity: Entity ', entity, ' Index: ', index) if(entity.type === 'CIRCLE' || entity.type === 'ARC') { drawCircle(entity, index); } else if(entity.type === 'LWPOLYLINE' || entity.type === 'LINE' || entity.type === 'POLYLINE') { @@ -122,7 +122,7 @@ function drawEntity(index, entity) { } function drawLine(entity, index) { - console.log('inside drawLine ', entity, ' Index: ', index ) + //console.log('inside drawLine ', entity, ' Index: ', index ) var geometry = new THREE.Geometry(), color = getDXFColor(entity), material, lineType, vertex, startPoint, endPoint, bulgeGeometry, @@ -163,9 +163,9 @@ function drawCircle(entity, index) { // Laserweb - calc and draw gcode var radius = entity.radius; -console.log('Radius:'+radius+' and Center '+entity.center.x+','+entity.center.y+','+entity.center.z+',\n'); // Radius:220 and Center 0,0,0, +//console.log('Radius:'+radius+' and Center '+entity.center.x+','+entity.center.y+','+entity.center.z+',\n'); // Radius:220 and Center 0,0,0, var arcTotalDeg = entity.startAngleDeg - entity.endAngleDeg; -console.log('Start Angle: '+entity.startAngleDeg+', End Angle: '+entity.endAngleDeg+', thus spanning '+arcTotalDeg+'deg' ); +//console.log('Start Angle: '+entity.startAngleDeg+', End Angle: '+entity.endAngleDeg+', thus spanning '+arcTotalDeg+'deg' ); // Draw it since its cool to see (note this is a straigh three.js view of it, not via gcode. Can be used in the Cutting Params view by coloring object/layers to change params) var geometry, material, circle; @@ -173,13 +173,6 @@ console.log('Start Angle: '+entity.startAngleDeg+', End Angle: '+entity.endAngle geometry = new THREE.CircleGeometry(entity.radius, 128, entity.startAngle, entity.angleLength); geometry.vertices.shift(); - console.log('Passing in:', geometry.vertices); - offsetGeometry = getInflatedPath(geometry.vertices, 3); - console.log('Got Out: ', offsetGeometry); - //offsetMaterial = new THREE.LineBasicMaterial({ color: 0xff0000 }); - //offsetCircle = new THREE.Line(offsetGeometry, offsetMaterial); - //scene.add(offsetCircle); - material = new THREE.LineBasicMaterial({ color: getDXFColor(entity) }); //circle = new THREE.Line(geometry, material); diff --git a/i/main.js b/i/main.js index 72f93f5..dc835f1 100644 --- a/i/main.js +++ b/i/main.js @@ -1425,18 +1425,21 @@ $(document).ready(function() { //NEW Dxf -- experimental parser2 = new window.DxfParser(); dxf2 = parser2.parseSync(r.result); - console.log('DXF Data', dxf2); + //console.log('DXF Data', dxf2); //cadCanvas = new processDXF(dxf2); for (i = 0; i < dxf2.entities.length; i++ ) { - console.log('Layer: ', dxf2.entities[i].layer); + //console.log('Layer: ', dxf2.entities[i].layer); row[i] = dxf2.entities[i].layer drawEntity(i, dxf2.entities[i]); }; - dxfObject.translateX(laserxmax /2 * -1); - dxfObject.translateY(laserymax /2 * -1); - scene.add(dxfObject); + //dxfObject.translateX(laserxmax /2 * -1); + //dxfObject.translateY(laserymax /2 * -1); + var showDxf = dxfObject.clone(); + showDxf.translateX(laserxmax /2 * -1); + showDxf.translateY(laserymax /2 * -1); + scene.add(showDxf); Array.prototype.unique = function() { @@ -1516,7 +1519,7 @@ $(document).ready(function() { //document.getElementById('fileInputMILL').value = ''; $('#console').append('

NewDXFLib Complete...

'); $('#console').scrollTop($("#console")[0].scrollHeight - $("#console").height()); - $('#noneg').click(); + //$('#noneg').click(); });