Friday, 15 March 2013

Projecting Points - Drawing Module


Having started on dimensioning support I stumbled across quite an obvious problem, how would I do point to point  Dimensioning. Obviously I could extrapolate the points from the edges and use these, but any changes in the Base FreeCAD model and your dimensions would very easily mess-up. 

I started thinking about this last night and indeed to support such dimensioning modes with parametric relations, the points would have to be projected from the base FreeCAD model. I hit a brick wall trying to figure this out last night, but suddenly it came to me this morning. Sleep is a powerful thing. 

All I had to do is use the Projector algorithm to project points from project curves and then check if these can be referenced to the original object by checking if the topology exactly matches. 

The result is the above, all the points are recognised from the original object and now means we can in theory reference these. It is slightly dumb at the minute, because it projects points from all the edges (even if they are hidden). However, it should be trivial to fix this. 

Obviously in the GUI, the points will be hidden until an appropriate tool is used but is a step in the right direction indeed!

Easter break officially begins today and hopefully will have a helper who can assist me on the Drawing Module too *fingers crossed.