element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Chat (English) ulp function wanted:distance from point to smd pad edge
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 177 subscribers
  • Views 438 views
  • Users 0 members are here
Related

ulp function wanted:distance from point to smd pad edge

autodeskguest
autodeskguest over 16 years ago

I need a function that returns the distance between a point and the edge of

a smd pad. If the point is inside the pad, I'd want it to return 0.

Anyone tried doing that? I want the roundness of the smd to be a part of the

function too.

 

 

 

  • Sign in to reply
  • Cancel
Parents
  • autodeskguest
    autodeskguest over 16 years ago

    "Olin Lathrop" <eagle@embedinc.com> wrote in message

    news:hgap4t$8a5$1@cheetah.cadsoft.de...

    That's going to be a little tricky since you have to mimic the Eagle SMD

    roundness algorithm.  The UL_SMD structure only gives you the rectangular

    size and roundness as a separate parameter.  There are various ways the

    roundess parameter could be used to blend between a rectangle and a

    elipse,

    and I don't remember seeing documentation on how exactly Eagle does it.

     

    On the other hand, maybe it doesn't need to be that accurate and you can

    probably get a good idea of their method with a little experimentation.

    Once you know how to compute the pad shape, the brute force way to do what

    you ask would be to turn it into a polygon and perform a normal in/out

    function.  At least you know the polygon will be convex.

     

    However, it still sounds like you're stuck in a rut having made the wrong

    choice several layers up and now requiring ever more elaborate schemes to

    work around the problem, when the right answer is to not be in this

    situation in the first place.  Step back and explain the original problem

    you are trying to solve.

     

    I know I can do it (gimme a day or two), that is not the problem. I just

    didnt want to if anyone else has done it and wanted to share it before I

    spend my valuable time.

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • autodeskguest
    autodeskguest over 16 years ago

    "Olin Lathrop" <eagle@embedinc.com> wrote in message

    news:hgap4t$8a5$1@cheetah.cadsoft.de...

    That's going to be a little tricky since you have to mimic the Eagle SMD

    roundness algorithm.  The UL_SMD structure only gives you the rectangular

    size and roundness as a separate parameter.  There are various ways the

    roundess parameter could be used to blend between a rectangle and a

    elipse,

    and I don't remember seeing documentation on how exactly Eagle does it.

     

    On the other hand, maybe it doesn't need to be that accurate and you can

    probably get a good idea of their method with a little experimentation.

    Once you know how to compute the pad shape, the brute force way to do what

    you ask would be to turn it into a polygon and perform a normal in/out

    function.  At least you know the polygon will be convex.

     

    However, it still sounds like you're stuck in a rut having made the wrong

    choice several layers up and now requiring ever more elaborate schemes to

    work around the problem, when the right answer is to not be in this

    situation in the first place.  Step back and explain the original problem

    you are trying to solve.

     

    I know I can do it (gimme a day or two), that is not the problem. I just

    didnt want to if anyone else has done it and wanted to share it before I

    spend my valuable time.

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube