Hello everyone,
I am Priyanka Kapoor pursuing B.Tech IT from Guru Nanak Dev Engg. College, Ludhiana. I have been working on LibreCAD from past one year. I also try my hands changing the source code of LibreCAD to add new shapes like a flower of circles, synchronizing the text boxes of dimension dialog box. I explained the work on my blog also. I am keen interested in C++ and Qt. I have good knowledge of making / designing User interface in Qt. As for my project, I am interested in "SmartSnape" project. This project needs a logic that will convert the units entered by user to unit used in LibreCAD. I am writing my proposal and I will post by today evening. I heartily congratulate LibreCAD for being part of GSoC 2014. Looking forward for your guidance and support in project. Regards, Priyanka (Blog) |
Hi priyanka,
jasleen once reported "flower" entities, very interesting addons. As we are talking about creating a new LibreCAD engine now. I'm wondering whether your new architecture is designed with a new engine in mind. For snapping, make sure we have smart constraints which are missing in LibreCAD. For example, snap to perpendicular, etc. Please talk to us more on IRC for new ideas. Thanks, dxli
|
There is a confusion going on. Project Idea list was showing two projects with different names but same description.
I was proposing for Supporting Multiple Measuring units in LibreCAD. I thought you gave SmartSnape as short name to this project. So I wrote there SmartSnape. Supporting Multiple Measuring units will be sort of library file, which can be easily included in new engine. Am I on right track now? Please do respond/point out if I am wrong at some place regarding this project. |
Administrator
|
Hey Priyanka,
this morning I got notified that the description was changed so I changed it to the right description back again. I think you want to propose on the project : Support for multiple units upon data entry. let me know if that was right, Have you been on our IRC channel? #librecad@freenode.org Ries |
On Fri, Mar 21, 2014 at 12:20 AM, R. van Twisk [via LibreCAD]
<[hidden email]> wrote: > Hey Priyanka, > > this morning I got notified that the description was changed so I changed it > to the right description back again. > > I think you want to propose on the project : Support for multiple units upon > data entry. Yes I want to propose on this project. > let me know if that was right, > Have you been on our IRC channel? #[hidden email] Yes, with name priyanka. I used to ask questions on IRC one year back with this name. I will be there from now onwards. > Ries > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://forum.librecad.org/GSoC-2014-Introduction-tp5709705p5709709.html > To unsubscribe from GSoC 2014: Introduction, click here. > NAML -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
muparser actually supports units in input:
http://muparser.beltoforion.de/mup_features.html I feel you may consider expanding the muparser usage/features in LC. Are there any good alternative for muparser? Maybe not so relevant? can we enable python binding, either use python binding for math or command line interface. |
Administrator
|
Dli,
have you ever played with muparserx https://code.google.com/p/muparserx/ ?? On Mar 20, 2014, at 6:54 PM, dxli [via LibreCAD] <[hidden email]> wrote: muparser actually supports units in input: |
In reply to this post by dxli
On Fri, Mar 21, 2014 at 5:24 AM, dxli [via LibreCAD]
<[hidden email]> wrote: > muparser actually supports units in input: > > http://muparser.beltoforion.de/mup_features.html > > I feel you may consider expanding the muparser usage/features in LC. dxli, what if we pre-parse the expression before passing it to muparser? We just need a pre-parser, all the rest will go same as doing currently. >Are there any good alternative for muparser? > > Maybe not so relevant? can we enable python binding, either use python > binding for math or command line interface. I don't think that we need much of mathematical calculations for this project. muparser is more than enough. It supports strings, and we can do pre-parse the string easily before passing to muparser. We just need to design a grammer for user input and parsing it to unit used in LibreCAD. What are your views in this? -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
In reply to this post by dxli
Please review my proposal.
http://brlcad.org/wiki/User:Priyanka_kapoor -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
Jasleen never shared "flower" source code, do you mind sending a pull request to my github master branch:
github.com:dxli/LibreCAD.git Thanks! |
On Fri, Apr 4, 2014 at 4:42 PM, dxli [via LibreCAD]
<[hidden email]> wrote: > Jasleen never shared "flower" source code, do you mind sending a pull > request to my github master branch: > > github.com:dxli/LibreCAD.git dxli, I just tweaked the code of circle to make a flower pattern, and it is not a new feature, just a couple of lines. You can see that here: http://priyankacool10.wordpress.com/2013/03/31/changing-functionality-of-circle-in-librecad/ -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
In reply to this post by dxli
@dxli,
In continuation to yesterday's discussion on IRC, I implemented that flower with the icon on Toolbar. Here are the screenshots. http://www.picpaste.com/flo1-RRsqe7uQ.png http://www.picpaste.com/flo2-jq0II9Ma.png -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
modified a little bit
|
Sorry. I didn't get you. On Sun, Apr 6, 2014 at 10:14 PM, dxli [via LibreCAD] <[hidden email]> wrote: modified a little bit -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
In reply to this post by dxli
I have done with user input too. User enters the no. of petals to draw. But it draws one extra circle if user enters less than 6 and one less circle when user enters more than 6.You can see that flower icon in toolbar, flower option (petals) widget on top bar. In second screenshot, Flower option is in drop down list. I am happy that I am able to implement flower in separate files, along with user input and I understood all files linking associated with this pattern. But there is a problem. It works fine when user enters 6. RS_Circle* flower; flower = new RS_Circle(container, data); // circle in center flower->setLayerToActive(); flower->setPenToActive(); container->addEntity(flower); int i = petal; // ASK THE USER (integer) //double r = M_PI/(2.0*i); double radian = 0.0; while (i--) { //radian+=r; flower = new RS_Circle(*flower); flower->setLayerToActive(); flower->setPenToActive(); radian=( (i==6)?2:2*(5-i))*M_PI/6; flower->move(RS_Vector(radian)*data.radius); container->addEntity(flower); } [1] http://www.picpaste.com/patch-AVXWzu5u.png [2] http://www.picpaste.com/patch2-ju9d61M9.png |
petal calculation needs to be updated as well:
void RS_ActionDrawCircle::trigger() { RS_PreviewActionInterface::trigger(); deletePreview(); // RS_Circle* circle = new RS_Circle(container, data); QList<RS_AtomicEntity*> lists; RS_Circle* flower= new RS_Circle(container, data); // circle in center lists<<flower; // flower->setLayerToActive(); // flower->setPenToActive(); // container->addEntity(flower); static int petal=3; //remember previous # petals int i = petal; // ASK THE USER (integer) double offset=2.*data.radius*sin(M_PI/petal); while (i--) { flower = new RS_Circle(*flower); // x + 2 2 pi/t = pi/2 + pi/t , // first offset direction is Pi/2 + Pi/petal // x= pi/t( -4 + t/2 + 1), (2 + 2i) // (t/2 -3 + (t -i)*2) p/t if(i==petal-1) flower->move(RS_Vector(data.radius, 0.)); else flower->move(RS_Vector(((petal -i)*2 + 0.5*petal - 3.)*M_PI/petal)*offset); lists<<flower; } for(RS_AtomicEntity* c: lists){ c->setLayerToActive(); c->setPenToActive(); container->addEntity(c); } if (document!=NULL) { document->startUndoCycle(); for(RS_AtomicEntity* c: lists){ document->addUndoable(c); } document->endUndoCycle(); } // upd. undo list: graphicView->redraw(RS2::RedrawDrawing); graphicView->moveRelativeZero(data.center); setStatus(SetCenter); reset(); //increase # of petals for the subsequent session petal++; if(petal>=20) petal=3; // RS_DEBUG->print("RS_ActionDrawCircle::trigger(): circle added: %d", // circle->getId()); } |
dxli, its working great :) Your mathematics is fantastic. I can send you pull request now. |
In reply to this post by dxli
Here is the pull request:
https://github.com/dxli/LibreCAD/pull/10 On Mon, Apr 7, 2014 at 8:32 AM, Priyanka Kapoor <[hidden email]> wrote: > dxli, its working great :) Your mathematics is fantastic. > I can send you pull request now. -- Priyanka Kapoor priyankacool10.wordpress.com Linux User Group, Ludhiana |
Free forum by Nabble | Edit this page |