What is the task at hand?
So I get some phone calls the other day – people complaining. They want changes. Yet again! Why can’t these people make up their minds! That means I have to get off Facebook, go back to my code – which I hopefully haven’t forgotten, and I have to try and make their changes fit in, with the least amount of trouble.
What did they want this time?
They wanted to dimension bolts not just to one grid line, but to every single one. Ok that’s fine. How am I going to select all parallel gridlines, given an input of just one gridline?
- First I need the input Gridline. This is given. We have the input gridline because we’ve asked the user to select a relevant gridline.
- We need to get the actual grid, using that grid line.
- We need to get all pertinent gridlines using the grid – we want to get only the gridlines that are parallel with our originally selected gridline.
- Using those filtered gridline points, we need to extract out a pertinent reference point and add that to the set of points used to create the dimensions.
1. The Input Gridline
- This has been obtained by selection.
2. Getting the Actual Grid
3. Getting Pertinent Gridlines
Now we extract the relevant points given the above information.
This is the final result:
4. Create the dimensions
We’ve got the bolt dimension (previous post). We have some grid line dimensions (see above code). Add the above points to the bolt positions and then create those dimensions as outlined in the previous post. Voila! We are finished! Now back to WoW!