We are now solving bugs and issues. After helping Kamalpreet in correcting the bounding rect() of ellipse entity, I have fixed the issue of line weight.
Earlier the width/weight of the entities drawn on scene changed as we zoom in/out of the scene.
Now it remains consistent, which is a pretty useful to get an overview of the drawings in CAD.
I’ve also implemented ‘Delete Entity’ feature which lets the user click on the entity to delete it.
At last we have successfully implemented live preview of the entities in eCAD. Kamalpreet and I have looked in this issue on and off since we started this project.
And today we did it. We tried to administer several different logic potions to our patient to get a live preview of an entity. We have searched a lot, asked as well on forums but never got the solution we wanted.
And that solution was gawking right at our faces and we never took notice. Sometimes things are way more simple than we reckon they are.
Now our eCAD looks more lively. 🙂
Today Kamalpreet and I solved another older issue we had in eCAD regarding selection of entities.
Earlier if there were multiple entities overlapping each other, user can’t select the entity beneath the other one because the bounding rectangle was obscuring the other.
And now by overloading the shape function we have been to adjust the bounding rectangle of the entity and now only the boundary of the entities are selectable.
This has been implemented for circle and line entities. Arc and ellipse will also be done in a day or so, just need to figure out a way to adjust their shape as well.
Today we have been successful in solving the oldest bug of eCAD. This bug was about the MDI implementation. If multiple documents have been created in eCAD, you can only work on the latest one. All the previous documents were unresponsive.
So we used a signal that is emitted whenever MDI subWindow is changed or created.
And we connected this slot to a function that then updates the pointer of the graphicsview to the corresponding subWindow.
This solves the issue and every document can be accessed now.
Now we can solve other issues related to this as well like respective menu items and shortcut keys.
Today I corrected the implementation of the titles of the documents created or loaded.
When the new document is created the file get the name of “Document i” where i could be 1,2,3…. and so on.
And when a file is opened, its saved name is displayed as the title.
I’ve also corrected the Cancel button bug, i.e even if the user clicks cancel on any file dialog the rest of the function was still getting executed. So implemented an exception to that.
While writing this post I’ve got another idea to further improve the issue I solved today. Going to work on that as well.
We are fixing things as we go along. The new issues that are found or the existing ones, all of them must be solved before the release.
I’ve fixed an issue of unresponsive status bar when a new document is created.
And also implemented the tooltip for the cursor to help the user know the coordinates more easily instead of looking at the bottom to see the status bar. This improves the user’s workflow.
Now looking into other issues.
We have corrected the issue of incorrect IDs of the pasted entities after cut or copy. This was solved by dynamically casting the entities to get the id of the intended entity and then pass this to the clone entity.
There are many other issues still left to solve before going for the first release.
Also been working on adding theme functionality to the user for eCAD. Hacked a little on CSS for that.
I have added the remaining two funcitons for scripting as well which enables the drawing of Arc and Text entities.
For now arc entity can be created by passing three points through which an arc will pass.
E.g. cad.arc(120,130,233,321,456,546); // arc entity passing through three points
And the text entity can be drawn as:
cad.text(420,520,”hello”); // text entity at position(420,520) with text ‘hello’
If you want to write a multiline comment then you can pass the third parameter as “helloneveryone”. This will draw text entity as:
Now I’m going to improve the looks of the eCAD. I’ve started working on the Qt Stylesheet which will decide the overall looks of the software.
I’ve added entity functions to enable scripting for the user.
For example, if a user wants to draw a point in the scene, he/she can write:
and a point entity will be created at (200,300) position in the scene.
Similarly other entities can be drawn using following commands:
cad.line(112,60,630,478); // line with start_point(112,60) and end_point(630,478)
cad.circle(505,444,60); // circle with center at point(505,444) with radius = 60
cad.ellipse(432,88,65,90); // ellipse with center at point(432,88) with minor_radius = 65 and major_radius = 90
Arc and text entities are yet to be implemented which will be done next.
I’ve implemented ‘Delete Selected’ feature in the eCAD this as the name suggests delete all the selected entities.
Also send commit that corrects the coding standards of the whole project which we have missed previously. And we have all agreed on following the coding standards as defined on the wiki page of eCAD github repository.
I also helped Kamalpreet in implementing selection features that she is doing.
Now currently I’m doing ‘Delete’ feature which enables the user to select entities one-by-one and delete them once user hits ‘Enter’ key.