Header: extMin and extMax out of range values
Closed this issue · 4 comments
iparrabb commented
Hi,
First of all thanks for your job, is awesome.
How you can see, the header object has wrong values, I'm unable to parse some files like this.
This is my code
router.post('/dxf', s3Upload.single('dxf'), function (req, res, next) {
var fileInfo = req.file.key.split("/");
var params = {Bucket: 'bucketname', Key: req.file.key};
s3.getObject(params, function(err, data) {
if (err)
return err;
let objectData = data.Body.toString('utf-8');
const parsed = dxf.parseString(objectData);
const entities = dxf.denormalise(parsed);
const groups = dxf.groupEntitiesByLayer(entities);
const svg = dxf.toSVG(parsed);
res.send({
header: parsed.header,
data: groups,
svg: svg,
filename: fileInfo[1]
});
});
});
Any help please?
Thanks in advanced.
bjnortier commented
Lemme look...
bjnortier commented
If you look in the DXf file, those are the values specified as the extents:
$EXTMIN
10
1.000000000000000E+20
20
1.000000000000000E+20
30
1.000000000000000E+20
9
$EXTMAX
10
-1.000000000000000E+20
20
-1.000000000000000E+20
30
-1.000000000000000E+20
so the values are being parsed correctly according to the DXF contents.
iparrabb commented
Thanks a lot @bjnortier
bjnortier commented
Pleasure :)