Beano Posted November 9, 2009 Posted November 9, 2009 I am trying to create a library of 3d pipes and fitting for a job at work. The creation of all pipes and fittings is easy and they have then been grouped into a pipe diameter block. I would like to align the block to the previous pipe (or joint) on insertion using multple insertion points. My preference is to do this without lisp or vba as I am very limited in this area. But if there is no other way I may have to. I am also wanting to stretch the straight pipe to fit between joints can this be done dynamically to a 3d block. I hope someone can help. Quote
Bogbadbob658 Posted November 10, 2009 Posted November 10, 2009 The first part of your question is the hardest. If I was trying to automatically insert and align to an object I would alter my UCS (object UCS would probably be best). This would get the orientation correct. Then just make sure the insertion point of the block matches a reference point on the receiving object. Alternatively there are some lisp routines around that will align and move in one command but you would have to search for one as I don't have any. If you cretae a dynamic blocks you can an align option but this would be a post insertion option rather than automatic. To stretch a block you have to use dynamic blocks. When you create the block tick the box that says 'open in block editor' but (and it's a big but) I don't believe the stretch works on 3d objects. However if your pipe was created by drawing a circle and 'extrude' you can stretch it out to what ever you want without creating a block. Quote
Hugh_Compton Posted November 10, 2009 Posted November 10, 2009 Creating the pipes as cylinders is your best bet for usability in AutoCAD. Quote
Hugh_Compton Posted November 10, 2009 Posted November 10, 2009 A bit later you will want the ability to extract the pipe's lengths and possibly their elevations (by this I mean levels i.e. Invert Levels, center levels etc). Below is a quote from Tony Tanzillo about the difficulty of getting such values from AutoCAD: "3D Solid functionality and specifically, API support is deliberately hobbled or disabled in AutoCAD to avoid the possiblity that it would be use to create produts that compete with Inventor or other 'model-based' offerings. You should consider 3D support in AutoCAD as essentially being a 'teaser' or embedded demo of 3D modeling functionality found in ohter products." I'm a member of the Autodesk Developer Network and have posed the question of extracting data from cylinders. I was told it is possible using Brep but I haven't yet got it to work. Quote from my query: "the height property of a Solid3d is not exposed. You should be able to get this by retrieving a point on each top and bottom face, then projecting the difference vector against a perpendicular vector for example, using the BRep API." --------------------------------------- 3D AutoCAD Pipework – http://www.HerculeDesign.com Quote
Beano Posted November 11, 2009 Author Posted November 11, 2009 Bogbadbob and hugh thanks for your help ucs object almost works but due to the bends in the pipes the block still inserts in relation to the x axis at the start of the block. Extruding and using cylinders for the pipe doesn't work as the pipe has flanged or socket ends as part of the block. Therefore the manipulation of the cylinder does not occur. Again thanks for the help, any other advice is always appreciated. Quote
Beano Posted November 17, 2009 Author Posted November 17, 2009 Is this more feasible to be done via lisp or VBA. Quote
SEANT Posted November 17, 2009 Posted November 17, 2009 Based on my interpretation of the problem, I think the various APIs have tools that could simplify that type of task. Post some samples of the blocks – that may help generate interest within the numerous coders that frequent this site. I could probably offer some VBA suggestions, but given its indefinite future, it may be best to avoid VB based solutions (Unless VB.NET is an option). Quote
Beano Posted November 17, 2009 Author Posted November 17, 2009 I have attached 2 of the 80mm blocks we are using. The intent is to insert these and other blocks along a 3d alignment string and aligning on insertion even sizing the straight pipe. Not sure if I am trying to reinvent the wheel, but trying to make this as easy for the user as possible. FPIPE080.dwg FB11080.dwg Quote
SEANT Posted November 18, 2009 Posted November 18, 2009 I’m not sure how much capability Dynamic Blocks have with stretch parameters on 3d elements. I do think the process could be automated with one of the previously mentioned APIs, though it would be a fairly complex coding effort; especially if automatic bill of material generation was an ultimate goal. On a more basic level, assembly can be assisted with a bit of Block rework, and some simple scripts. For example, the blocks in the attached have points (nodes) incorporated to allow for orientation with these: C^C^_Ucs;3;nod;\nod;\nod;\.-insert;FB11080;0,0,0;1;;0; C^C^_Ucs;3;nod;\nod;\nod;\.-insert;FPIPE080;0,0,0;1;;0; PipeTester.dwg Quote
Beano Posted November 20, 2009 Author Posted November 20, 2009 Seant, thanks for that. How is the order of the points identified. Is it just the order they were inserted that specifies the priority. Thanks again. Quote
Beano Posted November 20, 2009 Author Posted November 20, 2009 Seant, does the block have to be orientated along the z axis. Quote
Beano Posted November 20, 2009 Author Posted November 20, 2009 Seant I have tried doing this with the remainder of this block set and I am coming up empty. What process did you use to set this up. Quote
SEANT Posted November 20, 2009 Posted November 20, 2009 The process would benefit from a Block Library setup where each block is in its own file (as opposed to multiple blocks in the same file). The general orientation of each block requires the mating surface flat to the WCS’s XY plane, one hole aligned to 0,0,0, an opposite hole aligned with the X axis. See attached. I added the points because of the spacing between holes. The order of picks during insertion should be as listed in the attached sample. orientation.dwg Quote
Beano Posted November 26, 2009 Author Posted November 26, 2009 I don't mean to be greedy, but has any one got further info re this subject. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.