![]() It's a combination of having snapping off, constructing new components on the exact same plane as previous components when possible and using plenty of construction lines. I don't know if I'm writing this coherently enough for anyone to understand, I've tried Google in vain. If you had 12 parts of varied length, all butted to each other, then took a measurement you can get "this length is ~Xcm" (almost), not "this length is =Xcm" EXACTLY Xcm. This becomes an issue when you need a few components of exact size to come together exactly, and then make and exact measurement of them all together. And then I can't guarantee its in the right place, back to the first paragraph. Say if snapping is set to 0.1cm, I can have a component that is 0.05 cm away so I can never move it where I want it exactly, unless I turn snapping off. Yes I could turn on snapping to a degree of accuracy, but it is very easy for a part to be off by a fair margin. There are other ways to lock a direction too. You are free to snap to any point in your model. Notice how you don’t need to keep your mouse on the object when you lock a direction. There is almost always some level of the components being inside each other or fractions of a distance apart. Snap to the midpoint of the object you want to move. It's pretty difficult to get them resting exactly on top of, or next to each other. If I'm putting a top on a table, a roof on a house or butting two joints together. screw threads, shoe sizes), the Options window may be more appropriate.TL DR: I want my components to hit each other and stop, I don't want them to pass through each other. 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. As soon as the user chooses a new value in the window, the literal value will replace the formula - leaving the snapping disabled. This formula is useful for components that represent items that only come in whole number sizes. ![]() 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. 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. Goele wrote: So I figure that it is either one or the other. 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. This video shows how various origin points will affect the behavior of a simple chair. 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. The origin also affects swapping of components in a SketchUp model. 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. LenX = if ( current("LenX")>25, round(current("LenX")/25)*25, 25) Give the separate tile components Glue To property so they will snap flat to a face they are placed on. ![]() 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. doesn't know when to stop calculating, because every change to LenX makes it change again, and again - a circular reference. 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. 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. ![]()
0 Comments
Leave a Reply. |