Month: December 2017

  • An Example of a Non-compliant Stair-case: A Case Study (Australian Standards)

    What happens if you don’t get it right?

    Have you ever fallen down a flight of stairs? I hope not! But from experience I can tell you that it’s not a very pleasant one. I slipped as I was walking down – I fell supine, hard, like a hammer on a nail, bang into the corner of the steps. The pain was absolutely numbing – I could walk for about three days, nor could I even roll over in bed for about that same period. Falling down stairs is a dangerous business – and if you’re in the business of designing or fabricating stairs – especially public access stairs, then you absolutely have to get it right. Because if you don’t, then it’s only a matter of time till someone falls. Luckily I was a young man, so I recovered pretty quickly. But if I was an invalid, a fall like that could be potentially life threatening!

    Here is an example of a badly designed stair:

    An example of a staircase which was not made according to AS specifications or perhaps any sort of specifications apart from the builder's convenience I suppose. This type of shoddy workmanship will be the cause of many injuries and accidents. Designing structures according to the specifications mandated is absolutely essential.
    An example of a staircase which was not made according to AS specifications or perhaps any sort of specifications apart from the builder’s convenience I suppose. This type of shoddy workmanship will be the cause of many injuries and accidents. Designing structures according to the specifications mandated is absolutely essential.

    The steps are not uniform – they vary in height and length. This is not safe if you are traversing it. It’s easy to misjudge. That’s why when we do the shop drawings for a flight of stairs we check that it’s uniform, that you don’t have too many stairs in a flight, that there’s adequate room, that a child cannot squeeze his/her head in between the treads, etc. I have ascended and descended these steps – and were it not for the handrails, it would be very dangerous. Don’t do steps like this. Here were the measurement from the bottom riser going up:

    1. 29 cm
    2. 20 cm
    3. 20 cm
    4. 18 cm
    5. 17.5 cm
    6. 15.5 cm

     

    The risers vary too much!

    Our staff are trained to ensure that their stairs comply with Australian Standards. We’re definitely not the cheapest, but we’ll know if we see a bad design – and knowing that information could save you a bundle.

  • Entity Framework by with a Mysql Database

     

    A pictorial representation of how Entity Framework, in the world of code, would look if it was a corporeal object.
    A pictorial representation of how Entity Framework, in the world of code, would look if it was a corporeal object.

    The problem with using a database, when you have another primary source of information, is that the database needs to be updated. Constantly. If someone forgets to update the database, then you will be relying on information that is old/erroneous and not updated. That’s a huge risk. It’s the type of thing that you want to do only if your staff are disciplined, and the gravity of failure is low, should they forget. But if the reverse is true, then you’re sure to eat humble pie, and cause a lot of needless trouble and expense for yourself and all you deal with.

    There was a political war over the implementation: I was for using the original database, and the boss was for creating a new one. Accuracy vs speed. Speed won the victory. And I must oblige by constantly updating a database with panel information.

    Anyways enough with the back ground. [Here’s how you do it.]( https://forums.mysql.com/read.php?174,601264,601264)

    And I’ll paste it in below, just in case the link fails, as it is wont to do, inevitably – at some time in the future.

     

  • A Poor Man’s Line Jig (well, there’s actually no jigging here) – (AutoCAD .net API)

     

    What are these guys doing, you ask? I suspect that they are jigging a line. They are probably doing it this way because they didn't read the ObjectARX documentation. Well actually, you don't need to. Just use the poor man's jig.
    What are these guys doing, you ask? I suspect that they are jigging a line. They are probably doing it this way because they didn’t read the ObjectARX documentation. Well actually, you don’t need to. Just use the poor man’s jig.

     

    I wanted to implement a jig for drawing a Line – but strictly speaking I didn’t want the line itself – I wanted its two points, yet I wanted all the features that come with jigging: snaps, polar tracking, and a nice line leading from the base point to the cursor, which shows you where you were, and where you are going. I was originally going to jig it all myself – and all of this to obtain two coordinates in a manner that would allow the user to see what was actually going on. Jiggig takes a lot of effort. It was only then that I realised I could get the same result, but with a massive short cut:

    Here is a poor man’s Line Jig – at the end of it, you’ll have the two points you are after, but without the effort. If required, you can encapsulate all the logic in it’s own class, so that the client doesn’t have to bother too much with the implementation details.

    Poor man’s line jig.

     

            [CommandMethod(“GetPoints”)]

    public static void GetPoints()

    {

    Document doc = Application.DocumentManager.MdiActiveDocument;

    Database db = doc.Database;

    Editor ed = doc.Editor;

     

    PromptPointResult pprOrigin = ed.GetPoint(“Click for point.”);

     

    if (pprOrigin.Status == PromptStatus.OK)

    {

    PromptPointOptions promptPointOptions = new PromptPointOptions(“Please get secondPoint”);

    promptPointOptions.UseBasePoint = true;

    promptPointOptions.BasePoint = pprOrigin.Value; ;

     

    PromptPointResult ppr = ed.GetPoint(promptPointOptions);

     

    if (ppr.Status == PromptStatus.OK)

    {

    ed.WriteMessage(“Congrats!”);

    }

    }

    }

     

  • Steps to Mastery of the API (AutoCAD .net API)

    These are steps. When you get to the top, you'll be an AutoCAD master programmer.
    These are steps. When you get to the top, you’ll be an AutoCAD master programmer.

    I’ve compiled a list. There’s actually quite a bit involved. I don’t think you can get away with simply not knowing anything about unamanged ObjectARX world. Here is the list below – which I will update. If you see any notable topics which I have missed, please feel free to add a note and I will update the list.