Tuesday, March 6, 2012

Process and Instrumentation Diagrams (PIDs)


Yes, again.

Just some added light. The above is a snip of one of my drawings using our new methods. We are in the process of trying to sort all our ones up to a reasonable standard, so I have had a talked with a man from Denmark I work with, and he has come up with some good ideas:

1. Tag numbers should have the form of AV007, or PM126, which would stand for Actuated Valve and Pump Motor respectively. The reason for the XX000 format is this allows for up to 100 items in the one area.

2. The temptation is to make PIDs based on an area, but it is better to make them on a process basis. This means a drawing could have a tank in one building with a pipe leading to another.
These processes would have an overall name, and number, which would be the drawing number.
So for instance you might have a drawing/file number like "PID-014-Carbonitation.dwg".
Therefore a tag in that drawing might be AV007, but it's true unique tag would be 014-AV007.

3. The idea is to keep the drawings as clutter free as possible, and to this end, arrows are not permitted, except if you are desperate! Also on the no-go list are temperatures, flow rates, motor kWs and other fluff. That fluff can go on the Flow Diagram or if need be a separate layout.

My ideas on the drafting are:

1. All text to be 1.5mm high. For mechanical drawings I use 2mm. Just need to squeeze that extra bit on!

2. All ordinary items (eg lines) to be on the med layer. I use the name med as short for medium line weight. I normally have this as set to yellow, but maybe if things needed to be printed in colour, then it might not be so clever. I have a colour ctb that prints yellow as black.

3. All viewports to be of scale 1:1.

4. All tag numbers to have their own layer, these layer sets are available in the template drawing and as a lisp routine to create the layer set. The reason for this is to be able to isolate the numbers so you can check them quickly to see if you have duplicated any.

5. Most of the symbols are to Iso standard 10628, in other words, a world standard.

6. The Tags to have their own block, which consists of the attribute only, no lines.

7. Instrument tags have their own circle and so on with two tags, as a dynamic block allowing the same block to be used in all 4 orientations. Handy when you want to extract data!

8. All items to be in model space. This allows for more than one layout, say for instance if you need one showing flow rates. The flow rates would end up in paper space.

I know people that use a grid to do PIDs, and I have tried this but found the whole process of turning snaps on and off all the time irritating.

My web page bilrocad.com was due to die about February 2012, but Blue Host, the provider, stayed the execution for another year, so I am going to try and make it a little more easy on the eye, as it looks very rough at the moment.

All this between getting another blog going for a Flying Boat (see the new link on the right)-
I have had a struggle getting the book reading bit going, but it is up and running now-see "A Noble Chance" on Friends of the Solent Flying Boat.

Monday, January 2, 2012

Just a few renders...

What you see here is the result of a bit of experimentation. With Autocad the trick is to make sure LIGHTINGUNITS is set to either 1 or 2 and that you have sky background and illumination selected. It also pays to open the Advanced Render settings and make sure Final Gather is ON. The foliage in the foreground was cut and pasted in afterwards in Photopaint.
No Sky needed in the night shot but it seems it stayed on anyway!

These are a friend's design, the first is a renovation of the front of an existing house and the second is a bachelor pad, to go in a large backyard. The first one has scorched weatherboards.
Apparently this protects the wood for about 80 years.





Saturday, December 10, 2011

Sheetmetal developments and PIDs


This might be handy for some: How to make a flat sheet metal pattern from a 3D solid in Autocad?

Well, as far as I know, it does not do it out of the box, unlike Inventor or Solidworks. I do not have these so I have to manage somehow.

Normal transitions can be done using 3rd party programs that do that sort of thing. Unfortunately, these do not handle special cases like the round outlet being on an angle, as well as being offset.

Back to basics: just draw the object in 3D and draw a series of lines in 3D to represent the folds that you want. If your metal thickness is 3mm, you would offset everything in 1.5mm ie half, in from the outside of the finished product.

Sounds easy? It is. Sadly it is extremely time consuming and tiresome. This is where some Lispy tricks come in handy, and while it does not do the full job, it does help.

First, to draw a transition, draw a rectangle, then a circle somewhat higher. You then use the loft command to produce the 3d solid. Now it pays to change to a different layer and draw the midlines, ie those ones halfway in as mentioned above. So, for instance you would draw a rectangle on top of the original one and offset it by 1.5mm if your metal thickness was 3mm.
same for the circle. You may need to hide the original solid to get the offset command to work.

If your circle was parallel to the rectangle, you could now issue the divide command and pick the circle and divide it into 48 pieces. You will see that nothing appears to have happened after the divide command. This is now the time to change your OSNAP to endpoint, intersection and node. This last one is important because it will pick up all the nodes (points) that were put in and that you cannot see as yet.

Issue the line command and hover over parts of your circle- you should see the nodes light up as the mouse passes over them.

Draw in your development lines-this takes a while. Now you find out the length of the small arc,ie the bit between two of the nodes. This can be done by copying the circle and the nodes off a little bit an putting in some lines to the nodes and then trimming off the circle, leaving an arc.

Right click on the arc and select Properties, it will give you an arc length. Write this down.
Call it Length A.






Next, start on the development, usually handy to the 3D part so you can see both at the same time. The rectangular part edge is the best place to start. You will see that there is a triangle, and the lengths of the sides are easily found through their properties, so after drawing one side, draw two circles the radii of which are these lengths. Now draw two lines from each end of the original line to where the two circles cross. Erase the circles and you are now started.

To get the part that has all the little creases, you need to do the same again, but for one of the sides of the triangle you use length A as mentioned above. All the while you are building on the original triangle. Normally, a transition gets welded up the middle so normally half has to be drawn (or a quarter if it is symmetrical).

My lisp routine (available free if anyone is interested) allows you to pick the 3d line, then it draws a circle with the radius information from that line, which does speed things up a tiny bit.

A nice finishing touch is to put 0.5mm radius circles on every intersection around the circle and then trim them out so they appear as notches. This is so the sheetmetal guy does not have to divide them out - he just folds using the notches.



Next a bit on PIDs (Process and Instrumentation Diagrams)

If you have done any of these, you know 3 things:

1. Lines are nice to draw first, and blocks are ok to put in a drawing, but these ones always land on lines, so the inner bits have to be trimmed out.

2. There are lisp routines around that do autobreaking of the lines, but this has to be organised or downloaded or paid for. If, like me, you only do PIDs about 10% of the time, you might not bother. (Maybe I should!)

3. Autodesk make an add-on to Autocad, specifically to do PIDs. Unfortunately at NZ$3500 to upgrade from standard Autocad, and an extra NZ$300 a year this is not liable to be on the menu any time soon.

So along came one of my ideas that even I have my doubts will catch on: what if you could do a drawing just by pressing keys on your keyboard? Turns out you cannot use the arrow keys, but the rest of the keyboard is available, using a lisp routine (see below). Just issue the command PID, pick your start point, press the "o" key (make sure caps lock is OFF!) and up the line goes by 6mm. Press "l" key and off to the right it goes by 6mm. Now press 4 on the keypad-and a manual valve is inserted. Press 5 and an actuated valve is put in. "k" is to go left and "," is used to go down.

The routine uses the autcad lisp function grread - short for graphics read, which also does the keyboard. In my research trying to understand this I realised that my level of writing lisp is very low level and basic....Anyway, it does work. You could cut and paste the following code into notepad and save it as PID.lsp.

Whoops! Stop press....just tried the routine below at work and found that HP keyboards seem to have a different mapping right is 76, left is 75, up is 79. Strangely, down is still 44. Go figure.

Stop press yet again. Just realised that if you have caps lock on, then the above is the way to go.
If caps lock off, then the stuff below is OK!

;THIS DRAWS A LINE WITH VALVES FOR A PID

