Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, February 14, 2008 7:03:48 AM(UTC)
ArtFenerty

Groups: Registered
Posts: 13


Hi:

The VECTOR_ELLIPTICALARC is enumeration wrong start and end angles. Here is a file with only one elliptical arc in it, other cad programs report start and end angles of 150.66 and 243.831 or almost 93 degrees of arc, with 270 degrees of rotation, enumeration of the VECTOR_ELLIPTICALARC structure reports all good numbers except start angle of 69.4822 and sweep of 74.1823 , so a 74 degree sweep. This makes it impossible to use an elliptical arc in enumeration. This is latest leadtools V15.

Thanks
Art
File Attachment(s):
Amach3Cannon1.zip (7kb) downloaded 22 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, February 14, 2008 10:24:32 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Which other CAD programs are you using to load the file and check the properties? 

Could you send a screenshot of the image properly displayed the properties of the arc as reported by the CAD application?
 
#3 Posted : Saturday, February 16, 2008 5:17:18 AM(UTC)
ArtFenerty

Groups: Registered
Posts: 13


Hi:

QCad again. BUT leadtools displays the elliptical arc fine, it just doesnt enumerate to angles that agree. QCad's properties shows the angles as explained, but enumeration doesnt agree at all..

Art
ArtFenerty attached the following image(s):
acanon.jpg
 
#4 Posted : Monday, February 18, 2008 6:14:00 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I have reproduced this problem and have reported it with the incident number 6682IDT.  This incident will be reviewed and prioritized by our engineering department.  I will contact you when I get more information from our developers.
 
If you have any more questions, please let me know.
 
#5 Posted : Thursday, February 28, 2008 11:07:46 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The developers working on your incident, 6682IDT, have let me know that it is not a bug.  This is just a difference in how the arc is calculated.

AutoCAD uses what is known as eccentric anomaly:

http://en.wikipedia.org/wiki/Eccentric_anomaly
http://mathworld.wolfram.com/EccentricAnomaly.html

To let you understand me more, I attached an image showing the difference between eccentric anomaly angle (which AutoCAD use) and the normal angle (which we use).

Anyway, to convert from eccentric anomaly to normal angle you can use the following formula:

start = atan2(ratio*sin(startEcc), cos(startEcc));
end = atan2(ratio*sin(endEcc), cos(endEcc));

Where:
startEcc, endEcc: the start and end angles measured in eccentric anomaly.
start, end: the start and end angles measured normally.
ratio: The ratio of minor axis to major axis.
GregR attached the following image(s):
eccentric_anamoly.jpg
 
#6 Posted : Thursday, February 28, 2008 3:38:26 PM(UTC)
ArtFenerty

Groups: Registered
Posts: 13


Thanks,
Art
 
#7 Posted : Friday, February 29, 2008 5:53:03 AM(UTC)
ArtFenerty

Groups: Registered
Posts: 13


Hi:

So is the enumerated data from VECTOR_ELLIPTICALARC in terms of startangle and sweepangle reporting the angles as ECC or as normals already converted by the above equation?

Thanks
Art
 
#8 Posted : Monday, March 3, 2008 3:45:32 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


LEADTOOLS' enumerated data is in terms of normals.
 
#9 Posted : Monday, March 3, 2008 4:04:23 PM(UTC)
ArtFenerty

Groups: Registered
Posts: 13


But in the dxf starting this thread, the start angle is listed as 150.6617 (2.629596 Rads) , but leadtools enumberates that angle to StartAngle = 69.4822 with a sweep of 74.1823496 , where if I use the formulas above on the DXF data, I get
StartAngle of 159.4436 which sounds right ( with the reported ratio of .6672080154..). I cant seem to find any way the leadtools reported numbers come out right..
Would that be due to rotation or something, file reports a 270 degree rotation on that entity..?
But I dont "think" that would resolve to start angle of 60.4822 which is what LeadTools enumerates.. Its almost as if the value is 90 degrees out of position.. Can you show me how the start angle goes from a startP of 2.629596 in the DXF with a minor/major ratio of .667208154 to a startangle of 69.48 in the enumeration.. ( Sorry to be a pain , but I just cant figure a way to get the values needed to draw the eliptical arc ..)


Art


Art

 
#10 Posted : Tuesday, March 4, 2008 5:14:32 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I could not resolve this either.  I've reopened the incident to get more details from the developer and make sure his equation is correct.  I'll contact you when I get more information.
 
#11 Posted : Tuesday, March 4, 2008 4:44:49 PM(UTC)
ArtFenerty

Groups: Registered
Posts: 13


Greg:

Thx, I know its a complex issue to derive an answer to.. of all the support queries I do, its the strange ones like this one that take the longest to trace through. Takes hours to make sure Im not wasting your time with my own errors. :)

Art
 
#12 Posted : Wednesday, March 5, 2008 4:49:13 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Thanks for asking questions, and it's not a waste of time.  It is possible for problems to exist or for mistakes to be made, and things like this will improve our product down the road.
 
#13 Posted : Monday, March 17, 2008 5:41:00 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I believe that the reason the final start angle reported in LEAD is rotated is because we are reporting the angles relative to the major axis.  Since the major axis in that file is vertical, then the -90 or 270 degree rotation gives the angle which we display.

I'm not 100% sure that this is the reason and I'm still waiting to hear back from the developer positively regarding it.
 
#14 Posted : Monday, April 7, 2008 4:16:08 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


The developer has gotten back to me and confirmed that they "rotate" the values based on wherever the major axis is. 

Here's the basic math going on underneath:

startEccDeg = 150.66;
endEccDeg = 243.831;
ratio = 0.667208;

startEccRad = startEccDeg * (Math.PI / 180); // 2.6295130510546567   
endEccRad = endEccDeg * (Math.PI / 180); // 4.2556537684302933   

startRad = Math.Atan2(ratio * Math.Sin(startEccRad), Math.Cos(startEccRad)); // 2.7827935832851476
endRad = Math.Atan2(ratio * Math.Sin(endEccRad), Math.Cos(endEccRad)); // -2.205592008474476

startDeg = startRad * (180 / Math.PI); // 159.44232757832611
endDeg = endRad * (180 / Math.PI); // -126.37111341336997 = 233.62888658663003

Then you just have to determine where the major axis is and rotate the values based on that.  Since this particular file has a major axis rotation of 270 degrees, your start and end angles are:

429.442327578232611 = 69.442327578232611
503.62888658663003 = 143.62888658663003

making the sweep 74.186559008397419.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.283 seconds.