• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Calculation/precision issue with arc radius

Stats

  • Replies 4
  • Subscribers 158
  • Views 2469
  • Members are here 0
More Content

Calculation/precision issue with arc radius

archive
archive over 19 years ago

Hi,

I've got the following problem with some skill code I've written that should export more than one place bound per component to IDF.
The code so far seems stable, but I have issues with calculating the arc radius if it is not between 10 and 170 degrees or 0/180 degrees.

I've created a test case that exhibits the issue. It is attached as boards.zip it contains 2 board files. Case2.brd which is the original board in millimeters and micron_2decimals.brd which is a conversion of case2.brd with 2 decimal points. Looking at this there should be precisely a factor 1000 in difference, this is however not the case, I can get better precision after the translation. Here's the arc data that I can get out using the attached skill program

Arc data        millimeters        microns
Center x        -1.06                -1059.77
Center y        -0.122                -122.36
Radius            0.151                150.52
x1                 -0.98                 -980.0
y1                  -0.25                -250.0
x2                -1.14                -1140.0             
y2                0.005                5.0
Load the skill program and run ns_idf to get files named boardname.emp/emn and temp_ptc.emp/emn (the last is the Cadence IDF output)
Look in the boardname.emp file to see the data above, they're listed just below the line with the arc radius in the boardnameemp file.
The boards.zip also contains an Excel spreadsheet that shows the calculation method. This is also written in the skill code, but in a rather complex system due to the fact that the angles has to be correct with respect to sign and degree. I've had customers looking at the output and this should be the only issue left to get the correct results.

Now using mathematics I can calculate the arc radius to the following
In millimeters (case2.brd) I get the angle to be -170.86
And in microns I get the angle to be -179.89

The weird thing here is that using the Cadence built in IDF export functionality gives the same figure in both cases, namely -179.798

So I'm looking for a  way to get more precision out of the board using millimeters.
Does anyone have any idea whats going on here? I'm just very curious as to how the built in Cadence IDF export can get the precision from the case2.brd to calculate the angle whereas I cannot do the same

Best regards,
Ole


Originally posted in cdnusers.org by ejlersen
boards.zip
  • Sign in to reply
  • Cancel
Parents
  • archive
    archive over 19 years ago

    Hi Ole,

    Your code is quite complex - and involves lots of floating point maths - so you will probably get lots of floating point rounding errors. See the discussion about that problem in this forum.

    I have written a similar routine for exporting IDF and get the same results as Cadence.
    See attached.

    Cheers, Dave


    Originally posted in cdnusers.org by Dave Elder
    IDF_putVertices.il
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • archive
    archive over 19 years ago

    Hi Ole,

    Your code is quite complex - and involves lots of floating point maths - so you will probably get lots of floating point rounding errors. See the discussion about that problem in this forum.

    I have written a similar routine for exporting IDF and get the same results as Cadence.
    See attached.

    Cheers, Dave


    Originally posted in cdnusers.org by Dave Elder
    IDF_putVertices.il
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information