+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default stretching from a center point in a dynamic block...

    Registered forum members do not see this ad.

    I am creating a dynamic block for ceiling air diffusers. It has two core parts to it, the face and the neck. The face is the exposed part you see in the ceiling and the neck is what the ductwork attaches to behind the face. Now these are both variables, you can have a 24x24 face with a 4x4 neck all the way up to a 20x20 neck depending on how much air you want to flow. So I have a rectangle, that represents the face, that I can stretch to any size I want and I need another rectangle inside it that I can stretch to any size BUT the inner rectangle has to always remain centered in the outer rectangle. So I need the inner rectangle to strech out equally, both directions (left and right or up and down) from a center point. I can't use a scale action because necks can have a variety of width to length ratios. The easy way is to use two grips and manually stretch in one direction and then in the other but it would be more efficent and I'll have less errors if you could have just one grip for width and one for length.

    Well hopefully someone understands this TIA for any help!

    You can download my current dynamic diffuser block her:

    http://columbiahvac.com/public/dynamicdiffuser.dwg

    Not that it's not complete, I still have so work to do on the look ups for different looks, but you can see I have a round neck that sizes and centers properly and a rectangler neck that doesn't.

  2. #2
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Apr 2004
    Posts
    147

    Default

    Wouldn't that be a scaling action on the inner rectangle? That should keep it centered.
    A baby seal walks into a club....

  3. #3
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Actually scaling works great if your keeping the same width to length ratio (x, y ratio?), and it works great for round necks as you can see from my existing file (link is on my first post). For rectangular necks it doesn't work so well because grills are not always 24x24 with a 8x8 neck, sometimes there 24x12 with a 8x4 neck or any number of combinations. So if I start with a 4x4 neck, I can scale it to 8x8 no problem and it will stay centered, but I can't scale it to 8x4 so inthis case I need to stretch rather than scale.

  4. #4
    Super Moderator fuccaro's Avatar
    Using
    AutoCAD 2006
    Join Date
    Nov 2002
    Location
    Romania, Marosvasarhely
    Posts
    3,540

    Default

    Draw a rectangle. In the Block editor create a horizontal linear parameter between the upper corners and keep only the left grip. Now add a stretch action to this parameter. With the stretch frame select the left side of the rectangle. As objects to stretch select the rectangle and the grip of the parameter. And here is the trick: add an other stretch action to the same parameter. With the stretch frame select the other side of the rectangle (the right one). As object to stretch pick the rectangle and SET THE MULTIPLYER TO -1. Close the block editor. If you drag the grip horizontally it will change the rectangle symmetrical.
    An other way: create a linear parameter and add a stretch action with multiplier 2 and a move action with the multiplier set to -1.
    This info should be enough for start. Good luck!
    It's nice to be nice, but sometimes is nicer to be evil!.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

  5. #5
    Luminous Being dbroada's Avatar
    Computer Details
    dbroada's Computer Details
    Operating System:
    XP Pro
    Computer:
    Dell
    CPU:
    Intel Xeon 2.13GHz
    RAM:
    2GB
    Graphics:
    NVIDA Quadro FX 580
    Monitor:
    DELL 23" & SAMSUNG 21"
    Discipline
    Electro/Mech
    dbroada's Discipline Details
    Occupation
    Design Engineer
    Discipline
    Electro/Mech
    Using
    Electrical 2013
    Join Date
    Nov 2005
    Location
    Sussex, UK
    Posts
    5,023

    Default

    Coooo, It's taken much of the day (on and off) but I have finally got that idea to work. I like these dynamic blocks but it takes lots of attempts before they do anything remotly like I'm expecting. Where did you find that -1 trick, or should I already know about it?
    "That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson

    Dave

  6. #6
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Apr 2004
    Posts
    147

    Default

    Worked like a charm! Thanks!
    A baby seal walks into a club....

  7. #7
    Super Moderator fuccaro's Avatar
    Using
    AutoCAD 2006
    Join Date
    Nov 2002
    Location
    Romania, Marosvasarhely
    Posts
    3,540

    Default

    Yes, the Dynamic blocks are great!
    It's nice to be nice, but sometimes is nicer to be evil!.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

  8. #8
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Thanks Fuccaro, excellent solution. I was finally able to finish The block and yes dynamic blocks are great, this one will end up saving me a ton of time in the long run. Thanks again for the help!

    Just incase your inerested in seeing the finished block you can DL it here:
    http://columbiahvac.com/public/DynamicDiffusers.dwg

  9. #9
    Super Moderator fuccaro's Avatar
    Using
    AutoCAD 2006
    Join Date
    Nov 2002
    Location
    Romania, Marosvasarhely
    Posts
    3,540

    Default

    After this first step probable you will find interesting the lookup parameter. If your air difussers are with predefined sizes you can preset those dimensions.
    Just a suggestion...
    It's nice to be nice, but sometimes is nicer to be evil!.
    Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

  10. #10
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Dec 2005
    Location
    Chicago, IL
    Posts
    39

    Default

    Registered forum members do not see this ad.

    and a good suggestion it is.

    I did indeed use lookups for a few things in the block, common sizes is one I have now added.

    Thanks again for all the help Fuccaro!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts