Tuesday, August 25, 2009

Rounded corners

Started improving the drawing of rounded corners at sketches/solids. The features that Naro should have are the following: apply Fillet on a whole solid, apply Fillet on the edges of a solid, apply fillet 2d on two wires that have a common vertex, connect wires using an arc.

Today added code that allows the user to draw an Arc specifying the first and start point and the radius after that. This together with magic points enables the users to connect 2d shapes/wires through an arc.
Naro currently contains a Fillet tool that applies Fillet on a solid. Will work at improving this to allow applying the fillet only on a selected edge of a solid.

Found two possibilities to connect simple wires through fillet or apply a fillet by operating at the 2d level:
- the first one would be using Geom2dGcc_Circ2d2TanRad to generate a tangent circle at the two wires and build a wire with all these - a problem here would be that this package is not wrapped yet, on this situation all the generated shapes would be separate shapes in the data tree (the result of filleting two lines would be two shorter lines and an arc as separate shapes in the data tree),
- another possibility would be to use BRepFilletAPI_MakeFillet2d to fillet vertexes of a planar face but this possibility assumes a different way of working: filleting two lines would assume grouping them on a face and then apply fillet on the common vertex, the result would be in the data tree a wire generated by the algorithm, the two initial lines would be hidden. Not sure if this algorithm works on a wire that is not closed, will have to test it.
Will analyze which of these methods would be more useful for the users and implement it.

No comments: