Saturday, July 31, 2010
WPF Controls and Solver Caching
This nightly build will use *EXPERIMENTAL* caching scheme for TreeView and sections on property grid. This should improve greatly cases with multiple created shapes and you edit/add one shape. In older builds you may encounter UI freezing. The freezes may be still there, but they will be felt at much larger shape count.
The WPF Color picker was changed in Property grid to be one more complete. This will also improve the display speed of the property grid, as is separated from the property grid itself.
This caching scheme can be reset (at the code level) and sometimes it does need so, but it need extra testing to detect those cases when cache gets out of sync.
The Property grid also cache the Transformations and Shape controls (color, name and transparency) which also get some speedup.
The solver component will be able to cache geometry. This code is done in the idea that every time a shape is not changed, the solver information is not computed. Also caching will work for now just for extrude, because we don't want if the caching code is broken to make all NaroCAD to be broken. This will have some overhead (much smaller anyway) at propagation step, when caching will happen in cascade.
Based on profiling sessions, with those changes you may expect a realistic 2x speedup in those cases that you had a bigger scene and you edit or add just one shape.
Tuesday, July 27, 2010
NaroCAD 1.5.0 Released
The target of this release version was to enhance NaroCAD's usability.
The main feature added in 1.5.0 is the floating toolbar that allows users to easily access most important tools that can be applied to current selected shape without making long mouse moves. Another improvement is that we started adding mouse cursors for tools to make the user know the active tool at any moment.
Modified and rebuilt the OpenCascade wrappers that NaroCAD uses. Used this opportunity to add finalizer code at around 20 wrapper packages, with this enhancement reduced memory leaking made by wrappers.
The Options dialog is reorganized and has a better look. Improved the GUI and added in Options the possibility to change default background and object drawing colors. Also antialiasing can be turned on or off.
Made property grid fixes and enhancements.
The 1.5.0 NaroCAD version can be downloaded from here.
Next iterations we'll stabilize the 1.5.0 version and further improve usability by adding shape handling gizmos.
Lua generated shape on which applied cuts and extrudes:
Floating toolbar and Option dialog screenshots:
Sunday, July 25, 2010
Graphics Improvement
So hopefully you will enjoy those new changes and you can use them right away from the nightly build.
Saturday, July 24, 2010
Improved Options Dialog
Friday, July 23, 2010
Getting Toolbar Close to Finish
Right now the toolbar will extrude the face your clicked on (or you can cut it).
Also a small improvement is that the Options dialog looks refreshed, this is done via a better graphics and better usability: instead adding an Undo/Redo button pair, there is a Defaults button, which for a specific page will setup the NaroCAD's defaults. This will make NaroCAD to have a stable profile in case that you feel that your setup is broken, is a good way to fix it.
The front icons were almost finished too, so you may enjoy a better out of the box look (at least for the default modeling tab).
Thursday, July 22, 2010
Improvements In Infrastructure and Code Quality
As wrappers did got just better, the code quality was also improved. Also we go to trigger down bug by bug in the floating toolbar code. Today the fixes appear if you draw your custom sketch shape and you just don't click on a face. This code makes Naro to crash but is fixed now.
If you know what Resharper is, we constantly use it to improve code quality and this mostly mean that you will get at least better formated code and that it is consistent over all codebase. In fact we got to under 1/6th issues from the original code, that was around 3 months ago. So if you will want a good to start codebase, you may give to NaroCAD a try, may worth it.
I will try to finish to add dimension tool to supported shapes and to improve the editing tools infrastructure to make easier to be added extra tools to model your shape from mouse.
Improved wrappers
Used this opportunity to add finalizers at around 20 packages most used in Naro. Now the memory leaks are greatly reduced.
Developers that are using the new wrappers to avoid crashes must configure their OCC to protect against multithreading memory alloc/dealloc crashes (MMGT_OPT=1, MMGT_REENTRANT=1). The problem we encountered was that the .Net GC kicks in as another thread so Naro and GC threads are using the same OCC memory management mechanism. This issue was solved by making MMGT_REENTRANT=1.
Improved also the wrappers generation template to include finalizers.
Wednesday, July 21, 2010
Sketch Skeleton Code Done
So if you will click on a shape that is one face (like rectangle, circle, ellipse, or a generated face), the floating toolbar will show sketch shapes, and those shapes will be locked to the plane your face is pointing. This need more changes, and I've tried to make them to not be invasive. The single change that is needed in a meta-action to be "plane-locked" is to write Dependency.LockPlaneIfRequested = true; and to be added in the sketch tools.
For locking a plane, you have to write something like Inputs[InputNames.RestrictedPlane].Notify(NotificationNames.SetPlane,
_sceneSelectedEntity);
Those changes are visible in the nightly build.
Tuesday, July 20, 2010
Floating Toolbar
Monday, July 19, 2010
Short video about how to run lua scripts
This video shows you how to execute lua scripts. To save some time, I've opened some already created file and executed the script. You can find some sample scripts if you install one of our releases.(they can be found under the "Samples" folder)
How to create a simple shape with NaroCAD
This is a tutorial which teach you how to draw a simple shape in NaroCAD using both tool bar tools and command line.
Saturday, July 17, 2010
Floating Toolbar Preview
Thursday, July 15, 2010
Refactorings and Code Separation
You may find another way to show the growing of a product, the organic way. This organic way of developing a software is to grow horizontally, then vertically, then horizontally, and so on, to be balanced way. As the releases of 1.4.x was mostly an horizontal development (it mostly improve the look&feel and fixes more conceptual design flaws as transformations), this release will try to be more "advanced" in the way user will interact with shapes.
Today I've moved projects of NaroCAD around, to make them more logical and to make separation better. The reason is that the feature I try to work on, a floating contextual logical toolbar, I want to add (almost) everything in it. It may be just simple as copy/paste, but as complex as to put property grid in it. But the property grid code was self-contained, so I've did not have access to the PG's code. Also PG have some features that have no sense in the floating toolbar context (like filtering fields you want to skip from visualization) or to add more information that may not be necessary: mainly the color or transformation code that will make the control too busy.
Probably if in future iteration the layer support will be added, I want to make sure that the control will be capable to embed it. So I've made this toolbar to be WPF-based and I've added support to add for now Ribbon group buttons, but not only.
So wait very soon to get a fairly powerful and most important, an useful live toolbar that will enable when you click click on a shape or anything on a scene. This nightly it does position only an empty ribbon button group, but very soon you will see more and more complete.
Wednesday, July 14, 2010
Changing Mouse Cursors and a Sneak Peak
Another nice contribution is the icons part. They make more sense (for now they are defined only on the sketch point of view) and are more distinctive. So thanks again for the contributor of them. Those two photos compare the sketching icons side by side.
On my side I start studying ways to make a floating toolbar that makes sense. This will work somehow like the "Contextual" tab, but will be live and much smarter. Based on the shape you clicked on, you can do selection, you will be able to change some properties on the fly, and so on. Also I try to make it not only useful, but to be usable, trying to be always close to the last mouse click. As for code I am in between two solutions, I'm very tempted to use a Windows.Forms solution, but this is nice on short term, but it will be really tricky on a long term, as there will be a lot of code duplication. A WPF solution may be probably too complex for just a floating toolbar, but will make easier to add many things to that toolbar. Also the automatic layout of WPF is a nice choice, so may be a good choice at the end.
Monday, July 12, 2010
Added Possibility to Change Mouse Cursor
Also today I've review the editing code in the idea that it will be soon extended (to target the 1.5 release) but I've did not start as coding because there are more design issues to be taken.
In the mean time I've added an input to change the mouse cursor (for some actions). For now works from external files and is enabled just for circle in the nightly build. More tools will be updated in the next days.
NaroCAD 1.4.7 Released
As a short list of what was added in this release are:
- Improved command line auto complete, fixed command line bugs, to make to type less keys to write long commands
- Added tips window to show to you some things things that you may not know from NaroCAD
- Ported Options dialog to WPF and fixed bugs related to it, meaning a consistent theme and look and feel to NaroCAD whole application
- Improved solver on helper lines, so they are not selectable but they still work as guidelines
- Added plugin support, to extend your command line, lua commands or new user interface, options or new tools from external assembly
- Improve WPF property grid internals to show which fields are constrained, but can be used to
- Fixed mirror and pattern tools as they were affected by the new transformation code (that is more powerful but behaves differently)
- Fixed selection from tree
- Other fixes (like importing from Step and Brep files works again)
- If you set NaroCAD (NaroStarter.exe) to open naroxml files it will likely work (there may be some environment options that may make it fail to your machine, but if likely you open a file from NaroCAD folder, it should work).
Sunday, July 11, 2010
Some Extra Touches (Part II)
Bogdan Mustiata contributed some icons to NaroCAD. Also you may setup as NaroStarter to open your naroxml files. All tools so far that can be constrained, they will show to you the "lock" that will make it things better to identify "why" the value cannot be changed.
Import/Export to step are working again. They were not working for some time but they seem to right now as the extension of the files were not setup in the right way.
Also the quick start dialog is removed.
Friday, July 9, 2010
Some Extra Touches
WPF Options was ported to the smallest details like adding Undo/Redo buttons.
So in this remaining days (will be two days) some small touches may be achieved inside NaroCAD.
One of them is the following: The constrained values in Property Grid will appear with a lock. The nightly build have only line's length checked. But all others will be ported. This change was fairly big in internals as the shape order exposure was not thought in this way. Also, this small redesign permits that one specific shape to have custom property grid items. Supposedly it can be considered that a line will have some extra arguments, that are created with a different property grid items than the default one.
What will mean to you? That it will likely be the most user-friendly release so far. But for now just stay still and try to constraint more shapes in the following release and try to see if you get the lock on the corresponding fields.
Usability improvements
Among the fixes that the team made there are:
- relative coordinates form command line are useful at drawing. Fixed the negative coordinates problems,
- fixed selection of shapes from tree,
- fixed options dialog and ported to WPF,
- fixed mirror and pattern tools transformation bugs.
Planning to add helper line into the solver so that helper lines can be used as drawing guides, enable solver to generate parallel with axis magic points, fix spline, distance to edge constraint tool.
Thursday, July 8, 2010
Tips Window
Wednesday, July 7, 2010
Making Smart Completion Smarter...
Also the Options dialogs were ported to WPF and they likely seem to work. This will reduce the Windows Forms code in NaroCAD to just custom dialogs that are still present in some tools (some that are really hard to port, like rendering's preview one) and will likely make the experience more consistent. Also the code is defined in MVC paradigm, so you may be able to change at least in some instances the interface without changing a line of code from the options code.
Monday, July 5, 2010
Updater Threading Issues and Smart Command Line Completion
So as I've did not found a proper solution as the component framework (SCSF) does not provide an easy access to the main loop, to make a Producer/Consumer pattern, I found a simpler solution: I simply do not access the UI and launch the installer directly. May not be that elegant, but seems a proper solution. So if you picked to activate your updates (please take the nightly build as this is the first version that has a fix for this issue), you must close NaroCAD manually after the installer was started. If you have better knowledge or at least a way to avoid threading exceptions, please point it out, I'm eager to find a way to.
Another part is that as a milestone WPF Options do not crash as dialog, also I've fixed most issues from solver part, and when you switch the views. In this way you can work with the new options dialogs. Some features are not yet ported, mostly to apply Undo/Redo on options (it works great if you make try and error values) but I hope that very soon will be fixed.
Eventually, and the most interesting update is the Command Line updated way to work.
Previously you did not know which are the commands and even you were able to guess them, sometimes you may fail to write a letter. Let's imagine that you wanted to write: rectangle to start the rectangle command. If you're not a fast typewriter, you will most likely want to setup shortcuts. Let's imagine that you want write: rectangle. When you write: R, four options will be shown to you: r[e]ctangle, r[e]ctangle_height_constraint, r[e]ctangle_width_constraint, r[i]ght. If you will press I, the "right" word will be shown. If you press "e", all words with rectangle will be shown, and already "rectangle" world will be filled in. So if you will want to write: rectangle_width_constraint, you will have to type 4 letters: re_w and the words will fill automatically. At the end, if you have more words, if you will press enter, the first one from the list will be chosen. So if you will want to draw a rectangle, just press r and enter. Because after you press r, the "rectangle" is the first word from the list.
Another good thing is that the pre-calculation is independent of the commands, so may work with as many and as long commands are available, the way it works is made just to reduce the keystrokes you have to press. If you remember the plugin code capabilities to NaroCAD, if you will register your meta-actions, they will automatically auto-complete. If your company will start with words like: xtension_and_a_long name1, xtension_and_a_long name2, etc., typing just x, will expand to xtension_and_a_long name, and all you have to write is 1, 2, and so on.
Friday, July 2, 2010
Relative coordinate values bugs
I work on WPF Options to continue porting them from Windows Forms dialog.