@jscad/dxf-deserializer 2.3.25 → 2.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/index.js +11 -6
  3. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.3.26](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/dxf-deserializer@2.3.25...@jscad/dxf-deserializer@2.3.26) (2024-11-10)
7
+
8
+ **Note:** Version bump only for package @jscad/dxf-deserializer
9
+
10
+
11
+
12
+
13
+
6
14
  ## [2.3.25](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/dxf-deserializer@2.3.24...@jscad/dxf-deserializer@2.3.25) (2024-10-06)
7
15
 
8
16
  **Note:** Version bump only for package @jscad/dxf-deserializer
package/index.js CHANGED
@@ -7,7 +7,10 @@ All code released under MIT license
7
7
 
8
8
  */
9
9
 
10
+ const { ensureString } = require('@jscad/io-utils')
11
+
10
12
  const version = require('./package.json').version
13
+
11
14
  const { BYLAYER, getTLA } = require('./autocad')
12
15
  const colorIndex = require('./colorindex2017')
13
16
  const dxf = require('./DxfReader')
@@ -275,7 +278,7 @@ const handleXcoord = (reader, group, value) => {
275
278
  const obj = reader.objstack.pop()
276
279
  if ('type' in obj) {
277
280
  if (obj.type === 'lwpolyline') {
278
- // special handling to build a list of vertices
281
+ // special handling to build a list of vertices
279
282
  if (obj.pptxs === undefined) {
280
283
  obj.pptxs = []
281
284
  obj.bulgs = []
@@ -284,7 +287,7 @@ const handleXcoord = (reader, group, value) => {
284
287
  obj.bulgs.push(0)
285
288
  } else {
286
289
  if (obj.type === 'mesh') {
287
- // special handling to build a list of vertices
290
+ // special handling to build a list of vertices
288
291
  if (obj.pptxs === undefined) {
289
292
  obj.pptxs = []
290
293
  }
@@ -307,7 +310,7 @@ const handleYcoord = (reader, group, value) => {
307
310
  const obj = reader.objstack.pop()
308
311
  if ('type' in obj) {
309
312
  if (obj.type === 'lwpolyline' || obj.type === 'mesh') {
310
- // special handling to build a list of vertices
313
+ // special handling to build a list of vertices
311
314
  if (obj.pptys === undefined) {
312
315
  obj.pptys = []
313
316
  }
@@ -329,7 +332,7 @@ const handleZcoord = (reader, group, value) => {
329
332
  const obj = reader.objstack.pop()
330
333
  if ('type' in obj) {
331
334
  if (obj.type === 'mesh') {
332
- // special handling to build a list of vertices
335
+ // special handling to build a list of vertices
333
336
  if (obj.pptzs === undefined) {
334
337
  obj.pptzs = []
335
338
  }
@@ -351,7 +354,7 @@ const handleBulge = (reader, group, value) => {
351
354
  const obj = reader.objstack.pop()
352
355
  if ('type' in obj) {
353
356
  if (obj.type === 'lwpolyline') {
354
- // special handling to build a list of vertices
357
+ // special handling to build a list of vertices
355
358
  const bulgs = obj.bulgs
356
359
  if (bulgs !== undefined) {
357
360
  const pptxs = obj.pptxs
@@ -376,7 +379,7 @@ const handleLen = (reader, group, value) => {
376
379
  const obj = reader.objstack.pop()
377
380
  if ('type' in obj) {
378
381
  if (obj.type === 'mesh') {
379
- // mesh has an order of lengths
382
+ // mesh has an order of lengths
380
383
  const state = obj.state
381
384
  // console.log('mesh len: '+group+','+value+','+state)
382
385
  switch (group) {
@@ -600,6 +603,8 @@ const deserialize = (options, src) => {
600
603
  }
601
604
  }
602
605
  options = Object.assign({}, defaults, options)
606
+
607
+ src = ensureString(src)
603
608
  return options.output === 'script' ? translate(src, options) : instantiate(src, options)
604
609
  }
605
610
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscad/dxf-deserializer",
3
- "version": "2.3.25",
3
+ "version": "2.3.26",
4
4
  "description": "DXF Deserializer for JSCAD",
5
5
  "homepage": "https://openjscad.xyz/",
6
6
  "repository": "https://github.com/jscad/OpenJSCAD.org",
@@ -28,11 +28,12 @@
28
28
  ],
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@jscad/modeling": "2.12.3"
31
+ "@jscad/io-utils": "2.0.29",
32
+ "@jscad/modeling": "2.12.4"
32
33
  },
33
34
  "devDependencies": {
34
35
  "ava": "3.15.0",
35
36
  "nyc": "15.1.0"
36
37
  },
37
- "gitHead": "4627312c2337120447a607ff3ac3da10056ce132"
38
+ "gitHead": "ce4978ee40c30803cba05d1c96ba8b6aaf3abc61"
38
39
  }