Thursday, March 31, 2011

SketchSolve Infrastructure Implemented

SketchSolve is a great project and offers inherited capabilities for 2D shapes yet a translation in between NaroCAD logic and SketchSolve data are needed. So I've ported an unit-test (yet the easiest one) to make possible to work with those two components (NaroCAD's document structure and SketchSolve data).

In fact this code works with minimal code to include all existing SketchSolve in NaroCAD.
This code is also an internal working feature and we are team are thinking the way things will work integrated eventually at UI level.

This milestone is important as matches the most of refactors of NaroCAD were just in idea of separating the internal logic between sketch shapes to permit SketchSolve to operate.

Wednesday, March 30, 2011

Close behavior on application button double click

A few fixes to the NaroCAD window were made: a few pixels were lost from the Quickaccess toolbar buttons when NaroCAD was in full-screen mode; The same fix was applied to the application button in full-screen mode.
I also implemented a close behavior when double clicking the application button.

Tuesday, March 29, 2011

Extrude Look&Feel

Extrude tool right now works concomitantly so you can select more face to extrude them. Also, auto-facing appears automatically (as semi-transparent faces.
If you did click on an extrude and was a wrong choice, you will click once again and it will be removed from actual list of extrudes.
Bugs are mostly in flickering area and sometimes auto-facing will not catch all faces. Probably when code will be ported to OpenCascade 6.5 a lot of fixes will appear in this area.
Hopefully this new extrude will save clicks, will be more precise (as you can use both the slider and the values using expressions if needed). so enjoy using it! (after last of bug fixing will make it better)

Monday, March 28, 2011

Sketch concept

Finalized implementing a Sketch concept like the ones used in other CAD applications. Each 2D shape will hold a reference to a sketch, a sketch holds as info a plane, the 2D shapes tools will not work without having a sketch active.
The sketch will be useful also when integrating the solver, as the solver uses 2D coordinates to find solutions. We'll use the sketch plane to calculate the 2D points from the 3D ones.

Modified the circle tool to work on sketch. It started to work. Some final polishing needed.

Extrude revamping (part II)

Extrude is improved by having a live drag handler and a dialog that you can put precise values to it.
There are remaining bugs there but they are going down (mostly in auto-face area)and finishing the dialog that sets extrude.
The code is a bit harder to work with cause can be as many extrudes at once and previously were bugs in how references are stored. Hopefully in short time the extrude will be previewed as a video to express it how it works.

Sunday, March 20, 2011

Extrude Revamping (Part I)

Extrude tool is good but not that good. Some limitations are easy to spot and as we work extensively to improve the internal abstractions, one of them is how extrude tool will work.
Some of the changes will be:
- you can extrude more faces at once that are generated just in the moment you select extrude
- there will be a non-intrusive mini-dialog specific for extrude

Work is still ongoing, but I just wanted to post this as things start getting shape.

Friday, March 18, 2011

Updater - Part VII

The updater is now mostly done. I added a few notification windows: if newer version are available and the appropriate update check boxes are checked, NaroCAD will show a window with the new features of the newer version and will give you the opportunity to update now, next time or never; the never option is not implemented yet, but it will only uncheck the update check boxes from options; After the main downloads are done, a small window will appear in the lower right side of your screen, telling you that the main downloads are completed; this window will automatically close in 5 seconds, and will not freeze NaroCAD, or do other nasty things. The last window that will bother you, will appear at the next NaroCAD restart, after the update has been successfully completed; as the last one, it will appear in the lower right side of the screen, and will close automatically
With this, the Updater is almost completed. The only things that need to be done are to implement the options from the first message box and to test it for any possible bugs.
The updater from the last release has a bigger problem than expected. If you want it to do nightly updates, you have to check both updater check boxes, and delete the "auxiliary' directory from NaroCAD. This problem only appears for nightly updates, but even so, it's not quite what I had expected.

Tuesday, March 15, 2011

Line Internal Changes (Part III)

Circle and Line was migrated to reference based points. This obviously make that tools that depend on it, to crash if they will not use the same constructs (like circle will use direct point instead a reference to an existing point).
The places where this code which fails were around (and now are fixed):
- face picker feedback (a circle that shows the plan you're in)
- some actions will have a skeleton to be fixed that they are dependent (here is about the Arc actions)
- another action (Extrude) have a skeleton that will be developed in future to be smarter, right now the skeleton code is here, but more will follow in another blog post

Sunday, March 13, 2011

Solver algorithm started working

Debugged and fixed the Sketchsolve algorithm ported to C# by my colleague. Made unit tests for basic use cases. For point to point, horizontal and vertical constraints it seems to find correct solutions.
Next steps would be to add also parallelism and perpendicular constraints (to cover cases like a rectangle made from lines with constraints) then start integrating into Naro the solver.

Saturday, March 12, 2011

Line Internal Changes (Part II)

The line was internally simplified and more cases of the code were replaced. Line in poly mode and Line angle does not work yet, but soon will be. Practically almost all lines were replaced with those changes. Still crashes are waiting over the corner, but I will continue diligently to fix those cases and to break others (mostly circle based shapes will also be moved in the same framework) and fix them back.

Wednesday, March 9, 2011

Line Internal Changes

Line is changed to be expressed as reference to a shared net of points. AutoGroup/AutoFace is also disabled by default.
This will make really easy from internal logic point of view things like smarter common point dragging will make all shapes related to move, without any "constraint" logic and so on.
Also the code is made fairly simple by making that mostly the changes to go from:
builder[1].Point3D = Points[0];
var documentPointLinker = new DocumentPointLinker(_previewDocument);
var firstPointBuilder = documentPointLinker.GetPoint(Points[0]).Node;
builder[1].Reference = firstPointBuilder;

This will make automatically all "magic" to reference external points.
The external code that uses internal line structure, change minimalistic too, like from: axis.SetLocation(Dependency[3].TransformedPoint3D.GpPnt);

As user, you will see somelike this:

Why 1.6.x?

We know many +1 versions and version names are mostly esoteric for all purposes. For example Linux Kernel is "forever" 2.6 (from 2004, and the previous releases are +0.2 every two years, so in 1998 you will probably get installed in your distro a 2.0 kernel, in 2000 a 2.2, in 2002 a 2.4, etc.) and not changed for a long time and 1.6.0 brings little changes compared to 1.5.7 version.
NaroCAD tries to keep the cadence of a new release at every 3 weeks (and we focus to do development for first three weeks) and we mostly consider a line of releases and at every new release we will add a 0.0.1 to its number.
Anyway, as people we judge version numbers. Windows 7 even is like a new Explorer and a Windows Vista SP2 kernel, we consider Windows 7 as being "vastly superior" to Vista bad reputation.
So we did jump to 1.6 line as we considered that if you did not like the 1.5.0, it worth the upgrade. Doing a bit of cherry picking, you will find that 1.6 will have back the updater, will have a smoother experience all over the place, a faster hinter (both UI wise and how is computed internally), you have gizmos. So if you refrained to use NaroCAD as it was missing this or that feature, was an invitation just to check if it does really gets better.
So in short what should be to learn: we do development incrementally, we try to make all builds stable (yet some specific tools lack on it, we love crash reports, and if we can reproduce we work hard to fix those tools, or rewrite them to be easier to use and to make more sense). Also we do at every around 3 weeks a new release, if you will like to know if you are ready to upgrade, try this blog to get the announcement and to see if new features make you love those tools and if they do, you're more than welcome to update.
At the end, we want to increase the version number to you to know that it worth the upgrade, if you had a 1.5.0 like release, and was something you dislike (who knows, maybe 1.6 it will be the case for you) and as you may see that this development of 1.6.1 will not fully fill your needs (we cannot rewrite all NaroCAD in 3 weeks), you can certainly try 1.7.x and you will likely be more than impressed. We also have an updater that makes it easier to you to be up-to-date so you're encouraged to test releases, and every crash will make for us possible to test and fix your problems.

Tuesday, March 8, 2011

Updater - Part VI

The updater is now working correctly. I also made some improvements:
- duplicate code was removed. At the beginning, the version files were added manually in our projects. After the changes, the version files are red from the full.iss files.
- another improvement is a project that automatically generates all the version data ( the version XML file and all compressed files)
The only thing that's missing is a window that tells the user if newer versions are available and the new tools. At the moment, the updater will automatically search for new versions if the appropriate check boxes are checked from the options menu.

NaroCAD 1.6.0 Released

NaroCAD team worked to improve in many areas and really notable features are:
- Updater: is much better than previous iterations: it have better consistency checks. You will use much less bandwidth, because it will download just necessary files, even for us, the versioning is made in a much smoother way. We will continue to make the updating experience as smooth as possible.
- Spline interpolated, Control point spline: they will work more precise and smooth than ever: you will see live how they are made, you are able to use command line to set precise coordinates, you can combine and split them with an intuitive way to do it: click on the points that are automatically computed to show to you where you can split those lines, and those splines will be cut accordingly
- Gizmo points are hinter aligned: gizmo will work more precise as hinter will automatically align with various geometry you will have around
- Edge intersection for horizontal, vertical lines: horizontal and vertical lines did not compute previously the intersection points, and right now they do and they do it in a correct way
- Fixed fillet/chamfer 2D: and you can use them in your designs. Another
- Angle between lines: if you have various lines in your scene and you want a precise drawing
- Hinter toolbar: user can enable with just one click point alignment, line continuation and so on. It is much faster and enjoyable to work!
- Redo tool: pressing Tilde key and if you have selected any tool, NaroCAD will switch automatically to the same shape/tool creation context.
- Customizable per action toolbar: so future actions (today Spline and Angle Between Lines are using it) may have specific customization without having a floating (sometimes modal) dialog box making it less intrusive and let you focus on design.

Interested? Download it from here.

Monday, March 7, 2011

Layer 2D Manager Bugs

Layers mouse-following text was appear to be broken in some cases.
I found that causes were mostly for two reasons: was a bug in the way this code was used (by mistake, every time an action was started, was creating a new layer manager), the way it was updated (hinter component of our code may call update view just before adding layer, so nothing visible) and also I think an OCC related bug (that layers seems to not update if no scene (OCC context) changes are made).
So the whole code was moved up and down (in the idea that View component will include the OCC layer manager) so will not make possible cases like previous told. Also those layer structures are cleaned up every time you switch an action (making this code less prone to memory leaks) and will be less prone for API misuse. This refactor make it possible to discover that spline tools show mouse coordinate juxtaposed with hinter text, and this was also fixed.

Friday, March 4, 2011

Re(do) Shapes Pressing Tilde

Pressing Tilde will switch to the tool that will create the same shape.

See a small demo here:

Bug Fixing Again

All splines (regular, interpolated, control point and regular "old" one) have accessible and exposed the dragging control points. They are more useful than normal ones.
I've updated the code of Line angle to compute the regular one and give an exception, so you always lose the angle if you will do a Line Set angle, but hopefully I'll find why (or who knows, bxtrx ;) ).

Thursday, March 3, 2011

Updater - Part V

I changed the versioning file from txt to xml. The advantage is that I have more control over the code because I serialize and deserialize with the help of a special class. This way, it’s enough to deserialize the versioning data once, in order to obtain and easily use all information stored in it. Of course, the older versions with the versioning file as txt won’t work with this one. Even more, the updater code is not completed yet. It is possible that some nightly builds had old updater code. If you have problems starting NaroCAD in the last period, it might be due to unfinished code. If you have such problems, it is best to reinstall NaroCAD. Also be aware that nightly builds might not always work correctly due to unfinished tools.

Wednesday, March 2, 2011

Bug Fixing

I work on bug fixing and I will work on spline area to do more fixes to be more complete as coding goes. I've also worked a little reviewing Sami's code on updater.
Editing works different for Spline new code as editing tools work by scanning automatically the internal structure of shapes dependency.