How to type feet and decimal inches into command line?

Hi,
googled this, nothing there, asked this got feet and imperial.
5ft2-1/8in

so on that basis 5ft2.5in should do, but fails.

How does one enter 5ft 2.5inches into command line ?

  1. for V5
  2. for V8

then also, how do I get it to display with after the inches number with in brackets ( XXft XX.Xin)

so e.g. 659.375 (54ft 11.375in)

Cheers

Steve

I tried in Rhino 8

5feet2.5inches
5ft2.5in
5’2.5"

All three options worked fine.

Fractions don’t seem to work just like that

This worked:

(24/2)"
(5*12+10/4)"

Hi,
I am revisiting a drawing in V5, and as V7 caused mayhem with dims displays, I have yet to find time to test V8 and sort it out.

the first two DONT WORK.
the third does.

and how do I get the display to read as inches then ( ft inches) as per post.

Cheers

Steve

This works. No space in between…

I am a little confused on the question but this is how I enter feet and inches.

1 Like

Hi,
hope this explains the second part.

Is what I am after after first solving how ro enter feet and inches into the command line.
the original dim was in ft inches, I have my dims as inches,
I needed a quick way of entering my sirte measurements of feet and inches into Rhino, without messing about with a calculator feet x 12 + inches.

so I have ended up with inches and having to manually type the feet inches in brackets for each one.

so how do I get that feet and in inches in brackets as shown ?

and I will be using X’XX"" method. as others fail me.

Cheers

Steve

In my experience you shouldn’t have to calculate anything in the command line. Rhino will do it for you. Say units of my file are decimal inches.
I can type
13.125"
1’1-1/8"
333.375mm
33.3375cm
and they all create a line the same length.

1 Like

True in Rhino 5. All three work in Rhino 8.

Part 2: you can’t. In R5 or R8. You can do decimal inches but not feet and decimal inches.

Hi,
Thanks Martin.

However shot down in flames as Rhino cannot display Feet and decimal inches !

Why Not ?

Thats basic stuff right there !

Is this beyond McNeel coders ?

Steve :frowning_face:

It is not a common mix. Not unknown, but specialised. It’s likely McNeel have never been asked for it before.

I think you could possibly replace dimension text from inch only format with feet and inches using a script. Surely not the perfect solution because it won’t be realtime unless you do this in Grasshopper.

I’m not a coder but Copilot suggests this:

def decimal_to_feet_inches(decimal_inches):
    feet = int(decimal_inches // 12)
    inches = decimal_inches % 12
    fraction = round(inches - int(inches), 3)  # Round to the nearest 1/8 inch
    fraction_in_inches = int(inches) + fraction
    return feet, fraction_in_inches

def to_fraction(decimal):
    # Converts the decimal part to the nearest fraction
    numerator = int(round(decimal * 8))
    if numerator == 8:  # Special case: if rounding gives a whole number
        return "1"
    if numerator == 0:
        return "0"
    return f"{numerator}/8"

def format_feet_inches(feet, inches):
    int_inches = int(inches)
    fraction = to_fraction(inches - int_inches)
    if fraction == "1":
        int_inches += 1
        fraction = "0"
    if fraction == "0":
        return f"{feet}'{int_inches}\""
    return f"{feet}'{int_inches}-{fraction}\""

# Example usage:
decimal_inches = 62.125  # Example input: 5 feet 2 1/8 inches as a decimal
feet, fraction_in_inches = decimal_to_feet_inches(decimal_inches)
result = format_feet_inches(feet, fraction_in_inches)
print(result)  # Output: 5'2-1/8"

Hi,
That spaghetti scares the pants off me.
I am not a coder and faced with having to do all that , I just run away, as a 2 day job becomes , a lot longer., worse still if a 1 say job heas become a weeks job, then that on top.

Are we saying 25ft 7.625 inches is not possible at all or just not possible in brackets ?

I may have to forego the inches and just have 25ft 7.625 inches as the only displayed number.

is that possible ?
@jeremy5

If McNeel have never heard of decimal inches and feet, I am shocked.

Steve

It would be so simple. Just ditch those feet and inches.

1 Like

Hi, um what ?
I am measuring items built in feet and decimal inches.
the tail does not wag the dog.

Can I have dims as arrow tip 25ft 7.625in arrow tip ?

Steve

feet & inches decimal does not seem to be an option in the annotation styles…

I will soon wake up from this wacky dream,
how can a serious CAD prog not have feet and decimal inches ?

and we are at V8

Its bad enough I cant even buy a feet and decimal inches retracting tape, so when out measuring up RAF aircraft, I have to do all in mm and then convert back home, but if its 1ft 11.9 or 1ft 11.95 and the measurement sits between the two, on site I could have measured again and seen that it was .9 or .95, usually whole sub divs such as .4 or .3 etc, not always though.

Items built to decimal inches need a decimal inch ruler on them.

but to not be able to show 2ft 11.7 inches is NUTS.

Is that how it is in solidworks, or catia ? or fusion360 ?

Steve

Out of interest, why do you need to display measurements in feet and decimal inches? Who is going to use them and what for?

You can, manufactured by Aldrich Engineer and available in several lengths and from a variety of suppliers, including UK ones. Aldrich Engineer – Decimal inch tape measures 165 ft, 25 ft, 10 ft, 5 ft

I think looking in the Help under Annotation Styles will get you 90%+ of what you are trying to do. Under Length Units, you need to use Inches-Decimal for your primary units, then use Inches-Feet&Inches for your Alternate Units. You can set the fractional linear resolutinon there, too. The alternate units in brackets will show fractional inches, but the primary units will show that in decimal inches, but without the explicit “inches”.