GithubHelp home page GithubHelp logo

Comments (4)

bzuillsmith avatar bzuillsmith commented on June 18, 2024

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.

mankyd avatar mankyd commented on June 18, 2024

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.

bzuillsmith avatar bzuillsmith commented on June 18, 2024

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.

mankyd avatar mankyd commented on June 18, 2024

::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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.