# Vector issue for cnc router

**URL:** https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305
**Category:** Modeling Questions
**Created:** [May 12, 2022, 3:14am UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305 "2022-05-12T03:14:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Nico](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Nico](https://discourse.shapr3d.com/u/Nico)
#### Post date: [May 12, 2022, 3:14am UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305/1 "2022-05-12T03:14:33Z")

</div>

Hey guys,  
Alright I was commissioned to do the DXF for a sign similar to one that existed. I toke all measurement on the old one and traced my letters with lignes. Sent that to my buddy who loaded it in his vector software for the cnc.  
As you can see on the picture he needs to go through a “vector validator” to go ahead. Problem is all those red squares show a link issue in the lines. He has to, manually, link everything 2 by 2 witch can takes a while. When I created the letters my lines were linked.

So what is happening here. Can I do something so that my DXF is ready to go for the cnc without adding all the linking work in the vector software?

Thanks

 ![image](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/2X/8/80537aa1eb2c53763b9ef2e839b3ac718115b8d1.jpeg)

---

<div class="post-metadata">

### Author: ![PEC](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@PEC](https://discourse.shapr3d.com/u/PEC)
#### Post date: [May 12, 2022, 10:29pm UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305/2 "2022-05-12T22:29:07Z")

</div>

Hi Nico,

Long story short: the issue comes from rounding and precision in the .dxf file generated.  
The points are very close (less than 1 over 1 billion of µm) but not exactly the same coordinates.

Only workaround I know: keep the points on the grid.  
Alternatively, set a tolerance in the verification software if possible, even as small as 0.001µm will be ok or write a small scrip that will read the .dxf and will round all the numbers to less than 14 decimals.

Longer story:

- create a triangle with points originally placed on the grid in mm at coordinate (0,0), (10,0), (10,20)
- change manually the size of the oblique line to be 22.3456 so the origin is no longer on the grid  
 ![CleanShot 2022-05-13 at 00.06.04@2x](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/2X/b/badb30e5ca237bbe43b624d4ab8ed3778c6bdfed.png)
- save the sketch on .dxf file
- open the .dxf file in a text editor and have a look at the line coordinates  
 ![CleanShot 2022-05-12 at 23.52.17@2x](https://us1.discourse-cdn.com/flex002/uploads/shapr3d/original/2X/6/609abae1ddcc0b1b369a59cdde5cfa53c0fbd37a.jpeg)
- the line 1 starts at x1= 0.0067438803961 **397** but the line 2 ends at x2= 0.0067438803961 **402**  
So it means that starting to the 14th decimal, there is a slight difference due to computation rounding which has no meaning in real life, because it means 0.0000000000000005mm error (it is less than the size of a single atom divided by 100 millions!), but this is enough to trigger an error if you expect perfect match.

@Shapr: it could be useful to add a way to set the number of useful digits in the expert part of the .dxf export dialog box.

---

<div class="post-metadata">

### Author: ![Istvan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/istvan/32/23668_2.png) [@Istvan](https://discourse.shapr3d.com/u/Istvan)
#### Post date: [May 13, 2022, 9:20am UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305/3 "2022-05-13T09:20:17Z")

</div>

Great feedback, thanks. We’ll look into this.

---

<div class="post-metadata">

### Author: ![Nico](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Nico](https://discourse.shapr3d.com/u/Nico)
#### Post date: [May 17, 2022, 4:44pm UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305/4 "2022-05-17T16:44:45Z")

</div>

Thank you.is there any other format I could save my file in that take care of this issue?

---

<div class="post-metadata">

### Author: ![Nico](https://avatars.discourse-cdn.com/v4/letter/n/b5a626/32.png) [@Nico](https://discourse.shapr3d.com/u/Nico)
#### Post date: [May 17, 2022, 6:58pm UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305/5 "2022-05-17T18:58:01Z")

</div>

I actually toke care of the problem exporting in .svg but my measurements got all changed. Sounds like when I take care of one problem another one get created ☹

---

<div class="post-metadata">

### Author: ![Sebestyen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.shapr3d.com/sebestyen/32/13022_2.png) [@Sebestyen](https://discourse.shapr3d.com/u/Sebestyen)
#### Post date: [May 18, 2022, 1:50pm UTC](https://discourse.shapr3d.com/t/vector-issue-for-cnc-router/19305/6 "2022-05-18T13:50:25Z")

</div>

Hey @Nico! If the scale of the exported vs imported SVG differ, it might be connected to different DPI settings used.

When exporting SVG in Shapr3D, make sure that the DPI export settings are matching with the importer defaults to make this scaling issue to vanish.

Let me know how that went.
