Automatic mapping of image files (jpeg,png)

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
thelasercutter01
Junior Member
Posts: 24
Joined: Fri Jan 13, 2023 2:12 pm

Automatic mapping of image files (jpeg,png)

Post by thelasercutter01 » Mon Jan 23, 2023 4:33 pm

Just looking for some quick advise on how to do the below please.

If I have an image (not svg) e.g. a jpeg/png, etc format like attached is there a way for QCAD to automatically to trace as much as is possible after I import it as image into QCAD? I know I can manually trace but wondering if there is an automatic way to do it?

OS: Windows 11, version: 3.27.8.0 (3.27.8)
Attachments
dog2.png
dog2.png (21.17 KiB) Viewed 1542 times

User avatar
bambuko
Senior Member
Posts: 126
Joined: Fri Jul 02, 2021 6:20 pm
Location: UK, England, North Devon

Re: Automatic mapping of image files (jpeg,png)

Post by bambuko » Mon Jan 23, 2023 5:37 pm

https://inkscape.org/ is your friend :mrgreen:
to convert it to svg takes no time at all...
dog.dxf
(226.61 KiB) Downloaded 160 times
Screenshot from 2023-01-23 16.44.49.jpeg
Screenshot from 2023-01-23 16.44.49.jpeg (54.78 KiB) Viewed 1526 times
QCad Pro
Linux MX-21.3 "Wildflower"

CVH
Premier Member
Posts: 3470
Joined: Wed Sep 27, 2017 4:17 pm

Re: Automatic mapping of image files (jpeg,png)

Post by CVH » Mon Jan 23, 2023 7:04 pm

Hi,

First this: The results of bitmap tracing is always better with a larger image. :wink:

Remark in dog.dxf by bambuko that it is a mix of arcs, polylines and splines.

Many cnc controllers and some CAM don't support splines.
One can approximate them in QCAD with polylines using Explode (XP).
The tolerance for that can be set in App.Prefs.

Also remark that there are 6 polylines with a length far less than 0.1 unit (in this case mm).
Found with Detect Zero-Length Entities (MZ) with 0.1 tolerance.

For laser cutting a continuous path is preferable.
Double click near an entity and QCAD will select all connected.
You can then merge this selection to a single polyline contour with Polyline From Selection (OC).
Splines (& ellipses) are automatically approximated with the Explode settings.
When the polyline contour isn't closed (See Property Editor) then it may need some manual tweeking.

Regards,
CVH

thelasercutter01
Junior Member
Posts: 24
Joined: Fri Jan 13, 2023 2:12 pm

Re: Automatic mapping of image files (jpeg,png)

Post by thelasercutter01 » Tue Jan 24, 2023 8:29 am

bambuko wrote:
Mon Jan 23, 2023 5:37 pm
https://inkscape.org/ is your friend :mrgreen:
to convert it to svg takes no time at all...
dog.dxf

Screenshot from 2023-01-23 16.44.49.jpeg
Thank you very much, I think as a beginner this sounds like great idea!

thelasercutter01
Junior Member
Posts: 24
Joined: Fri Jan 13, 2023 2:12 pm

Re: Automatic mapping of image files (jpeg,png)

Post by thelasercutter01 » Tue Jan 24, 2023 8:31 am

CVH wrote:
Mon Jan 23, 2023 7:04 pm
Hi,

First this: The results of bitmap tracing is always better with a larger image. :wink:

Remark in dog.dxf by bambuko that it is a mix of arcs, polylines and splines.

Many cnc controllers and some CAM don't support splines.
One can approximate them in QCAD with polylines using Explode (XP).
The tolerance for that can be set in App.Prefs.

Also remark that there are 6 polylines with a length far less than 0.1 unit (in this case mm).
Found with Detect Zero-Length Entities (MZ) with 0.1 tolerance.

For laser cutting a continuous path is preferable.
Double click near an entity and QCAD will select all connected.
You can then merge this selection to a single polyline contour with Polyline From Selection (OC).
Splines (& ellipses) are automatically approximated with the Explode settings.
When the polyline contour isn't closed (See Property Editor) then it may need some manual tweeking.

Regards,
CVH
Thanks for the detailed answer. I think I need some time to get my head around this and test :)

Post Reply

Return to “QCAD 'How Do I' Questions”