CONCENTRIC TEARDROP SHAPE

CONCENTRIC TEARDROP SHAPE

Colin-Pearson
Advocate Advocate
5,306 Views
20 Replies
Message 1 of 21

CONCENTRIC TEARDROP SHAPE

Colin-Pearson
Advocate
Advocate

Hey folks.  This forum and the dynamic block threads in particular have been very helpful for me - thank you all.  Hopefully I am able to help someone one day like I have been helped.

 

I've been working on a block with the help of @Libbya and I am SO close I can taste the finish line!  I think the only thing I have left to do that I don't yet understand is to create a concentric teardrop shape.  This block is of the eye of a wire rope sling - think of a length of metal/wire rope with the end doubled over to make a loop or eye.  The length of that eye varies depending on the diameter of the wire rope though it is not a linear relationship.  I have the (magenta) inside line of the eye drawn for many different sizes and with help from here, I have made it adjust with a  Scale Action on a Linear Parameter to one of many values I've entered into the Block Properties Table.  I have done the same thing with another Scale Action on Linear Parameter to adjust the (blue) circle which shows the diameter of the wire rope.  (note that the magenta and blue lines live in different visibility states)  Now I'd like to make the outside (cyan) line of that same eye work the same way.

 

My problem is that since the magenta length and blue diameter are not linearly related, I had to make them both adjust independently as described above.   Not, the outer (cyan) line has to relate to both: It should always be parallel to, concentric with, and offset by one diameter from the magenta line.  It ALSO should be as long left/right as the magenta line.  Since the diameter:length relationship is close to linear, a Scale Action based either one gets me pretty close, but the error becomes pretty noticeable when the larger diameters are chosen.  For example, when the Scale was based on the left/right length of the magenta line, the offset between the lines was over 6", but when the smaller diameters were chosen, I couldn't see the error just by eye.  

 

Is this possible with Parameters/Actions or should I also be looking at Constraints?  Or should I just get it pretty close and go on about my day?  Thanks for reading and for any advice y'all might be able to offer.

 

HAVE A GREAT MONDAY!

0 Likes
5,307 Views
20 Replies
Replies (20)
Message 2 of 21

Libbya
Mentor
Mentor

Yes, it is possible but it is not at all simple.  Attached is your file back with a new section added above.  You can see that the two grips accommodate the desired behavior.  If you open the block in block editor you will see that it is complicated in the way the various bits interact and took me a bit of time to figure out.  I might be able to simplify it some but  I don't think I could simplify it much.  Take a look.  If you feel the accuracy is worth the effort, and you have trouble reverse engineering from the posted block, let me know and I can make a screencast implementing the parameters/actions. 

 

 

 

 

0 Likes
Message 3 of 21

Colin-Pearson
Advocate
Advocate

This is so cool seeing how you worked this out.  I do have a couple question if you have the time.

1)  Instead of using the two Linear Parameters + Stretch Actions with each of the outer slanted lines, could I achieve the same thing using one Linear Parameter + Stretch Action and a Parallel Constraint?  In my head, that means the same thing (both ends being the same distance apart = parallel) but as far as creating and/or using the block, does one way have any advantage over the other?

 

2) There's a lot of stuff going on with Distance4.  Looks like Scale1 alters the blue circle diameter, Stretch5 alters both Distance3 and Distance4, and Move3 moves the outer cyan arc.  I have a couple questions on the others:

2a) Scale3 alters Distance2, but why is Distance4 also in its selection set?  I'm thinking this is why the Chain Action is turned on for Distance2? 

2b) What is the purpose of Scale4?

2c) Scale6 alters Distance2, but why is Distance4 also in its selection set?   Same as the Chain Action in question 2a?

 

I've still got to wrap my head around the Position Parameters as well, and how the Move and Stretch Actions work together with them, but I'll puzzle on that today. 

 

Thank you once again!

 

0 Likes
Message 4 of 21

Libbya
Mentor
Mentor

1)  I do not advise using any constraints except as a last resort.  There are a few things that can only be done using constraints and so they are useful but they also have several significant downsides.  They are relatively inconsistent in their behavior, have a tendency to slow the function of cad and do not play well with dynamic parameters/actions.  They will often completely ignore the dynamic parameters/actions and cause more problems than they cure.   I think that adding a parallel constaint (or any constraints for that matter) would be heavier on computer resources and less functional than the method I used.

 

2)  I'll hold off on that explanation as I am uploading an simplified version and the info wouldn't apply.

 

2a)  When you select an action, the parameter it is associated with AND all the items in its selection set are highlighted.  When you select a parameter all the actions associated with it are highlighted.  When you select Distance4 you will see the 5 actions associated with it.  Those actions are governed by Distance4, they do not affect Distance4.  When you select Scale3 you will see that Distanc2 is highlighted and Distance4 is highlighted.  Distance4 controlls scale3 and Distance2 is scaled by the action.  Notice also that many of the scale actions are set to have independent base points (Scale3, Scale4, Scale5) and those scale base points are moved by other actions (I'm not sure if you have experienced that before).

 

2b)  Same as 1, I'll hold off.  

 

2c)  Again, Distance4 is not in the selection set.  It is the controlling parameter.

 

Attached is a much simpler version although it relies completely on stretch action distance modifiers and angle modifiers in order to eliminate the extra chained point/moves and chained linear/stretches and instead stretch the cyan line endpoints directly..  The distance modifier defines how far the stretch action will stretch the line work in its selection set per each unit its associated parameter is stretched.  The distance modifier is typically 1 resulting in a 1:1 relationship.  The angle modifier is the angle the stretch angle will stretch when the parameter point is moved in the 0° direction (to the right).  I recorded a screencast showing the technique I used to arrive at those values.  Basically I move the governing parameter 1 unit and create a line between the two points I want the line endpoint to move from and to.  That line then contains the necessary length (distance modifier) and angle (angle modifier) that need to be input into the stretch action.  I used that same technique to calculate the distance the Distance3 parameter is stretched by the Stretch3 action and the angle modifiers for the Stretch9 and Stretch4 actions.  It is a fairly advanced technique, but also simple and very powerful once you get the hang of it.

 

In looking at your block, you can eliminate the SlingRAD, SlingRAD_R and SlingRAD_L parameters and simply move those lines using additional stretch actions associated with the  SlingDIAM parameter and with their angle offsets and distance modifiers changed as well.

    

 

 

 

 

Screencast will be displayed here after you click Post.

4f3ee8d9-05af-48ff-8654-ac2b0a5950fa

 

0 Likes
Message 5 of 21

Libbya
Mentor
Mentor

It looks like the screencast didn't post.  I'll try again.

 

 

0 Likes
Message 6 of 21

Colin-Pearson
Advocate
Advocate

Holy crap!  That is what I want to do but I don't think I'll ever get there unfortunately.  

0 Likes
Message 7 of 21

Colin-Pearson
Advocate
Advocate

 .

0 Likes
Message 8 of 21

Colin-Pearson
Advocate
Advocate

 .

0 Likes
Message 9 of 21

Colin-Pearson
Advocate
Advocate

I'm a little confused on the difference between what the Stretch Frame and the Selection Set of objects is.  In my head, the Stretch Frame should go around the objects that you want stretched, but I guess that's pretty much the same as the Selection Set.  Seems like maybe the Stretch Frame goes around the grip(s) that you want to trigger the Action if when those grip(s) get moved. 

 

Anyway, I'm kind of guessing here but I did manage to eliminate the extra Parameters like you suggested and I think I have that change completed.  Pretty awesome stuff, I'm guessing that limiting the number of Parameters helps keep the file more nimble too.

0 Likes
Message 10 of 21

Libbya
Mentor
Mentor

If an object is in a stretch action's selection set and the stretch window surrounds only some of the objects vertices, those vertices will be stretched based on the movement of the associated parameter grip point but modified by the distance multiplier and angle offset.  If the stretch window completely surrounds an object in the selection set or does not surround any part of the object, the object will be moved rather than stretched.

 

I'm actually uploading a screencast of the complete implementation/simplification.  I'll post that when the upload is done.

0 Likes
Message 11 of 21

Libbya
Mentor
Mentor

I'm sure you can do it. 

Yes, you can eliminate several parameters/actions.  

Here's a screencast of the full implementation of what I described.  I simplified it as much as I could.  

 

 

0 Likes
Message 12 of 21

Colin-Pearson
Advocate
Advocate

Been mostly stuck doing regular work stuff today and I'll be travelling as of tomorrow.  I did spend a while on it though, trying to clean up every other little thing I can think of and I have 3 busts that are related to relatively minor things.  Then I will get to studying that glorious screencast you put up b/c I really do need to get that out line accurate.  If you're so inclined, I wonder if you might take a look at what is causing the following unexpected behaviors:

1) My two Attributes don't move with the geometry the way they have in previous attempts.  It's like they're left out of a Action's set but I'm not sure where.

2) The circle on the right end acts funny.  It's okay if I type in a value for the Parameter SlingLENGTH (with no other changes).  It's okay if I use the grip to drag the right end to some location.  It's also okay if I use the drop-down to adjust the eye dimensions via the Block Properties Table.  However, if I type in a new value for SlingLENGTH and THEN use the drop down to change the eye dimensions, it gets a little out of place.  The initial size of all the geometry corresponds to the dimensions of a 1" sling - if I select a smaller diameter, that circle moves to the left and if I select a larger diameter that circle moves too far to the right.

3) For the life of me, I can't seem to get the middle two lines to stretch between the two eyes.  The ends should stop at the short vertical lines which have the Parameter E_1 and E_2 associated with them.   I've tried a bunch of ways and thought I had it in this version.  It appears to work in the Test Block screen, but not so much back in model space.

 

Huge thanks again, I'm trying to keep up with what you're helping me with here!

0 Likes
Message 13 of 21

Libbya
Mentor
Mentor

For diagnostic purposes sometimes it helps to turn the grips on even if you want them off in the long run.

 

1)  Contrary to what you might think, in order for dynamic actions to affect the position of an attribute it must have its property 'locked' = yes.  Once you do that, it moves correctly with the rest of the block.

 

I'm not sure about the other issues you describe.  I fixed them using the 'wholistic approach' in the screencast.  In the screencast I did not make the changes necessary to keep the teardrop shapes concentric as I covered those in the last screencast.

 

 

 

 

0 Likes
Message 14 of 21

Colin-Pearson
Advocate
Advocate

@Libbya  I am now SO CLOSE!!!  With your help, I have everything working except for that tricky outer line which I will sit down and study your previous screencast when Big Bad Work leaves me alone.  Thank you kindly for your help, you have been a huge asset here and I sincerely appreciate it.

0 Likes
Message 15 of 21

Colin-Pearson
Advocate
Advocate

@Libbya I  was out of town at a jobsite for a while, and did get to work on this but not finish it.  I've followed your video but I will say that I started from having some Parameter/Actions working.  I've managed to get everything to work at some point, but not all together.  I mean, I can get some of the intended behaviors, but then when I proceed to the next step, something gets off.  At one point or another though, I have had each aspect of the behavior working correctly, but then when I add the next Action, sometimes something that was previously working stops.  Is the chronological order in which you applied the Parameter/Actions important to the overall behavior?

0 Likes
Message 16 of 21

Libbya
Mentor
Mentor

No, the order in which parameters are created or actions are added never matters.

0 Likes
Message 17 of 21

Colin-Pearson
Advocate
Advocate

@Libbya With you help I have GOT IT WORKING RIGHT!  Thank you so much, I sincerely appreciate all of your patient help.  I have two last questions for you that are additional behaviors I'd like to build in after seeing the thing work as originally intended.

 

1) I added a Rotation Parameter and Rotate Action so I can drag the block to a particular orientation with a grip.  Then I added a Scale Action to the "SlingLENGTH" Linear Parameter.  This Action acts on the Rotation Parameter so that when a longer "SlingLENGTH" is chosen, the grip stays off to the 'right' of the 'right side' of the block (so it doesn't get obscured lying withing the block).  I'd like this rotation to be fixed about the inside diameter Quadrant point of the 'left' eye of this sling, but it seems to be rotating about a point which lies a set distance from the 'right' side of the block ... in the default length, it works great, but at any length other than the default length, the rotation occurs about the wrong point.  Any thoughts on that?

2) I have the text working per your suggestions.  Is there a way to automatically limit the width of the Attribute's text so that it is no wider than the "B1" Linear Parameter?  I'd love for the text to stay withing the linework.  The size varies significantly b/c some of the text contains more information (such as the 1-5/8" and 2-3/8" sling sizes).

 

Tell me to buzz off if you don't feel like messing with this anymore, I certainly couldn't even expect the amount of help you've given me so far.  It bears repeating: THANK YOU SO MUCH FOR YOUR HELP!!!!!

0 Likes
Message 18 of 21

Libbya
Mentor
Mentor

Glad to hear you got it working.

1) I think I'd need to look at the block.  Can you post up the current version?

2) If you look at the attribute values in block editor you will see \P repeated within the value.  That sets when the new line of text starts.  Adjust those as needed for the text to fit.  If desired you could also add a point/move to the attribute and automatically move the text for some of the sizes.  

0 Likes
Message 19 of 21

Colin-Pearson
Advocate
Advocate

1) Posted.

2) That's what I thought you might say, I'll work on that.  It's probably better to put more line breaks than scale the width of the actual text,

3) (I came up with a last LAST question) I noticed that the file size is now 13MB, even after Audit, Purge and Superpurge (a small routine I purchased that does a great job of cleaning junk out of a file).  Any idea how to reduce the file size?

0 Likes
Message 20 of 21

Libbya
Mentor
Mentor

You actually posted the answer to your issue with the rotation issue.  In your post you say you added a scale action to keep the rotation grip to the right of the right side sling.  In the block you actually added a stretch action, not a scale.  Change that stretch action to a scale action and I believe it will work the way you would like.

 

As far as file size is concerned, I saved the block as a file (you can use WBLOCK or use the Save As option within block editor and check the save as file option).  Once saved as a block file, the file size was 66.6 KB (hmm...).  Once inserted into a basically blank template file the file size jumped up to 322 KB.  I'm not sure what else you have going on in your file that would cause it to be 13MB but it isn't the block itself.   

0 Likes