Today I commited the changes for the Mirror Point and Mirror Line action. The new version of the tools creates new copies of the selected nodes, with a mirror transformation. Here is an example with Mirror Point and Mirror Line applied to two ellipses:
I've also added the methods to create the new nodes in Boo scripts:
The changes are here
Wednesday, January 30, 2013
Tuesday, January 29, 2013
Copy/Paste update
The past two days I worked on updating the Copy/Paste code. Before the Sketch was used, the Copy/Paste method simply copied the selected node and pasted it, but now we need to create the entire sub-tree for the selected node.
For sketch shapes, we create new nodes for the selected shape and all its children, with all points referencing the sketch containing the copied node.
For 3D shapes, we need to copy all the sketches referenced by the 3D shapes and all their nodes, updating the points' sketch references accordingly. For example, for a Cut Through All applied on an extruded circle we need to copy the two sketches used for extrude and then cut:
For sketch shapes, we create new nodes for the selected shape and all its children, with all points referencing the sketch containing the copied node.
For 3D shapes, we need to copy all the sketches referenced by the 3D shapes and all their nodes, updating the points' sketch references accordingly. For example, for a Cut Through All applied on an extruded circle we need to copy the two sketches used for extrude and then cut:
Friday, January 25, 2013
Improvements for revolve
Today I improved the Revolve tool: if the selected shape is part of a sketch with a valid face, the entire sketch is revolved around the selected axis. Here is the new version of the tool applied to the result of an array pattern:
If there is no valid face, the selected wire is revolved, as before.
I've also updated the Boo script function for revolve:
If there is no valid face, the selected wire is revolved, as before.
I've also updated the Boo script function for revolve:
Copy/paste and Array Pattern update
The Copy/Paste functionality for sketch shapes was updated and instead of referencing the original shapes, it now creates copies of each node, allowing us to edit the new instance separately. Since the pattern tools use the Copy/Paste method internally, they also create new shapes, and I've updated the transformation code to ensure that the new shapes are positioned correctly:
Thursday, January 24, 2013
Fix for Copy/Paste on Sketch
Today I changed the Copy/Paste functionality for Sketch shapes and now new nodes are created for the child nodes and are referenced by the pasted node:
Tomorrow I will update the Array Pattern and Circular Pattern tools so that the new point coordinates are calculated correctly.
Tomorrow I will update the Array Pattern and Circular Pattern tools so that the new point coordinates are calculated correctly.
Wednesday, January 23, 2013
Test shapes and copy/paste
Today I tested some of the recently implemented features and created some more complex shapes by drawing and running Boo scripts:
Now I'm working on fixing the Copy/Paste code, which currently creates a new node which references the children of the source node, making the newly pasted shape identical to the original one and unusable. The pattern tools have a similar behaviour, creating only new wires which reference the same base Points. This restricts the changes that can be performed on the newly created nodes:
Now I'm working on fixing the Copy/Paste code, which currently creates a new node which references the children of the source node, making the newly pasted shape identical to the original one and unusable. The pattern tools have a similar behaviour, creating only new wires which reference the same base Points. This restricts the changes that can be performed on the newly created nodes:
Tuesday, January 22, 2013
Solids improvements
Today I tested the array pattern for the 5 types of solids that can be created in NaroCAD (sphere, torus, cylinder, box and cone) and fixed some problems with translate, undo and redo. Here is a short video with these:
Monday, January 21, 2013
Array pattern improvements
Today I started working on the Array pattern tool and fixed the bugs that caused shapes to disappear after the Array pattern was applied and added the ability to create array patterns in Boo scripts.
Here is an example where the Array pattern tool is applied for a cut solid:
and a screenshot of a shape in which the sketch obtained by using Array pattern is used to cut through an extruded rectangle (the Boo script is visible on the left side):
Here is an example where the Array pattern tool is applied for a cut solid:
and a screenshot of a shape in which the sketch obtained by using Array pattern is used to cut through an extruded rectangle (the Boo script is visible on the left side):
Friday, January 18, 2013
Released NaroCAD 1.7.4 Beta
Today we released NaroCAD 1.7.4 Beta:
- Improved the Solver parameter loading and processing speed
- Fixed undo/redo for translated solids
- Fixed translate for complex shapes
- Fixed Extrude mid plane
- Improved Cut through all and Cut to depth
- Improved TreeView selection highlight
You can download NaroCAD 1.7.4 here.
Here are some sample parts created using this version of NaroCAD (both drawing and using Boo scripts):
For the next release we will:
- Fix the Array pattern tool
- Fix the Circular pattern tool
- Fix the Translate Tool
- Improve the Copy/Paste functionality
- Improved the Solver parameter loading and processing speed
- Fixed undo/redo for translated solids
- Fixed translate for complex shapes
- Fixed Extrude mid plane
- Improved Cut through all and Cut to depth
- Improved TreeView selection highlight
You can download NaroCAD 1.7.4 here.
Here are some sample parts created using this version of NaroCAD (both drawing and using Boo scripts):
For the next release we will:
- Fix the Array pattern tool
- Fix the Circular pattern tool
- Fix the Translate Tool
- Improve the Copy/Paste functionality
Thursday, January 17, 2013
Translating after cut through more than one solid
Today I did some more testing and updated the translate method to improve translation of a cut solid resulted by performing cut through all for more than one solid:
Wednesday, January 16, 2013
Changes for undo/redo and translate
Today I finished the changes for undo/redo and fixed an issue that caused sketch faces to appear after a translate undo. The problem was caused by the MakeFace function, which in some cases created an incomplete Face node in the Document Tree. You can find the most recent code changes here.
Below you can see Translate, Undo and Redo performed on a solid obtained using Cut to Depth and Cut through all. One of the sketches is then edited and the changes are correctly reflected in the cut solid:
Below you can see Translate, Undo and Redo performed on a solid obtained using Cut to Depth and Cut through all. One of the sketches is then edited and the changes are correctly reflected in the cut solid:
Tuesday, January 15, 2013
Cut, extrude and undo/redo fixes
Today I fixed the extrude mid plane bug which didn't allow us to change the extrusion type to Mid-plane for more complex shapes:
I've also improved undo/redo for solids affected by a cut operation:
and fixed cut and undo/redo for solids obtained from boolean operations. Here is an example where fuse, extrude and cut are applied to form a complex object:
I've also improved undo/redo for solids affected by a cut operation:
and fixed cut and undo/redo for solids obtained from boolean operations. Here is an example where fuse, extrude and cut are applied to form a complex object:
Monday, January 14, 2013
Solver changes and undo/redo
Today I commited the changes for the Solver:
- fixed circle parameters loading order
- improved solutions for under constrained sketches by first applying the DFP Solver
- improved the processing speed by raising the number of free points for the first iteration
- added the positive parameter soft constraint for circle radius
- improved the solver call for changes in the Point3D and Circle property tabs
After these changes, it's possible to solve more complex sketches that have length constraints and point to edge constraints for all points.
I've also started improving the undo/redo functionality for 3D shapes affected by a translate:
- fixed circle parameters loading order
- improved solutions for under constrained sketches by first applying the DFP Solver
- improved the processing speed by raising the number of free points for the first iteration
- added the positive parameter soft constraint for circle radius
- improved the solver call for changes in the Point3D and Circle property tabs
After these changes, it's possible to solve more complex sketches that have length constraints and point to edge constraints for all points.
I've also started improving the undo/redo functionality for 3D shapes affected by a translate:
Tuesday, January 8, 2013
Improvements for the Solver
For the past days I worked on improving the Solver:
- fixed the circle parameters loading bug: the circle parameters were loaded first, regardless of the circle's position in the shape list.
- added code to make sure that the circle's center is always loaded before the circle in the shape list (since both of the reference the same index in the shape to parameter index list)
- added a new constraint which forces a value to always be positive. This constraint is currently used to ensure that circle radiuses computed by the Solver (when the radius isn't locked by the user to a specific value) remain positive
- updated the soft constraints function to only add the positive radius soft constraint
- improved the Solver calling for circle tab changes
There is a bug which causes the Solver to sometimes miss the solution for more complicated shapes (possibly because it doesn't select a correct estimation for the first step if the new position is too distant from the original position). This is what I'll be working on next, as well as adding unit tests for the shape list creation method in DocumentToSolverAdapter.
- fixed the circle parameters loading bug: the circle parameters were loaded first, regardless of the circle's position in the shape list.
- added code to make sure that the circle's center is always loaded before the circle in the shape list (since both of the reference the same index in the shape to parameter index list)
- added a new constraint which forces a value to always be positive. This constraint is currently used to ensure that circle radiuses computed by the Solver (when the radius isn't locked by the user to a specific value) remain positive
- updated the soft constraints function to only add the positive radius soft constraint
- improved the Solver calling for circle tab changes
There is a bug which causes the Solver to sometimes miss the solution for more complicated shapes (possibly because it doesn't select a correct estimation for the first step if the new position is too distant from the original position). This is what I'll be working on next, as well as adding unit tests for the shape list creation method in DocumentToSolverAdapter.
Subscribe to:
Posts (Atom)