Ajout module cône

Veuillez poser ici vos questions, vos commentaires, concernant l'utilisation ou les problèmes rencontrés avec QCAD professionnel

Moderators: andrew, J-J

Forum rules

Indiquez toujours votre système d'exploitation et votre version de QCAD.

Joignez les fichiers de dessin et les captures d'écran.

Postez une question par sujet.

tukuyomi
Full Member
Posts: 50
Joined: Mon Aug 09, 2010 6:15 pm

Re: Ajout module cône

Post by tukuyomi » Wed Sep 14, 2022 3:33 pm

Thanks Husky for the attention given to this project.
Unfortunately, I no longer work at my job. So I stopped working on these scripts since then.
And as stated before, these scripts were for my personal use, and were not meant for general public release.
And I'm not very familiar with the coding style and langage, so you all have to excuse my poor and "draft" coding style

That being said !

It would be a pity to let go the unfold() function. I'll upload a light version the latest version of this function this afternoon.

Andrew, if you want to rewrite "just" the basics for this function with your coding style, it would be very appreciated.
The "academic" stuff can be found here : https://en.wikipedia.org/wiki/Ruled_sur ... e_surfaces
Image
Basically :
-1- Find the two parametrics equations for the red and green shapes, whatever they are (polygons, circle, ellipse, oblong, spline...)
-2- Fill 2 arrays (one for each eq.) with values of these equations in the range [0...step...2*pi+c]
- This step can be tweaked depending on the shape of each function (see example below)
- c is a parameter to allow some overlap, so once the shape is folded/rolled, the overlap is used for welding...
-3- Apply unfold() with these 2 arrays as args

(In this example below, generatrix need to "stick" on every corner of the rectangle shape for a quarter turn of the circle shape)
Untitled 10.png
Untitled 10.png (26.87 KiB) Viewed 7781 times

tukuyomi
Full Member
Posts: 50
Joined: Mon Aug 09, 2010 6:15 pm

Re: Ajout module cône

Post by tukuyomi » Wed Sep 14, 2022 4:56 pm

Unzip and put the _myScripts folder in qcad/scripts/

Here is the latest version I have. unfold() is in _myFunctions.js

I tried to comment what unfold() args do.

Near the top of unfold(), set "var debug = true" so the function howdos will be more... "graphical"

I left 4 scripts to play/experiment with. Don't forget to tick "Projections" in dialogs when they show up
Attachments
_myScripts.zip
(228.52 KiB) Downloaded 251 times

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

Re: Ajout module cône

Post by CVH » Wed Sep 14, 2022 5:18 pm

In 2023 I may have more time to spare...
... I am working on a major project for the relocation of all crossbow guilds from Antwerp, Belgium.

In between, I'll take a look at the dialog widgets so that each section keeps its options for itself.
And that translations can take place.
That would be one at a time as far as I can devote some time to it.
I'll PM them to you for approval. You may want to turn the PM notifications active.

If we continue in English, I think it is best to start a topic under:
QCAD Programming, Script Programming and Contributing.

Cheers,
CVH

Post Reply

Return to “QCAD Professional”