Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Wrong sweepangles and arc starts in DXF.
Started by ArtFenerty at 11-11-2007 10:59. Topic has 8 replies.

Print Search « Previous Thread Next Thread »
  11-11-2007, 10:59
ArtFenerty is not online. Last active: 10/14/2007 3:05:32 PM ArtFenerty

Top 50 Posts
Joined on 04-13-2007
Posts 33
Wrong sweepangles and arc starts in DXF.

Attachment: vleugel_3mm.zip
Reply Quote
Hi:

The included DXF fails in enumeration as the arc segements are all misplaced. The segments use a large radius, and it seems impossible to compute the actual start and end positions of the arcs in relation to each other. Is there some other way to get an arc than just a sweepangle and start angle,
or are the values being reported incorrectly? I suspect its a problem where there isnt enough decimals precision to get an accurate start and end position calcuated fromt he information provided in the enumeration.. Is there any solution to this? Im using LeadTools v15.

Thanks
Art
fenerty@artofcnc.ca


   Report 
  11-12-2007, 8:04
Qasem Lubani is not online. Last active: 11/25/2008 3:28:58 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,147
Re: Wrong sweepangles and arc starts in DXF.

Attachment: LTvsACAD.jpg
Reply Quote

I have tested the issue here by opening the file that you sent me in both LEADTOOLS and AutoCAD. I clicked on one of the objects and the (X, Y, Z) points were the same.

What objects are you trying to enumerate?




Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  11-12-2007, 22:26
ArtFenerty is not online. Last active: 10/14/2007 3:05:32 PM ArtFenerty

Top 50 Posts
Joined on 04-13-2007
Posts 33
Re: Wrong sweepangles and arc starts in DXF.
Reply Quote
Hi :

Im enumerating in my own code. It when the object is reported to me as an arc object, what
Im fed is the startangle, endangle, and sweepangle, but they dont compute to the proper endpoints. Ill disolve the drawing down and resubmit this one to show the error. I have no doubt your viewer display properly, but I dont use it, I only use the enumeration rouines, and the data passed is wrong..

Thanks
Art

   Report 
  11-12-2007, 22:51
ArtFenerty is not online. Last active: 10/14/2007 3:05:32 PM ArtFenerty

Top 50 Posts
Joined on 04-13-2007
Posts 33
Re: Wrong sweepangles and arc starts in DXF.

Attachment: vleugel_3mm.zip
Reply Quote
Hi:

Here it is pared down. The trouble is, while Acad, and other cad programs open this, when its enumerated it comes in as a few lines, and several arcs. The arcs have a radius in the order of 11,720 and when applied to the start and end angles and sweepangles , the result is a line in which the start end endpoints do not match, they are quite far off each other. I cant find any rational in how to recompute the end points. I suspect its an error in the bulge factor of this "polyline?" entity. Ive narrowed the drawging to this one polyline, but as a collection of lines and arcs sent to me in enumeration, they will not match start and end points. I suspect the radius is so large that a calculation breaks down internally somewhere, for example, the start angle on the arc is set to 276 degrees? with a sweep of -.03887687687 degrees. Ok, but iof I compute that to start and end points, they dont match the lines sent in the line enumeration. Since its a polyline, all the start and end points shoudl form a line, but they dont.
So if Im not useing your display code, its impossible to reconstruct the objects in this dxf to a polyline..

Thanks
Art

   Report 
  11-12-2007, 22:53
ArtFenerty is not online. Last active: 10/14/2007 3:05:32 PM ArtFenerty

Top 50 Posts
Joined on 04-13-2007
Posts 33
Re: Wrong sweepangles and arc starts in DXF.

Attachment: trouble.jpg
Reply Quote
Heres a snapshot of the resultant line when calcuated, as you can see they dont computer to a polyline, bulged or not..

Art


   Report 
  11-14-2007, 7:12
Qasem Lubani is not online. Last active: 11/25/2008 3:28:58 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,147
Re: Wrong sweepangles and arc starts in DXF.
Reply Quote
Can you give me all the coordinate numbers of the object you suspect is incorrect, so that I can inspect that object here?
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  11-14-2007, 13:15
ArtFenerty is not online. Last active: 10/14/2007 3:05:32 PM ArtFenerty

Top 50 Posts
Joined on 04-13-2007
Posts 33
Re: Wrong sweepangles and arc starts in DXF.
Reply Quote
Hi:

Well, lets just look at the first 3 entities in this polyline.. Here they are as reported by the enumeration of the vector objects..

Start of object

1)

Vector_arc:

radius: 11709.905773810398
startangle: 276.08711409853908
sweep: -.038258181462521017
center: -1025.0222608022084 , 11723.197041138523

computes to: startx,starty = 216.70130739240949, 79.313848160840280
endx, endy = 208.92604667588921, 78.487306413915576

2)

Vector_arc:

radius: 406.92081461923357
startangle: 276.01999582464191
sweep: -0.22931992340708959
center: 188.04322532625247 , 485.51013825845047

computes to: startx,starty = 230.71926470385580, 80.833347432213543
endx, endy = 229.09925380092147, 80.665783109131610

3)

vector_line:

startx: 229.88320599999972
starty: 80.749159000000006
endx: 228.96563100000000
endy: 90.755679999999998

As you can see, then line starting on item 3, does not start at the X,Y end of entitiy #2. This is a polyline though, so they must, the end of one entity must begin the next entity. Im using as high a precision as is possibel to compute the start and end points from the sweep angle and start angle.. as in

ent->endy = ent->centery + (sin( (endangle * 3.1415926535897932)/180)* ent->radius);
ent->endx = ent->centerx + (cos( (endangle * 3.1415926535897932)/180) * ent->radius);


Thanks
Art


   Report 
  11-15-2007, 9:06
Qasem Lubani is not online. Last active: 11/25/2008 3:28:58 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,147
Re: Wrong sweepangles and arc starts in DXF.
Reply Quote

I have tested the issue here and noticed a problem in which I have reported to our engineers.

 

The issue was reported under incident number 6381AMN; if you would like to ask about the status in the future please refer to the incident number. I will also notify you as soon as the issue is addressed.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  12-23-2007, 9:15
Qasem Lubani is not online. Last active: 11/25/2008 3:28:58 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,147
Re: Wrong sweepangles and arc starts in DXF.
Reply Quote
This is in regards to incident number 6381AMN. Our engineers have updated the status on the incident and marked it as fixed in the latest build of LEADTOOLS 15. Please send an email to support@leadtools.com containing your serial number for patches download instructions.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
Post
LEAD Support Fo... » Developer » Vector » Re: Wrong sweepangles and arc starts in DXF.

Powered by Community Server, by Telligent Systems