1D-Scale by % or +/- cm to extend and contract

Dear all,
Is there an option to do exactly that, I would like to scale objects and add or subtract length.

Thought I could type it in the command line as it would normally allow calculations.

Thank you

2023-03-23 15_43_18-Window
To do % scaling, use the “factor”.
Pick a base point for the center of the scale, then don’t input another point, but input a number instead.
A 1.30 factor, for example, is like adding 30%.
0.85 is like subtracting 25%… etc.

–

To “scale” by an +/- amount, you should look in the “stretch” concept. Or by turning on control points (Or solid control points “_SolidPtOn”) and move the points.

1 Like

@maje90 Would this be a nice feature request? Because this -/+ units and % would be very handy with many commands.

Thank you!

Nudge is also quite useful for incremental transformations.

Haven’t we been here before? :smile:

I know it’s an old script. Don’t know if it’ll work in V8 (or V7 for that matter).

1 Like

@MattE HAHA

You are a start, remembered, Time to always look into my activity first. Put me a set me a shortcut in Chrome for that - time to set it also up for my personal account :slight_smile:

Thanks mate - this was a very useful script as I remember.

Do you know whether there is a function to favorite any post on discourse/forum?

H

I usually bookmark the threads I may want to go back to. Not perfect, but it narrows down the search a lot.

As for the scripts - I always save them to my plugins and scripts folders for future use. The main problem I have is remebering what they are supposed to do when I finally get around to using them :sweat_smile:

I not frequently use pocket for this. Also not optimal but you can tag saves.

Besides pascals script ressource, is there a more profound platform where I could find scripts and their explanation/summary?

I often go with gumball, where you can also type calculations. if your thing is like 10 long and you want it at 12, you can ximply type 12/10 in gumball. depending on where you’ve got the pivot, it makes exactly what you are looking for.

But these are all workarounds, command line calculations feature request dates back to 2014 as far as I know and it is not working.

Should be a game changer: “+/- digit - unit” and “%” working

I’d call it different workflow, not necessarily a workaround. I understand you have very precise ideas on how Rhino should work for your workflow. Finally it will take you some time to adjust everything for needs, but the nice thing is that Rhino is capable with the help of macros, rhinoScript and py c# and vb.
I’m pretty sure you’ll end up learning py or c#.

Have a good one :slight_smile:

I will make some space to think about your ideas on the weekend. Sounds promising!

I do this all day, changing something that is 1.5mm into something that is 1.7mm.

It’s easy to remember how to turn something from units into a percent scale:

the size you want it to be / the size that it is now.
to / from

I keep BoxEdit open so I can reference the current size when scaling. Say something is 1.5 and I want it to be 1.7, the to / from = 1.7 / 1.5:

image

Then when it’s 1.7 and you need it to be 1.5 again, then the to / from = 1.5 / 1.7:

image

3 Likes

Hi Hannes - see how this works:

ScaleByIncrement.py (3.7 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

3 Likes

YeSSS

Thank you @pascal!

@pascal thank you again for making this happen.

It works very good.

I would suggest to even simplify this script for peace of mind as we have all scale tools available:

Just ideas:

  1. Maybe get rid of ScaleMode as I want to have it work by increment (it’s the name of the script)

  2. get rid of ScaleDimension as we have other scale tools that work better for the purpose.

  3. Also Set scale direction, the cursor is freefloating, and this feels not good - sure I can use object snaps to the end of an object, but I feel it would be much better, if there is a direction constraint into 1D same behavior as 1D scale

I still wonder, why it is so difficult to include simple numerical calculation into the command line.

As I suggested I just would type+2cm or +2 when using 1D Scale or percent numbers or would use results/sums of calculations.

Would be way easier and intuitive.

What do you think?

Hannes

Hi Hannes - I fixed a couple of bugs, script up dated above, and added the line drawing from the base point, which indeed I’d forgotten, and made Increment the defauklt mode

So, compared to Scale* this does things a little differently - all you give it is a base point and a direction and it figures out how big the object is in that direction and makes it the size you ask in that same direction - any arbitrary direction - there is no reference point as in Scale* commands, so you do not need to find a snap point at each end of the scale to set the base distance - this might be hard or impossible on some (say blobby ) objects.
It would be easy enough I think to allow say selection of existing objects, or dimension objects as the source of the desired incrment or absolute size in that direction.

-Pascal

@pascal I am working with it. Just asking, is it difficult to change the code to have a 1D-scale like behaviour just with the added setting of increment? Would be very cool as I do not like the free floating option to set the direction point. Want to have it precise and because of object snaps etc there is a potential risk of fucking up precision while modelling as you might not notice wrong snaps.

Thank you

PS: just the 1D-Scale command with increment option would be exactly what I was looking for.

Here you see the error if you won’t properly constrain direction by pressing SHIFT

Hi Hannes - what I posted (updated a day or two ago) should work with osnaps and ortho and draw the expected line. I do understand what you are asking, I’ll try to get to it - this was all piled onto an existing script.

-Pascal