;BY BILL LE COUTEUR 2011
(defun C:PID()
(setq initial_point (getpoint "Pick a start Point\n"))
(setq the_x (car initial_point))
(setq the_y (cadr initial_point))

(print the_x)
(print the_y)



(while (setq the_input (grread 1 5 2))
(progn


(if (eq (car the_input) 2)
(progn
(setq key_press (cadr the_input))
(print the_input)
(print key_press)
(print initial_point)
(print the_new_point)

(if (eq key_press 108) ;to the right
(progn
(setq the_x_right ( + the_x 6))
(command "_line" (list the_x the_y) (list the_x_right the_y) "")
(setq the_orient "right")
(print "x,xright,y")
(print the_x)
(print the_x_right)
(print the_y)
(setq the_x ( + the_x 6))
);end 108 progn
);end 108 if

(if (eq key_press 107) ;to the left
(progn
(setq the_x_left ( - the_x 6))
(command "_line" (list the_x the_y) (list the_x_left the_y) "")
(setq the_orient "left")
(setq the_x ( - the_x 6))
);end 107 progn
);end 107 if


(if (eq key_press 111) ;up
(progn
(setq the_y_up ( + the_y 6))
(command "_line" (list the_x the_y) (list the_x the_y_up) "")
(setq the_orient "up")
(print "y,y-up,x")
(print the_y)
(print the_y_up)
(print the_x)
(setq the_y ( + the_y 6))
);end 111 progn
);end 111 if


(if (eq key_press 44) ;down
(progn
(setq the_y_down ( - the_y 6))
(command "_line" (list the_x the_y) (list the_x the_y_down) "")
(setq the_orient "down")
(setq the_y ( - the_y 6))
);end 44 progn
);end 44 if

;--------------------INSERTING VALVE MANUAL-----------------------------

(if (and (eq key_press 52) (eq the_orient "right")) ;valve manual to the right
(progn
(command "-insert" "vmr" (list the_x the_y) "1" "1" "0")
(setq the_x ( + the_x 6))
);end 52 progn
);end 52 if

(if (and (eq key_press 52) (eq the_orient "left")) ;valve manual to the left
(progn
(command "-insert" "vml" (list the_x the_y) "1" "1" "0")
(setq the_x ( - the_x 6))
);end 52 progn
);end 52 if

(if (and (eq key_press 52) (eq the_orient "up")) ;valve manual to the up
(progn
(command "-insert" "vmr" (list the_x the_y) "1" "1" "90")
(setq the_Y ( + the_Y 6))
);end 52 progn
);end 52 if

(if (and (eq key_press 52) (eq the_orient "down")) ;valve manual to the down
(progn
(command "-insert" "vmr" (list the_x the_y) "1" "1" "-90")
(setq the_Y ( - the_Y 6))
);end 52 progn
);end 52 if

;--------------------END OF INSERTING VALVE MANUAL-----------------------------


;--------------------INSERTING NON-RETUN VALVE FORWARD -----------------------------

(if (and (eq key_press 49) (eq the_orient "right")) ;to the right
(progn
(command "-insert" "VNFR" (list the_x the_y) "1" "1" "0")
(setq the_x ( + the_x 6))
);end 49 progn
);end 49 if

(if (and (eq key_press 49) (eq the_orient "left")) ;to the left
(progn
(command "-insert" "VNFL" (list the_x the_y) "1" "1" "0")
(setq the_x ( - the_x 6))
);end 49 progn
);end 49 if

(if (and (eq key_press 49) (eq the_orient "up")) ; to the up
(progn
(command "-insert" "VNFR" (list the_x the_y) "1" "1" "90")
(setq the_Y ( + the_Y 6))
);end 49 progn
);end 49 if

(if (and (eq key_press 49) (eq the_orient "down")) ; to the down
(progn
(command "-insert" "VNFR" (list the_x the_y) "1" "1" "-90")
(setq the_Y ( - the_Y 6))
);end 49 progn
);end 49 if

;--------------------END OF INSERTING VALVE MANUAL-----------------------------

;--------------------INSERTING VALVE ACTUATED-----------------------------

(if (and (eq key_press 53) (eq the_orient "right")) ;valve to the right
(progn
(command "-insert" "var" (list the_x the_y) "1" "1" "0")
(setq the_x ( + the_x 6))
);end 53 progn
);end 53 if

(if (and (eq key_press 53) (eq the_orient "left")) ;valve to the left
(progn
(command "-insert" "val" (list the_x the_y) "1" "1" "0")
(setq the_x ( - the_x 6))
);end 53 progn
);end 53 if

(if (and (eq key_press 53) (eq the_orient "up")) ;valve to the up
(progn
(command "-insert" "var" (list the_x the_y) "1" "1" "90")
(setq the_Y ( + the_Y 6))
);end 53 progn
);end 53 if

(if (and (eq key_press 53) (eq the_orient "down")) ;valve to the down
(progn
(command "-insert" "var" (list the_x the_y) "1" "1" "-90")
(setq the_Y ( - the_Y 6))
);end 53 progn
);end 53 if

;--------------------END OF INSERTING VALVE ACTUATED-----------------------------

;--------------------INSERTING VALVE CONTROL-----------------------------

(if (and (eq key_press 54) (eq the_orient "right")) ;valve to the right
(progn
(command "-insert" "vcr" (list the_x the_y) "1" "1" "0")
(setq the_x ( + the_x 6))
);end 54 progn
);end 54 if

(if (and (eq key_press 54) (eq the_orient "left")) ;valve to the left
(progn
(command "-insert" "vcl" (list the_x the_y) "1" "1" "0")
(setq the_x ( - the_x 6))
);end 54 progn
);end 54 if

(if (and (eq key_press 54) (eq the_orient "up")) ;valve to the up
(progn
(command "-insert" "vcr" (list the_x the_y) "1" "1" "90")
(setq the_Y ( + the_Y 6))
);end 54 progn
);end 54 if

(if (and (eq key_press 54) (eq the_orient "down")) ;valve to the down
(progn
(command "-insert" "vcr" (list the_x the_y) "1" "1" "-90")
(setq the_Y ( - the_Y 6))
);end 54 progn
);end 54 if

;--------------------END OF INSERTING VALVE CONTROL-----------------------------


);end if progn
);end if


);end progn

);end while



);end func

Saturday, October 8, 2011

Revit Spark




A while back I found that you could download a copy of a thing called SPARK.
This is a possible release of a different type of Revit.

The download is from: http://labs.autodesk.com/utilities/spark/

You can check Robin Capper's blog opinion at http://rcd.typepad.com/rcd/,
look for 13th September 2011.

It is free to download and will last till 7th July 2012.

I would call it Revit LT, ie "Low Technology"? or LITE?
(As Tim would say, you are able to draft lots on LT because it is "Lite")

Someone has suggested I write up my experiences with it.
I have had experience with Autocad Architecture, so thought it might be
interesting to give it a try.

At the outset, I have to say that leaping straight in is not the ideal
way to approach learning a new program. I found lot's of frustrations that
would not have happened if I had learned in a classroom situation.
I have given Revit a go before about a year ago, so the user interface was
familiar and I had a small project a friend had started using 2D Autocad.

The project is to take a standard house and put a basement rumpus room
in it. The drawings are not perfect(!?...are they ever?) and are in a very
preliminary stage.

The things I found most wanting were: (unless I'm missing something!)

1. No ability to be in 3D of the level you are editing. Sure, you can
make a 3D view and fiddle around for ages with that, but that is a
separate view. This compares very badly with Autocad Architecture, which
allows you to do an instant 3D view of the level you are editing,
and whats more, get a perspective view in an instant.

2. The supply of windows and doors seemed a little poor. I guess I could
create my own families, but that feels like a bit of a mission. For instance,
I wanted bifolds, 4 off, on the front part. Not there.... So mangled a curtain
wall to fill it in.

As with Autocad, it is a lot of knowing where to find things....

Saturday, September 24, 2011

Just a Simple Door



A friend of mine has a joinery shop. It seems sometimes he gets a job where an architectural style of door is needed. He mentioned how it was a bit of calculator bashing to work out the plank widths and how many planks etc. Previously, I had investigated doing Autocad scripts generated from an excel visual basic macro, so I thought, what good waste of my time this might be!

It was quite surprising to me that it was quite tricky to work out, and compromises had to be made-for instance the gap had to be specified, not calculated, then all the tricky stuff with decimal points and integers etc.

The resulting script draws it in 3D.

Sunday, August 14, 2011

Autocad and piping

Just had a look on Youtube at a demo of Autodesk's Plant 3D which I guess is an add-on to Autocad. It looks easy to use and produces things like isometric drawings with bills of materials.
From the short demo, I came away quite impressed. You can see one of the videos here: http://www.youtube.com/watch?v=gokkAr0Lc2I

It makes my home grown approach to piping look a little crude and backward. If you want a look at how I do this, go to: http://www.youtube.com/watch?v=nZsVUjbRWO4

Having said this, I could imagine how hard it would be to persuade decision makers at my work that this would be a good way to go, probably because my work about 20% piping. Well, I can dream can't I?

Even if I were certain that this was the way to go, there would be a nagging doubt that maybe other products such as Revit MEP might be the clever way.....

So, back to Youtube and what do you know? Here is a demo of Revit MEP,
http://www.youtube.com/watch?v=6Sf_b_Wes2s

To me, it looked like a lot of button pressing for not much result. So here is a puzzle: Autodesk make and sell both products.....why?

I don't want to be seen as a Revit basher here, because as I understand it, a lot of quite clued up people think that Revit is the way to go for drawings of buildings, so maybe I'm missing something.




Friday, April 22, 2011

Acad.pat

A co-worker who uses Autocad LT to do his electrical drawings recently said he could not open one of my drawings, because I had saved it as R2010. I had recently been upgraded from Autocad R2008 to R2010, so I said:

"I believe you may be able to upgrade to the R2010 version".

Which he did, which in hindsight was not the best plan, as after installing he wanted to use the hatch command, and got a dialog saying:

"Cannot find acadlt.pat"

Which is fine: All you have to do is go Options, File Locations, and add where it is to your support path. Unfortunately, on the network, we are mere users and are not allowed access to our c: drive.

The IT man was duly called, and progress is on going...involving reimaging and so on.

Which made me think, why can you not get a copy off the internet, download it, stick it somewhere where you are allowed to go and add that location to your support listing?

Strangely enough, I was not able to find a copy of acad.pat anywhere!

Of course there were heaps of people giving out add-ons to the file, but not the file itself.

So here I am, Saturday morning of the 23rd of April, rummaging around my hard drive for the mysterious file. (Mad? Yes!). You can open it up in Notepad and check it out.

Here is part of it:

;;
;; Copyright (C) 1991-2011 by Autodesk, Inc. All Rights Reserved.
;; Version 2.0
;; AutoCAD Hatch Patterns
;;
;;
;; Note: in order to ease migration of this file when upgrading
;; to a future version of AutoCAD, it is recommended that you add
;; your customizations to the User Defined Hatch Patterns section at the
;; end of this file.
;;


;; Note: Dummy pattern description used for 'Solid fill'.
*SOLID, Solid fill
45, 0,0, 0,.125
*ANGLE, Angle steel
0, 0,0, 0,.275, .2,-.075
90, 0,0, 0,.275, .2,-.075
*ANSI31, ANSI Iron, Brick, Stone masonry
45, 0,0, 0,.125

It does go on for quite a bit more, as I have Autocad Architecture, then towards then end it has this bit:

;; User Defined Hatch Patterns
;; Add any hatch patterns that you define to this section of
;; the file to ensure that they migrate properly when
;; upgrading to a future AutoCAD version. If duplicate hatch
;; patterns are found in this file, items in the User Defined
;; Hatch Patterns section take precedence over patterns that
;; appear earlier in the file.
;;

I find it puzzling as to why the file is called acadlt.pat for LT, but maybe they are given less hatches out of the box.

STOP PRESS! According to Robin, a good plan is to run Autocad first time WITH ADMINISTRATOR RIGHTS! Should I tell the IT man?......