Code Monkey home page Code Monkey logo

Comments (21)

billetandsons avatar billetandsons commented on June 10, 2024 1

got it. ! I'll test the updated extension when it lands.
once again - massive thanks for the speedy reply and updates.

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons so essentially what you're asking for is to be able to display 1 3/4" instead of 1.75" - is that correct?

Also, what's the proper way to display the measurement? For example, would you show 1 3/4" or 1-3/4", etc.?

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

thanks @adamdehaven!
Correct for 1 3/4".
They also write it as a "classic" fraction (numerator OVER denominator) but I guess this would be font/glyph dependent.
numerator/denominator would work.

here's a ref from a drawing. From what I gathered the Dash is a convention but if there would be optional it will be sweet.

cheers

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

They also write it as a "classic" fraction (numerator OVER denominator) but I guess this would be font/glyph dependent.

@billetandsons - correct, this would be font dependent (and most do not support fractions) so it would be output as numerator/denominator.

I've pieced together a way (still testing) to reliably do the conversion. This is going to sound like a weird ask, but can you give me some example decimals and their corresponding fractions (i.e. give me a list of the ones that are common for you). Just give me a list like shown below; however, it would be helpful if you provided some examples that were a little more complex than what I'm showing:

decimal fraction
.25 1/4
.3334 1/3

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

handy cheat sheet
DB

depending on the scale, I don't think they go smaller than /16th.

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

Pasting here for reference
fraction cheatsheet

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

Like in the chart, the intervals used are 1/4s, 1/8th, 1/16th and 1/32th

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

So the problem I'm running into:

If I try converting 0.0156 into a fraction, I'm getting 10/641; however, if I convert the whole decimal of 0.015625 I properly get 1/64. Still trying to figure out the rounding.

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons so does this look like what you're wanting?
specify extension using fractions for measurements

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

Yes Chef! This is wicked. Just what I needed.
I usually relent to this chart
https://www.engineeringtoolbox.com/inches-decimal-equivalents-d_471.html
and round up.
Usually it's for builds (like extruded logos) that are 6-8 feet wide so /16th inch is a good enough to round.

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

I’ve got this working and have been running through some test cases.

I’m planning to provide a “maximum denominator” field that allows the user to set the maximum denominator for the fraction which impacts how the rounding algorithm interprets the measurement (the default will be 64).

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons one request: Would you be willing to provide me with a sample Illustrator .ai file with a series of example objects that would use fractions in the measurements? You don't need to run the extension, just provide me properly sized objects on the artboard.

I can run the fraction-enabled script on the file and compare the results with what you are expecting. I'd really appreciate it!

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

Hi Adam, unfortunately I can't share a specific file from our project as it's still under production, So I changed the logo on the sign.
What happens is we CNC our letters and then need to make a diagram for the construction team on how to mount the letters to the backing -
Specifying the distance of the letters from the edge of the sign.

Specify Sign.zip

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons even if you could just make a test file (remove any proprietary info) it would be greatly appreciated

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

Here's something that was produced and measured by hand, including my dims.

PayDay Sign.zip

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons thanks for all of your help! I have just submitted version 4.3.0 for review to Adobe Exchange and it should be available later this week. Once released, you should see the update available in the Creative Cloud desktop application under Marketplace > Manage plugins

One note: when using fractions, you may have to play around with the Maximum Denominator setting to get the level of rounding/approximation you desire (i.e. if the fraction doesn't match what you are expecting).

fraction max denominator

For example, if you have a dimension that returns a large denominator but you are expecting something like 1/3, try lowering the maximum denominator value to something like 10.

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

@adamdehaven thank you! It would be great.
To confirm - can the measurement return any denominator? When specifying fractional inches,
the convention is 1/2 - 1/4 - 1/8 - 1/16 - 1/32. Something like a 1/3 won't work in inches world

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons the maximum denominator setting can take any value from 1 - 999. The algorithm cannot explicitly do math "in inches" meaning that it may return fractions that are not in your conventional measurement set.

For example, if you were to have an object that measured 1.3333 inches on one side, it will likely return 1 1/3.

from specify.

billetandsons avatar billetandsons commented on June 10, 2024

I see. Is there a way to define ranges for decimals, based on a table like this
https://www.engineeringtoolbox.com/inches-decimal-equivalents-d_471.html

so any fraction can be defined to a specific range and matched withing this range to the nearest fraction?

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

I see. Is there a way to define ranges for decimals, based on a table like this: https://www.engineeringtoolbox.com/inches-decimal-equivalents-d_471.html

Again, no, because this only accounts for inches and I coded the fraction feature to work with other units as well.

I believe you'll see once you play around with the updated extension that you should be able to get what you're wanting for the most part (assuming you create objects at the correct dimensions). If you look at the screenshot below, I was able to get the correct dimensions from the table you referenced while leaving the maximum denominator setting at the default value of 64.

object with decimals and fractions

from specify.

adamdehaven avatar adamdehaven commented on June 10, 2024

@billetandsons version 4.3.0 is now available if you update via the CC desktop app. Let me know how it goes

from specify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.