Friday, 21 December 2012

Released NaroCAD 1.7.3 Beta

Today we released NaroCAD 1.7.3 Beta:
- Fixed Boo script commands for main 2D and 3D shapes and tools
- Improved the Point to Edge and Point to Point constraints
- Updated Boo script help and sample files
- Property grid displayed values are automatically updated after shape resize
- Fixed Document Tree selection bug


You can download NaroCAD 1.7.3 here.

Improved point to edge constraint

Today's release includes the improvements I've made to the Point to Edge and Point to Point constraints, the main one being the ability to change the length set for the constraint from the property grid. There are still some improvements that need to be done, and they'll be included in the next release, which is planned for January 2013.



You can find the code changes here

Tuesday, 18 December 2012

Length and radius lock fixes

Today I commited the last batch of fixes for Boo scripts for this release - you can find the changes here.

I've fixed two bugs that were affecting the lock feature for line length and circle radius, and improved the property grid for mouse drag. After this change, if a line is resized, the length property is automatically updated, without needing to re-select the shape.

I've also started improving the Point to point and Point to Edge constraints, so that we can update the distance and control shape positioning this way. I've updated the Point to Edge property tab and the dimension display:


The next step is to allow the user to update the distance and update the shapes' positions through the Solver.

Thursday, 13 December 2012

Cut and Extrude for boo scripts

Almost all commands for boo scripts are updated, the most important ones being Extrude and Cut:


I've also updated the demo scripts and the help files for all the updated shapes. The first set of changes is here.

Tuesday, 11 December 2012

Fixes for the Boo scripts

Today I've worked on improving the Boo script functionality, mainly updating the methods to use the new structure (Reference instead of Point3D), adding sketch-related functionality and allowing methods to use references to previously created points instead of having to use their coordinates.

For example, the following Boo script:

s1=Sketch(5,0,0,1,2,0,0,0,0)
EnterSketch(s1)
p1=Point(s1,2,5,0)
Circle(p1,20)

s2=Sketch(5,0,0,0,5,0,0,0,5)
EnterSketch(s2)
p2=Point(s2,2,5,3)
Circle(p2,20)

EnterSketch(s1)
p3=Point(s1,10,10,0)
Circle(p3,5)

creates:


With the current version of the code it's possible to create and edit sketches and draw 2D shapes in them. Tomorrow I will complete the changes for the 2D shapes, update the help section for them and start working on the 3D commands.

Monday, 10 December 2012

Creating a sketch from the command line

Today I added a new functionality which allows us to create a sketch from the command line. after pressing 'Enter Sketch', we can type three coordinates in the command line and a new sketch with the plane defined by the three points will be created and set as the currently active sketch:



The first sketch was created parallel to the yOz plane, 5 units from the origin, and the other one at an angle to all axes, using the points (10,0,0), (0,10,0) and (0,0,10).

You can find the code changes here

Friday, 7 December 2012

Released NaroCAD 1.7.2 Beta

Today we release NaroCAD 1.7.2 Beta:
- Extrude and pipe can be performed on shapes with holes
- Extrude, pipe and cut are performed on the entire sketch containing the selected shape
- Cut can be performed on the shapes obtained from boolean operations
- Improved the Translate gizmo for 3D solids
- Fixed translate for solids obtained from extrude/cut
- Fixed point position display on default plane
- Fixed Save/Open for solids obtained from Extrude, Pipe and Cut operations
- 3D shapes are automatically notified when the underlying sketch changes and are redrawn
- Sketch shapes are displayed on enter/edit sketch and hidden on exit sketch
- Improved sketch selection algorithm
- Fixed crash caused by multiple open commands

You can download NaroCAD 1.7.2 here.

For the next release, we will:
- Add posibility to create sketch from command line
- Fix boo scripts functionality
- Fix undo/redo for translated shapes
- Fix translate for pipe
- Fix hinter line display bug

Wednesday, 5 December 2012

Fix for save/open with cut solids

I've fixed one of the two major issue we still have cut solids affected by cut, which is the save/open functionality. The problem was caused by the way the extruded solid was opened and the fact that the base shape's type was wrongly set to TopAbs_COMPOUND or TopAbs_SHELL instead of TopAbs_FACE. You can find the code change here.



Today I started working on the other major issue, which is undo/redo: undo and redo work correctly for Cut and for Translate, but don't work for a translate applied after a Cut.

Tuesday, 4 December 2012

Cutting on a sketch with multiple extrusions, using a sketch with multiple shapes

Today I fixed two bugs which didn't allow us to cut on a sketch with multiple extrusions, using a sketch with multiple different shapes. The first issue was caused by the way the sketch faces were composed to obtain a single shape. until now, we fused the shapes together, but cut failed on this shape. I've replaced the fuse with sewing and now cut works for all types of base sketch extrusions.

The second issue was caused by the different orientation of shapes. When cutting with a circle in an extruded circle, or a rectangle in an extruded rectangle, the cutting prism had the correct orientation and the cut to depth was performed correctly. When trying to cut in an extruded circle with a rectangle, the orientation was wrong and the extruded solid wasn't affected. I've added a check before the extrude and the prism vector is reversed if the direction is wrong.

Monday, 3 December 2012

Delete shape from sketch used for cut fix

Today I fixed several bugs related to sketch selection, mouse coordinates being wrongly calculated after editing an existing sketch in the default plane and deleting shapes from the sketch used as base for cut.

Here is a demo, where I delete a circle and a line from a polygon. Both holes disappear after exiting the sketch editing, but the remaining lines and circle center are visible when entering the sketch again and the entire solid can be translated: