Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
About my WPF app to draw a Bolt Hole Pattern.
Message
From
04/08/2008 10:54:51
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01334102
Message ID:
01336238
Views:
9
Update coming...

I've been working on this more, and I've implemented some of the comments you had. Will post the updated code soon, but I just wanted to let you know where I am.

Today I need to work instead of play, so may not post till Tues or Wed.

Here's where I am:



>One thing I'd do for sure is to not nest the HolePattern and Hole classes within the window class - doesn't make for re-usability.

Ok.. So far, I've moved it out of the Window Class, but still in the same namespace as the Window. I may need to move it to its own namespace and then reference that in my project. It takes projects like this to get the vision for this design technique and to see the value of such granular design. I'm trying to think about it as if I am designing ONLY the HolePattern class that other people were going to use in ways that I do not know.

>I'd also proably do what I suggested before: Use a sub-classed canvas and move the methods and properties controlling the drawing of HolePatterns to it thus leaving very little in the window itself except the UI controls which would then just need to be hooked up to the canvas properties.

Not much on this yet.


>Few other things (that I'm sure you are aware of) like using a generic method taking a HolePattern parameter to replace DrawHoles() and DrawHolePattern2()

Done! Good idea. I've got to start thinking more like this.


>Might be nice to zoom the canvas if the user resizes the window......

Done! Can't wait for you to see this part. It's cool.


Other changes you'll see:

1. HoleType has been added to the HolePattern. This allows choosing (1) of the (3) rendering options of the Holes in the HolePattern. The Hole rendering will mean something to a machinist, as it will indicate if the Hole is Tapped Hole, a Drilled Hole, or a CounterBored Hole.

2. Proportional sizing of the Bolt Circle Diameters on the Canvas. (Pattern1 BoltCirDia vs. Pattnern2 BoltCirDia)

3. HoleSize is now customizable for each HolePattern (user sets it in the UI).

4. Better coding practices (hopefully), but feel free to critique.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform