DrawFromCSV - adding ellipses

This forum is for 'Work-in-Progress' QCAD user developed script Add Ons and Plug-ins.

Please use this forum to request/submit your script Add-Ons & Plug-in idea's.

Moderators: andrew, Husky, J-J

spacester
Junior Member
Posts: 12
Joined: Wed Jan 25, 2023 12:54 am

Re: DrawFromCSV - adding ellipses

Post by spacester » Mon Jan 30, 2023 8:11 pm

Bad data, the radius is wrong. Sorry about that. I was in spreadsheet creation mode and didn't check the data itself.

The function looks good as far I can tell. The line width is too wide, but that's ok.

I have complete confidence it is working correctly, let me get new data.

spacester
Junior Member
Posts: 12
Joined: Wed Jan 25, 2023 12:54 am

Re: DrawFromCSV - adding ellipses

Post by spacester » Mon Jan 30, 2023 8:41 pm

ELLIPTICORBIT,2031-JAN-11,0.2156351982,263.8396998538,83.8396998538,1.199051567,1.1795024891,0,179.2573094625
ELLIPTICORBIT,2031-JAN-12,0.2156692374,264.8591042406,84.8591042406,1.1991262045,1.1795721403,0,178.0352326103
ELLIPTICORBIT,2031-JAN-13,0.2162886016,265.878420442,85.878420442,1.1997912308,1.180134839,0,176.0868396499
ELLIPTICORBIT,2031-JAN-14,0.2176514677,266.8976377789,86.8976377789,1.2012047669,1.1813216033,0,173.4118844534
ELLIPTICORBIT,2031-JAN-15,0.2192758312,267.9167449427,87.9167449427,1.2028849935,1.1827300695,0,170.736320883
ELLIPTICORBIT,2031-JAN-16,0.2219629903,268.9357300532,88.9357300532,1.2056328959,1.185024519,0,167.3340837553
ELLIPTICORBIT,2031-JAN-17,0.2260425224,269.9545807631,89.9545807631,1.2097781687,1.1884729679,0,163.2050229186
ELLIPTICORBIT,2031-JAN-18,0.2308612883,270.9732845298,90.9732845298,1.2146676366,1.1925269528,0,159.0731637973
ELLIPTICORBIT,2031-JAN-19,0.2377140834,271.991828921,91.991828921,1.2215961735,1.1982442262,0,154.2110506749
ELLIPTICORBIT,2031-JAN-20,0.2457746517,273.0102019608,93.0102019608,1.2297373036,1.2049268262,0,149.3404618591
ELLIPTICORBIT,2031-JAN-21,0.2551711919,274.0283924411,94.0283924411,1.2392193456,1.2126632877,0,144.4576409768

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: DrawFromCSV - adding ellipses

Post by CVH » Tue Jan 31, 2023 7:29 am

spacester wrote:
Mon Jan 30, 2023 8:11 pm
I have complete confidence it is working correctly, let me get new data.
This data makes more sense, now all the ellipses share a common focal point. :P ... The sun at the origin.

It is not a perfect match because you only provided numbers with up to 10 decimal digits.
Floating point values have about 15.9 meaningful digits in all, disregarding the decimal point position.
Not sure if a perfect match is feasible at all ...

Please see Private messages (PM) for the required files and setting it up.
The dataset differs a bit as I dropped center Axis angle because it is redundant here.
But I might included it nevertheless ...
And the tags are included in an extra CSV field at the end.
spacester wrote:
Mon Jan 30, 2023 8:11 pm
The line width is too wide, but that's ok.
So far the line-art is drawn on the active layer.
DrawFromCSV can set an active layer, switch to an existent layer or create a new one or update on the fly.

I added the creation of an active 'Examples' layer with lineweight 0.05 in the CSV file. :wink:
DrawFromCSV has an unsolvable bug ... Setting the last current active layer isn't immediate reflected in the QCAD GUI Layer List but it is changed.

Regards,
CVH

spacester
Junior Member
Posts: 12
Joined: Wed Jan 25, 2023 12:54 am

Re: DrawFromCSV - adding ellipses

Post by spacester » Mon Feb 06, 2023 6:12 pm

I just wanted to provide an update for anyone curious about this project.

CVH has completed the work, three new ellipse functions (commands?) are working great. All the error checking and such is in place, I am sure they are quite robust. THANK YOU!

I am still working on my part, this request would be closed if I wasn't so slow.

I will be posting the cvs files for drawing the solar system for each year for the rest of the century. I could just do this year but don't see that as being very useful. I might screw it up and I refuse to post results until I have 100% confidence.

Hopefully just another day or two.

spacester
Junior Member
Posts: 12
Joined: Wed Jan 25, 2023 12:54 am

Re: DrawFromCSV - adding ellipses

Post by spacester » Sun Feb 12, 2023 5:47 am

Okay dokey at last I have something good enough to post. I am sure CVH wants to close this request. What a champ! The new ellipse functions work flawlessly AFAICT. THANKS again, CVH! You may mark this as done.

I'll call this release 0.5

The attached zip file contains text files saved as csv files, ready to go for selection when you run DrawFromCSV in QCAD. The idea is to reset the planetary positions once a year, on March 20 at noon UCT, so what you see is the position of the planets as of March 20 of the year in the file name. These files are generated directly by my LISP programs.

It's so easy to run DrawFromCVS, I am not going to post pdfs or screengrabs.
ssy.zip
(104.76 KiB) Downloaded 254 times
If you zoom in close you will see the circles do not fall exactly on the ellipses. They should. I don't get it. But it's close enough and perfect is the enemy of good enough. I will continue to investigate.

I will definitely be upgrading these results and will post updates.

QCAD rocks!

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: DrawFromCSV - adding ellipses

Post by CVH » Sun Feb 12, 2023 11:00 am

Please forgive spacester in its preliminary exuberance and ecstasy.
Only two persons in the world can import and draw these CSV files at the moment.

Implementing these shapes in DrawFromCSV running under QCAD is childishly simple compared to getting the numbers right.
For that all the credit goes to spacester.

Work in Progress for sure:
Remark that the Sun is at the origin, Pluto is terribly huge (about 7.87AU) and it is not on its orbit (see last relative zero position).
The red one is Mars ...

A dxf file as example (2024-26):
PreliminaryResults.dxf
(109.98 KiB) Downloaded 262 times
Or a picture because they may say more than words:
PreliminaryResults.png
PreliminaryResults.png (15.46 KiB) Viewed 9615 times
Regards,
CVH

spacester
Junior Member
Posts: 12
Joined: Wed Jan 25, 2023 12:54 am

Re: DrawFromCSV - adding ellipses

Post by spacester » Sun Feb 12, 2023 8:17 pm

Yeah, my mistake in rushing things.

A much better release is forthcoming, once I am totally confident in the accuracy and appearance.

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: DrawFromCSV - adding ellipses

Post by CVH » Sun Feb 12, 2023 8:40 pm

spacester wrote:
Sun Feb 12, 2023 8:17 pm
Yeah, my mistake in rushing things.
Mistakes are there to learn from, rushing things is never proven to be a good friend. :wink:

Regards,
CVH

Post Reply

Return to “QCAD 'Script Add-On & Plug-in challenge' - Work in Progress”