Author Topic: DXF Import  (Read 1381 times)

RobotEyes

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • RobotLaser
DXF Import
« on: November 01, 2016, 08:25:05 AM »
The work on the import of DXF files is still in progress.
The software has been written based on the Draft R13
(if I remember AutoCAD LT2000)

Are recognized
some additional items such as THUMBNAILIMAGE and ACDSDATA,
but not implemented, only recognized to avoid errors.
Currently is implemented only ENTITIES Section,
Within this section are recognized
these entities:
POLYLINE
LWPOLYLINE
LINE
POINT
CIRCLE
ARC

Still under development:
ELLIPSE

In development on request only
TEXT
INSERT


is not supposed to be implemented the entities:
3DFACE
3DSOLID
ACAD_PROXY_ENTITY
ATTDEF
ATTRIB
BODY
DIMENSION
HATCH
LEADER
MAGE
RAY
REGION
SHAPE
SOLID
SPLINE
TOLERANCE
TRACE
VIEWPORT
XLINE

In the latest version was introduced an option to change laser power according to the Layer
by referring to Layer 0 = 100%
The colors associated with each layer are fixed, and are supported and a maximum of 16 layers.

Carlo
« Last Edit: November 01, 2016, 08:26:01 AM by RobotEyes »

RobotEyes

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • RobotLaser
DXF Import - Addendum
« Reply #1 on: May 31, 2017, 06:10:13 AM »

To better explain problems with DXF files

The base draft of the dxf (R13 - Autocad LT2000) provides a single layer structure.
Nesting is not supported...
Therefore BLOCK entities are NOT implemented.

If you generate the DXF using Autocad, apply the command "EXPLODE" before saving.

DataBase entities are NOT implemented
Then the following example DOES NOT WORK:

ENTITIES
  0
ARC
  5
217
330
1F
100
AcDbEntity
  8
layer1
100
AcDbCircle
10
360.5144350636096
20
170.6122351516591
30
0.0
40
9.344427751179061
100
AcDbArc
50
41.30317215156863
51
145.9956929580387
  0

Ellipse entities are completely implemented only on complete ellipses (360 )
Arcs of ellipse work in most cases,
but some combinations of main axis and ellipse arc generate errors,
(usually when the major axis and arc have opposite signs and intersect X axes)

I repeat that, at present, the entities fully implemented are only:
POLYLINE
LWPOLYLINE
LINE
POINT
CIRCLE
ARC

While the ELLIPSE entity suffers from the limitations already mentioned.

I repeat also that
the DXF versions after the R12 might work or not.
Always check to save in DXF R13 or AutoCAD LT2000.

Best regards.
Carlo


Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4931
    • View Profile
    • T2Laser
Re: DXF Import
« Reply #2 on: May 31, 2017, 08:01:38 AM »
If you don't already, you may want to consider adding support for the BULGE value. I went back and added it later which caused significant hair loss. Including it early in your development would be my recommendation.

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2539
  • Administrator
    • View Profile
Re: DXF Import
« Reply #3 on: May 31, 2017, 08:18:08 AM »
BCL supports the Bulge property in Polylines.
Admin -- Ralph -- support @ BenCutLaser dot us
http://www.BenCutLaser.us/SetupBenCutLaser2.5b.exe.zip
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

RobotEyes

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • RobotLaser
Re: DXF Import
« Reply #4 on: June 01, 2017, 02:09:03 AM »

The BULGE property has been implemented since the first release of the software.
Without it, only straight lines can be traced, no arcs and curved fitting.

In any case it does not help with the malfunction reports of the DXF import.
ALL the cases that were reported were due to the fact that the DXF file was created with new type standards.
Currently DXF has become a very complex language with nesting, subroutines, internal databases and a lot of other things
that I do not have any interest in developing.

In ALL cases, I solved very simply by opening the DXF file (with Autocad) and saving it in LT2000 (R13) format.


There are a lot of programs that generate DXF files,
and each one uses its own methodology.
To have the universal interchange format, you must consult the manual of your program.
Actually DXF means: Drawing Exchange Format, but is so evolved as to be no more universal.
I have kept the original draft that is universal and readable by all the programs.


