DXF import arc problem

Paul Boyd

Member
Location
Loughborough, UK
Hi Martin

I'm not sure if I've missed something or found a bug. When importing a DXF with arcs, some of the arcs are shown within Templot as being drawn clockwise, and others anti-clockwise - the latter is correct. This was drawn with DoubleCAD XT5, and as is conventional all arcs are drawn anti-clockwise. The two screenshots show how the drawing compares with Templot. Any ideas?

I've also attached the resulting shapes file and the DXF. I noticed that whilst importing the DXF was fast, reloading the shapes file took forever!

Cheers,
Paul

twirlydrg.PNG

twirly.PNG
 

Attachments

  • twirly.bgs3
    1.8 MB · Views: 18
  • GraingeHodder 400mm wide 90deg1.dxf
    215.7 KB · Views: 13
_______________
message ref: 1287

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
@Paul Boyd

Hi Paul,

I haven't looked at that code since the beginning of Templot. :)

It seems that I adopted a very simple algorithm -- if the start angle is less than the end angle, it goes anticlockwise, if the start angle is more than the end angle, it goes clockwise.

That needs changing so that in the second case, 360 degrees is first added to the end angle. I will do that in the next program update, and in the meantime post you a revised BGS3 for now.

I know about the very slow loading of BGS3 files, we have discussed it recently, see:

https://85a.uk/templot/club/index.php?threads/shapes-problem.148/post-1216

I fear I have taken a wrong turn using XML for the background shapes. The previous system was fast and worked perfectly, but some folks just couldn't grasp that the picture shape images were in separate SK81 files. I thought putting everything in one file would be better. Which it would of course, but not using XML.

Thanks for the report.

cheers,

Martin.
 
_______________
message ref: 1288

Paul Boyd

Member
Location
Loughborough, UK
@Paul Boyd

Hi Paul,

I haven't looked at that code since the beginning of Templot. :)
Hi Martin

It's always good to go back to the beginning of time when looking for bugs!! Thanks for confirming it wasn't me doing something silly, for once.

I'll look forward to the next release, whenever that may be :), and the tweaked bgs3.

I saw the thread you mentioned but hadn't made the connection. Yes, the "where have my pictures gone?" question seemed to be a weekly occurrence for a while.

Cheers,
Paul
 
_______________
message ref: 1289

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
@Paul Boyd

Hi Paul,

Here is a BGS3 with your imported DXF corrected. I needed to shift it +1200mm on Y to match your previous BGS3. Is that correct? If not, let me know and I will do it again.

If you have other stuff in your background shapes, you can use the add file option to add this to them.

cheers,

Martin.
 

Attachments

  • imported_mmdxf_for_paul_shifted_0x1200y.bgs3
    864.7 KB · Views: 20
_______________
message ref: 1290

Paul Boyd

Member
Location
Loughborough, UK
Hi Paul,

Here is a BGS3 with your imported DXF corrected. I needed to shift it +1200mm on Y to match your previous BGS3. Is that correct? If not, let me know and I will do it again.

If you have other stuff in your background shapes, you can use the add file option to add this to them.

cheers,

Martin.
Hi Martin

Thanks very much, that's brilliant! The 1200mm Y shift is correct. The zero reference was originally at the bottom edge of the horizontal boards, which was also how the drawing was done. A late decision added the corner board (so I could sit in my chair without a board under my nose!) so I shifted everything up by 1200mm in Templot, and went negative Y on the drawing. The DXF import was set to 'shift Y' by that amount. I should probably have mentioned that before!

I do have other background shapes but have kept them as separate files to be added as required.

Cheers,
Paul
 
_______________
message ref: 1291

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
Hi Paul,

Glad it's ok. If you need another one done, just ask. It takes only a minute to import a DXF and save a BGS3. The next update will take longer. :)

Martin.
 
_______________
message ref: 1292
Top