![]() screw threads, shoe sizes), the Options window may be more appropriate. This will depend on the context of the component - for "snap to grid" type functions, using the scale tool is usually most natural, whereas for "real world" objects that come in standard sizes (e.g. So, as you say, it is a matter of choosing one method or the other. But, to do that, you would still need to disable the scale tool completely, as there is no way to make the formula switch automatically between using the custom attribute when editing the window, or using current("LenZ") when you use the scale tool - it would require a function something like "Most_Recently_Changed(attr1,attr2)", which SU does not have (though it would be nice). You can create a custom "data entry" attribute to use in the Options window, and then reference that inside the formula. I’m working on a tool to draw cubes and turn them into components. ![]() As soon as the user chooses a new value in the window, the literal value will replace the formula - leaving the snapping disabled. If you want to place two object touching each other, select one and move it from a point that you want touching another object and then snap it to a point on the other object. To use snapping from the Options it's best to use a drop-down list - if an attribute is using a formula, it cannot also be editable in the Component Options window. Goele wrote: So I figure that it is either one or the other. LenX = if ( current("LenX")>25, round(current("LenX")*2.54/25)*25, 25) (As an experiment I tried a Rigidity Kinematic constraint between the post and bracket at (say) 5.5s. No matter what units you use for your drawing, current(), always return the length in inches! So if you are working in metric you may have to multiply the result by 2.54 before rounding. Place the following formula in the LenX field for a component to snap the component's LenX to the nearest width within 2 inches after scaling: LenX ROUND ( CURRENT ('LenX')/2)2 This formula is useful for components that represent items that only come in whole number sizes. Here, if current("LenX") is over 25, you will get the result of the rounding functions, otherwise you get a fixed value of 25.Īnd there is yet another thing to be careful of. Creating a Basic Component explains how to turn selected geometry into a component. You could also use the functions ceiling() or floor(), if you want the snapping to always round up, or always round down - round() always goes to the closest one.Īlso, watch out for small lengths that might snap to zero length - the IF function can test for this, e.g. Note that you must wrap the parameter name in quotes as shown here. In reality, this kind of error is trapped, but still gives strange results. (As an experiment I tried a Rigidity Kinematic constraint between the post and bracket at (say) 5.5s. doesn't know when to stop calculating, because every change to LenX makes it change again, and again - a circular reference. I find a better modeling method is to model the components in place so you don’t spend a lot of time moving and rotating the components to get them into place. For this, you need the special function "current()".Ĭurrent() receives a value from your mouse (or VCB) interaction, and then makes the DC equations update once, and only once. Grab a corner of one component that has a location on the neighboring component and move the cursor until the cursor snaps to the destination point. ![]() This formula is useful for components that represent items that only come in whole number sizes. (As an experiment I tried a Rigidity Kinematic constraint between the post and bracket at (say) 5.5s.The maths to do this is relatively simple - divide by your "snap unit", round to an integer, then multiply up again by the snap unit.īut first, you need to know about the way that new values get updated from the user interface. Place the following formula in the LenX field for a component to snap the component's LenX to the nearest width within 2 inches after scaling: LenX ROUND ( CURRENT ('LenX')/2)2. How can I "unstick" them, or make them properly rigid, or, is this perhaps a glitch? which seems to "stick" them together, as from 6 seconds on I then move the post Only, but the bracket apparently moves according to the "transform" of back when they were both lying down at the beginning of the Rotation at 4s. Then at 4s I select both Post and Bracket and rotate them (I.e. You’ll still be able to shift them around. While you are at it, also set them to Cut Opening so the will visually cut the large face texture, thus locally replacing the carpet texture. (Only 2 individual (non Dynamic) components in model, nothing else only model axis (not local) used in Animator)įrom 0 to 3 seconds is a demonstration and is fine (single selection rotation). Give the separate tile components Glue To property so they will snap flat to a face they are placed on. problem from 6 seconds on in example file attached.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |