libdxfrw | Successor of https : //sourceforge.net/projects/libdxfrw/
kandi X-RAY | libdxfrw Summary
kandi X-RAY | libdxfrw Summary
Building and installing the library.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libdxfrw
libdxfrw Key Features
libdxfrw Examples and Code Snippets
Community Discussions
Trending Discussions on libdxfrw
QUESTION
Trying to open a dxf file format (actual project in C++), I could understand the basic structure of the file, but I can't manage to find how a cube is actually represented.
For a cube in CAD, I expect at least 9 values:
- X Y Z position
- A B C rotation
- W H D size of the cube
I expect X, Y, Z, A, B and C to be in the ENTITY section,
But Looking at example files, I see many settings, the preview image (taking a significant space in the file), layouts, etc.. But nothing that I can match to how the cube is actually build.
Question:How to represent/read a cube in a dxf file?
More infoHere is the documentation about the file format:
http://help.autodesk.com/view/OARX/2018/ENU/?guid=GUID-235B22E0-A567-4CF6-92D3-38A2306D73F3
Here is an example of file with a cube (created with BricsCAD). Unfortunately, I can't embed the file, as it is too big. The "cube" is of 20mm x 25mm x 30mm.
https://download.escain.org/example_cube_20_25_30_mm.dxf
I checked LibreCAD source-code, but it does not manage 3D models. Also, libdxfrw library is too generic (it just call the interface callback with the full Entity data).
https://github.com/LibreCAD/LibreCAD_3
https://github.com/LibreCAD/libdxfrw
ANSWER
Answered 2021-Jul-06 at 12:59This cube is embedded binary ACIS data (3DSOLID) and can not be interpreted without the libraries from Spatial Inc. For more information see my answer to another question: How I can parse nurbs surface from dxf file? Or do you know library(for js, if exists or any other language) for parsing it?
EDIT: Find binary data of ACIS entities
Starting with R2013/AC1027 Modeler Geometry of ACIS data is stored in the section ACDSDATA
in a ACDSRECORD
these records have no handle, instead they have an ID. The record of your 3DSOLID starts at line 22393 and has the ID 10:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libdxfrw
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page