More ... the entities
3DFACE, 3DSOLID, ACAD_PROXY_ENTITY, ATTDEF, ATTRIB, BODY, DIMENSION, HATCH,
LEADER, IMAGE, RAY, REGION, SHAPE, SOLID, SPLINE, TOLERANCE, TRACE, VIEWPORT, XLINE
Even though they are part of the Draft R13, have NOT been implemented
because I find it absolutely useless in the case of laser marking.
I do not want to build a DXF viewer, but a laser engraving manager.

Cheers,
Carlo

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2539
  • Administrator
    • View Profile
Re: DXF Import
« Reply #5 on: June 01, 2017, 06:25:27 AM »
>Currently DXF has become a very complex language with nesting, subroutines, internal databases.

The original purpose of the DXF file format has long ago been lost. It is an absolute mess today, with virtually no hope of returning to any kind of standard. Too many companies have implemented their own, non-standard 'improvements'. Internal structural errors are handled differently, depending on which CAD program you use. Some CAD programs will load a bad DXF file, some will not. There no standards today. None at all.

Worst, the quality of the code generated by over 50% of the DXF programs are full of bugs and mistakes and very inefficient structural construction. It's an absolute mess.

The best solution, which is not always possible, is for the user to create their DXF drawing themselves and not use a file someone else or some other program, has created.
« Last Edit: June 01, 2017, 06:26:51 AM by Administrator »
Admin -- Ralph -- support @ BenCutLaser dot us
http://www.BenCutLaser.us/SetupBenCutLaser2.5b.exe.zip
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

RobotEyes

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
    • RobotLaser
Re: DXF Import
« Reply #6 on: June 01, 2017, 07:29:18 AM »

Unfortunately, what you say is extraordinarily true !!!
The programs that so far have given me less problems are those of AutoDesk,
Ie those who first created the standard.
(Maybe also because I used their documentation to write the software !?!?)
Unfortunately many users can not afford the cost of AutoCad;
If I did not use it for work ..... I would not buy it either.
And surely I do not recommend pirated copies.


Carlo

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2539
  • Administrator
    • View Profile
Re: DXF Import
« Reply #7 on: June 01, 2017, 08:24:01 AM »
While we do have a section here on CAD programs, I will say here that the three I use are QCAD (I paid for a Pro license and this is my main CAD app), NanoCAD (free, excellent and I'm starting to use this one more and more...watchout QCAD) and LibreCAD (free, used to double check problem DXF files only).
Admin -- Ralph -- support @ BenCutLaser dot us
http://www.BenCutLaser.us/SetupBenCutLaser2.5b.exe.zip
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

ThothLoki

  • Hero Member
  • *****
  • Posts: 1576
  • Tinkerer
    • View Profile
Re: DXF Import
« Reply #8 on: June 01, 2017, 09:16:52 AM »
While we do have a section here on CAD programs, I will say here that the three I use are QCAD (I paid for a Pro license and this is my main CAD app), NanoCAD (free, excellent and I'm starting to use this one more and more...watchout QCAD) and LibreCAD (free, used to double check problem DXF files only).

I use NanoCAD. I shoed my CAD guys at work and they said it is pretty much just a clone of an older version of AutoCAD. They were able to zip around it pretty quickly after they found where the buttons were.
Laser: A5 2000mw with L7 Board / A3 2500mw PWM with Mana SE -- All using T2Laser
3D Printer: Monoprice Maker Select v2.1
Image Resizer Applications (All OS): http://benboxlaser.us/index.php/topic,1434.msg17297.html#msg17297

mrehmus

  • Sr. Member
  • ****
  • Posts: 335
  • Pilot, submariner, model engineer, etc., etc.
    • View Profile
    • Model Engine Builder
Re: DXF Import
« Reply #9 on: June 01, 2017, 08:05:39 PM »
For those of you who are veterans in the U.S. and Canada, you can get a year's license to Solidworks for $20. I just installed my copy (9 Gigabytes of download) and it works nicely.
mrehmus
editor, Model Engine Builder magazine
Elekslaser A3 2.5 watt via Banggood
BCL
Qidi X-one 3D printer
Machine Shop with manual and CNC machines