Comments (4)
Hmm interesting. I don't believe the dxf-parser looks at class names like AcDbBlockEnd as markers for where it is in the parsing process. It should have stopped reading the block at
0
ENDBLK
so something else must be going on. Thanks for posting the issue!
from dxf-parser.
Yeah, if you take a look, you'll see that when it encounters a 0
it calls parseEntities, and then continues to loop. It only breaks the loop when it gets to AcDbBlockEnd: https://github.com/gdsestimating/dxf-parser/blob/master/lib/DxfParser.js#L178.
I actulally have a fix for this as well as #2, though I don't have them in a state where I can submit a pull request. I'll work on this tonight.
from dxf-parser.
Ah, you're right. Looks like block parsing is actually quite messed up. I was too hasty in testing that functionality. I'll post a fix for it soon. One thing I noticed in your example is that you have no handles for your blocks. I was using handles as property names in the output. Without handles, it outputs a single block with property name undefined
.
I think AutoCad requires handles, but I could be wrong. If not, then I suppose we could use the name
as the property name instead, or we could generate handles when they are missing.
from dxf-parser.
::shrug:: Not sure if they're required or not. This bit is output from OnShape, and loads fine into other software that I'm using. I'd vote either switch to name
or create an new anonymous handle of some sort.
from dxf-parser.
Related Issues (20)
- Group code does not have a defined type:
- 'should parse MULTILEADER entities' test fails because `leaders.dxf` is missing HOT 1
- Test 'should parse a complex BLOCKS section' is failing
- Problem with parsing/showing ARC entity HOT 3
- Can read/write DXF files in binary form? HOT 1
- final vertex of 3DFACE not being added to entity vertex list when encountering a code other than 0
- How to combine color of walls with color of closed area
- I decided this repo was dead and created a new parser repository.
- Support for pdf HOT 1
- How to handle large points HOT 1
- DxfParser export seems broken HOT 1
- `TypeError: Cannot call a class as a function` in tests
- npm or yarn? HOT 1
- Compilation issue with ParseHelpers HOT 3
- Question - Ability to read group of elements HOT 1
- How can get perimeter of DXF File ?
- Parsing blocks with attributes HOT 1
- The angle always in radians
- Types?
- How to convert to DXF JSON
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxf-parser.