Author Topic: rounding up coordinates  (Read 4360 times)

Offline emlclcy

  • Ewok
  • *
  • Posts: 6
    • View Profile
rounding up coordinates
« on: May 24, 2017, 12:57:32 pm »
is it possible to round the coordinates of a polygon?
say the endpoints were on a 3 decimal place grid, can you round this to say a 2 decimal place grid?
thanks
carl

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
Re: rounding up coordinates
« Reply #1 on: May 24, 2017, 13:44:06 pm »
Carl,

I'm not 100% clear on your requirements but these come to mind,

This plugin works for polylines, http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/polyround.html
Also have look at the CamBam menu, Tools->Options->Grid
Then this plugin, http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/gridmanager.html

 
Made in England

Offline emlclcy

  • Ewok
  • *
  • Posts: 6
    • View Profile
Re: rounding up coordinates
« Reply #2 on: May 24, 2017, 13:55:01 pm »
Carl,

I'm not 100% clear on your requirements but these come to mind,

This plugin works for polylines, http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/polyround.html
Also have look at the CamBam menu, Tools->Options->Grid
Then this plugin, http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/gridmanager.html

 


eddy, thats exactly what i want but i have the free old version which i guess will not support this pluggin.
I'm trying to read a complex dxf file into altium pcb but it keeps falling over. I cant try it on the evaluation version as it says pluggins are disabled and it won't save dxf.
If i sent you a very simple dxf, basically a 4 sided polygon, which fails in altium, would you be up for rounding it and sending me it back to see if it works?
carl

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
Re: rounding up coordinates
« Reply #3 on: May 24, 2017, 14:14:30 pm »
Just attach it to a post here, zip it if you want.
Made in England

Offline emlclcy

  • Ewok
  • *
  • Posts: 6
    • View Profile
Re: rounding up coordinates
« Reply #4 on: May 24, 2017, 14:25:55 pm »
Just attach it to a post here, zip it if you want.
thanks! here is a part of the design, can you round it to 2 decimal places metric please?
cheers

carl

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
Re: rounding up coordinates
« Reply #5 on: May 24, 2017, 14:28:47 pm »
Try that, I had to change the 'lines' to 'polylines'
Made in England

Offline emlclcy

  • Ewok
  • *
  • Posts: 6
    • View Profile
Re: rounding up coordinates
« Reply #6 on: May 24, 2017, 14:35:53 pm »
Try that, I had to change the 'lines' to 'polylines'
thanks for trying but it didn't work! i could query the line segments in altium and they were to two decimals so the conversion was all good.
Think it may be a bug in altium now
thanks ever so much for trying tho

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
Re: rounding up coordinates
« Reply #7 on: May 24, 2017, 14:47:41 pm »
Maybe it's the wrong version of dxf ?

I assume you did a search ?

this for example; https://electronics.stackexchange.com/questions/72779/importing-drawings-dxf-in-altium
« Last Edit: May 24, 2017, 14:52:17 pm by EddyCurrent »
Made in England

Offline emlclcy

  • Ewok
  • *
  • Posts: 6
    • View Profile
Re: rounding up coordinates
« Reply #8 on: May 24, 2017, 14:56:05 pm »
Maybe it's the wrong version of dxf ?
its not consistent. when i read the dxf (tried v12 upto 2007) some of the polygons convert ok, the error message on the polygons that it fails on says its a duplicate coordinate, thats what lead me to think it was to many decimal places from the source cad system the dxf file viewed with notepad show 16 decimal places!

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4409
    • View Profile
Re: rounding up coordinates
« Reply #9 on: May 24, 2017, 15:06:03 pm »
Try these, it's just one polyline now

One is to 2 decimal places (ver 4), the other is to more (ver 3).
« Last Edit: May 24, 2017, 15:09:06 pm by EddyCurrent »
Made in England

Offline emlclcy

  • Ewok
  • *
  • Posts: 6
    • View Profile
Re: rounding up coordinates
« Reply #10 on: May 24, 2017, 15:21:22 pm »
Try these, it's just one polyline now

One is to 2 decimal places (ver 4), the other is to more (ver 3).
no they didn't work either.
i have sent test-2.dxf to altium to see what they think