Bug in getting XY position of ULP in schematic editor

Bug in getting XY position of ULP in schematic editor

squadchanneltakuya
Contributor Contributor
573 Views
10 Replies
Message 1 of 11

Bug in getting XY position of ULP in schematic editor

squadchanneltakuya
Contributor
Contributor

I am currently trying to get the position of nets, parts, text, etc. in the schematic editor.
I can get the exact position of nets, text, polygons, etc.
However, the outlines of parts (Synbols), pins, etc. are out of position.
There is also "dxf.ulp" which exports the contents of the schematic editor to DXF, but only the parts are misaligned as well.
I have tested it and it seems to shift the position twice the actual position.

I tried the circuits in "Electronics Samples", but they are misaligned as well.

 

I tried with dxf.ulp. I used dxf.ulp which can be selected from the ULP dialog, Library.io Public.

I am attaching an image. The gray line is the origin of the schematic editor and the upper left corner of the red part symbol is the origin of the part. The white cross is the mouse pointer. Don't worry about it.

Based on the schematic origin, the part origin is moved to the X=0, Y=4 position. When this is output, it is shifted to the Y=8 position.

For clarity, only one axis is moved, but both X and Y are displaced by a factor of 2.

This is my first ULP so I am not sure, but both dxf.ulp and the ULP I am coding now work fine in Eagle.

scheditor.PNGdxfexpoted.PNG

  

My code is simple: Schematics>Parts>Instances>Gates>Symbol, then Wire/Texts/Pins position is obtained at x1,x2,y1,y2 and output to file.

 

We think it is a bug. Any feedback would be appreciated.

0 Likes
574 Views
10 Replies
Replies (10)
Message 2 of 11

squadchanneltakuya
Contributor
Contributor

I tried it with my code, the first is the original file (Arduino Mega schematic from the EAGLE sample)
The second is the output result in Eagle and the third is the output result in Fusion. It is a mess.

mega-orig-eagle.PNG

mega-exp-eagle.PNG

mega-exp-fusion.PNG

0 Likes
Message 3 of 11

jorge_garcia
Autodesk
Autodesk

Hello @squadchanneltakuya,

 

Would you be willing to share the ULP for review? Having the code in hand gives the developers something to test as they investigate the issue.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes
Message 4 of 11

squadchanneltakuya
Contributor
Contributor

Currently, it is halfway done because of this bug. Attached." test2.ulp".

Therefore, it is not recommended for schematics with multiple sheets." dlgFileSave" will appear a lot.


This ulp exports the schematic to a ".hpgl" type file.It is based on "hpgl.ulp" by Peter Kuhlemann.

It is old (2004!), so it works with the changes around the polygons that have been made(polygons->polyShapes), but it has the same bugs.

http://eagle.autodesk.com/eagle/ulp?utf8=%E2%9C%93&q%5Btitle_or_author_or_description_cont%5D=hpgl&b...


You can check the ".hpgl" file with the old CERN software.

https://service-hpglview.web.cern.ch/service-hpglview/hpglviewer.html

 

The bug is also reproduced in "dxf.ulp" which can be obtained from Library.io.

0 Likes
Message 5 of 11

squadchanneltakuya
Contributor
Contributor

Lines 230-248 are the part of the code where the bug occurs.

0 Likes
Message 6 of 11

jorge_garcia
Autodesk
Autodesk

Hi @squadchanneltakuya,

 

I hope you're doing well. I looked through the code and I can't figure out what's going on right now. I've made a bug report but I get this feeling that something with all several of your pen numbers being at 2 is part of the problem. Try as a test re-using the circle, text- and wire functions from the HPGL ulp.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes
Message 7 of 11

squadchanneltakuya
Contributor
Contributor

A new ULP is attached. For clarity, we have added one pen color and a comment.
The color of the pen is irrelevant as it only changes the value to be printf'd.
All of them use wire, circle, polyshape, etc.

It would be easier to understand if you comment out the functions starting with "scheme_" in the code." There is a problem in the "scheme_parts" function.

0 Likes
Message 8 of 11

squadchanneltakuya
Contributor
Contributor

Have you made any progress?

0 Likes
Message 9 of 11

jorge_garcia
Autodesk
Autodesk

Hi @squadchanneltakuya,

 

I hope you're doing well. I was able to get that far, but I couldn't find any reason why it wouldn't work in the code. I've made a debug report and added your code to it but now it's in the hands of the developers. Not much more I can do.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes
Message 10 of 11

squadchanneltakuya
Contributor
Contributor

I would appreciate it if you could reply to me if you make any progress.b

0 Likes
Message 11 of 11

jorge_garcia
Autodesk
Autodesk

Hi @squadchanneltakuya,

 

I will let you know when I hear something about this.

 

Let me know if there's anything else I can do for you.

 

Best Regards,



Jorge Garcia
​Product Support Specialist for Fusion 360 and EAGLE

Kudos are much appreciated if the information I have shared is helpful to you and/or others.

Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
0 Likes