Source File of Circle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Source File of Circle

Jasleen
I want to know the Logic of making circle in LibreCAD. I had download and install its source from github. Where is source file of circles( various ways) locate?
Reply | Threaded
Open this post in threaded view
|

Re: Source File of Circle

dxli
you can find most methods in class,

RS_Circle
RS_Creation

Actually instances of circle creation should be in RS_ActionDrawCircle* classes (in folder librecad/src/actions/ )

Please keep adding your new knowledge of LibreCAD to our wiki.
Reply | Threaded
Open this post in threaded view
|

Re: Source File of Circle

Jasleen
Got it. Thanks.
Ok. I Will share my work and Knowledge.

zac
Reply | Threaded
Open this post in threaded view
|

Re: Source File of Circle

zac
In reply to this post by dxli
I want the file where radius of circle is taken from  GUI andvalue is stored in a variable.
Please help.
Reply | Threaded
Open this post in threaded view
|

Re: Source File of Circle

dxli
Hi zac,

The GUI widgets are kept in librecad/src/ui/forms/

for example: qg_circleoptions.ui

Those widgets are shown/hidden by rs_actions ( in folder, librecad/src/actions/ ), for example:

rs_actiondrawcirclecr

the class, RS_ActionDrawCircleCR has virtual functions: hideOptions() showOptions()

the widgets simply set radius by calling:  

ActionDrawCircleCR::setRadius(double r) {
                data.radius = r;
        }

zac wrote
I want the file where radius of circle is taken from  GUI andvalue is stored in a variable.
Please help.
Reply | Threaded
Open this post in threaded view
|

Re: Source File of Circle

dxli
One more thing, please be aware of that both 2.0 and 1.0 won't accept new feature any more.

You can help bug fixing in 2.0 and 1.0, while prepare to contribute new features to coming 2.1 (still not branched yet).

something of high priority for 2.1: to support both bezier and spline, implementation of hyperbola/parabola