cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Displaying parameters as fractions

ptc-5687618
1-Visitor

Displaying parameters as fractions

Is there any way to display a parameter in fractional form without using half a page of relations? Not dimensions, parameters. I know the functionality exists, because it's so easy to change dimensions back and forth, but I can't seem to find something like that for parameters

Thanks,

Brian


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions

A fraction in its simplest form is an equation (division). You could make the parameter "numerator" and "denominator" and do the math on the decimal value. Use [.n] to control the number of digits. From there, you can make it a string if you like.

Yes, it should be simpler, but this is Creo

View solution in original post

20 REPLIES 20

Hi Brian !

You need to open the dimensions properties and change the format from decimal to fractional, as showed in the image below.

Best regards

A fraction in its simplest form is an equation (division). You could make the parameter "numerator" and "denominator" and do the math on the decimal value. Use [.n] to control the number of digits. From there, you can make it a string if you like.

Yes, it should be simpler, but this is Creo

I'm just curious about the rise in interest in using fractions.

It's probably easier to create parameters that are parts of the fraction to begin with - whole part, denominator, numerator and use a single relation to convert to a decimal value. The accuracy is better in that direction as well.

Thanks for all the replies. Let me try to clear up what I'm asking:

I know how to change the format of a dimension. That's easy. I'm trying to do the same thing to a parameter, and that's where the trouble comes in.

I already have the decimal value, I'm trying to convert it *to* a fractional value.

David, I'm only interested in fractions because my company uses different tolerances for fractions compared to decimals.

I need this for use on drawings, so setting up parameters and relations would be ridiculously time-consuming. To the best of my knowledge, I would have to write out a full set of relations and their parameters for every single dimension I would want to convert if I wanted to maintain some degree of associativity. Obviously I could just convert decimal to fraction, but that's what we do now and I'm trying to do something better.

Brian

The problem is that in decimal numbers the fractional part has an implied numerator, base 10, raised to the power of its place. The conversion uses a numerator, base 2, that is chosen so the denominator is an odd number. There is no one-to-one match between the representations. Unless PTC codes it for you, there is no simple method.

It's a sad thing when a key business component is not considered when buying software.

I'd suggest using all decimal fractions with explicit tolerances, but that will probably mean requiring a business process change. If they can't accept that change, then it's time to start benchmarking replacement software, with handling fractions as go/no-go test.

I understand that the conversion won't be exactly accurate. That inaccuracy is known and accepted. Doesn't make it any easier to format the darn thing that way, though.

We are currently typing the fractions in manually. This works but is slow, labor-intensive, prone to human error, and non-associative. In short, crummy. I was hoping that there was a better way. I'm somewhat new to PTC and Creo, so shame on me for expecting something so commonplace to be easy.

It's hardly commonplace and hardly easy. Shame on whoever selected software that doesn't meet the company requirements.

Converting a decimal to a fraction is incredibly common. The math itself isn't even that complex, and once someone does it it's child's play to copy the math into your system (talking to you, PTC). It's clearly doable, even in Creo, because a dimension can be converted just by changing the setting in the dimension properties. The great mystery here is why there isn't such a button for parameters.

In created dimensions PTC fakes the result to be close to what you want, but in the model they can't drive the model with one value and display a different one.

Here's an example of what makes it difficult.

If you have a decimal value that you enter as 3/64, this is converted to 0.046875, which will be rounded to .047, for a three place decimal.

The fraction that most closely approximates .047 is 47/1000, which is not 3/64.

It is 3.008/64, which is also not 3/64. Finding a power of two so that the denominator is a whole number is not an easy task.

This is limiting fractions to powers of 2. In the case of powers of 3, a simple 1/3 is the equivalent of an infinitely long stream of values.

Which is why fractions are not commonly used in CAD tools and conversions between fractions and decimals are rarely done.

If you are interested, Wikipedia has a nice article called Floating Point.

You make a good point. I was just thinking about converting to fractions with a denominator that is some power of two and maxing out at 64, which makes the math quite a lot easier. When giving precise dimensions, we do of course use decimals. But when precise accuracy is not critical we prefer to use looser tolerances to keep machining costs down. It's just part of our business practices that this variability is indicated by using a fractional dimension. So there you have it. I'm stuck needing to use a fraction, despite the fact that I personally would much rather just leave it as a decimal.

The reason I made the Architectural Dimension Converter was to use it as a tool for doing the work you are doing today, not to incorporate it for many values in a part.

Architectural Dimension Converter: Creo 2.0 + references

However, you can also do this by making a part that shows fractions in an annotation where you input the decimal value.

I see PTC as the old school master ready to crack the ruler across your knuckles. Most of the software I've used lets you change the style of any dimension, and some readbacks (parameters), to whatever format you want throughout a drawing (displayed annotation). In essence, it is complete control by feature with all the common hooks available in the style dialog. This can make for a really terrible drawing. You can bury fractions in notes; mixed dual dimension styles; and English units in one view and SI units in another. The reality is that the "art" of doing technical drawings is dying! If allowed, you would get some really poor results. Part of me applauds PTC for their attempt to manage this type of chaos. However, PTC should crack their own knuckles because they have totally messed up dual dimensions on many instances including hole notes and table driven dual dimensions. I am very much looking forward to seeing if Creo 3.0 has addressed these shortcomings. Someone said they did a serious revamp of the detailing module. I wonder what that really means.

There is only a small call for fractional dimensions (drill bit size and architectural drawings is all that comes to mind). I don't know that I have ever seen it on SI or ISO compliant standards. One can only imagine what an edict of dual dimensions or even metrification can do to an organization solely dependent on drawings using only English fractions.

Brian, I don't know what the right answer is, but I hope you find a happy medium. You can contact PTC and see what they have to offer. I suspect the old CoCreate still has more flexibility if you want to stay with PTC. Therefore, maybe Elements Direct has a solution that would play nice with Creo Parametric.

srajbhar
4-Participant
(To:TomD.inPDX)

Hi,
a parameter  from decimal to fraction

how can i show a real number parameter as fraction in notes in drawing..for e,g for values of 3.75 i what to show in notes as 3 3/4..i have used &width:1 in notes but it is showing 3.75???

Did this ever get fully answered? I've used another workaround that I didn't see mentioned.

I add datum curves to parts, and I set their dimensions equal to my parameters using relations. When done, I hide the datum curve layer(s) so they don't print or otherwise bother me. Then, on the drawing, I display the datum curve dimensions instead of the parameters. That way, the results can be shown in either fractional or decimal format, as desired.

True, this isn't as simple as we'd want it to be. But I can plop down a dozen or so datum curves pretty quickly, note their dimension IDs, and then use them up as needed on my drawing without doing any lengthy programming.

Welcome to the forum, Steve.

Can you explain with a little better detail? I am not sure how you are displaying a different dimension type using the datum curve. We like pictures

A datum curve's dimensions can be shown decimal or fractional like any other dimension. So, by equating the length of the datum curve to a parameter, I can effectively show the parameter's value in either decimal or fractional format. Here's a simple example of what I do:

1. Start with a part or assembly.

junk_dc-02.jpg

2. Establish key parameters via inputs, relations, or whatever. Some relations for the example:

  • D0=2.5
  • D1=5.125
  • D2=7.75

and

  • AREA_TOP=D1*D2
  • AREA_RIGHT=D0*D2
  • AREA_FRONT=D0*D1

3. Add datum curves (lines, rectangles, or whatever) with enough dimensions to represent the key parameters.

junk_dc-03.jpg

4. Equate the datum curve lengths to the parameter values. Some more relations:

  • D10=AREA_TOP
  • D11=AREA_RIGHT
  • D12=AREA_FRONT

5. Hide the layer containing the datum curves so they don't make a mess of the drawing.

6. Display the values on your drawing in a note or table.

junk_dc-04.jpg

7. Select the resultant values in the note, right-click, and select Properties to change between decimal & fractional.

7. Regenerate. Done.

A little tedious having to include Steps 3 - 5 in the usual drawing-making routine. But that's why it's a workaround, not a solution.

Steve

dschenken
21-Topaz I
(To:SteveH.)

Doesn't changing them from decimal to fraction cause the geometry to change or at least not match?

For example, does a parameter =.33 become a dimension on drawing of 1/3? Or does it change the parameter to be .333333333333 which is still not exactly 1/3?

Even decimal dimensions will round on a drawing. You can set fractional precision the same way.

What's wrong with 197/5120th

True, but he's looking at affecting the display of driving dimensions for geometry. Since the curves don't drive the solid any delta means the dimensions on the drawing don't match the model.


Letting rounding affect the appearance of dimensions on drawings without identifying them as inaccurate was a foolish move by PTC. I'm sure it was a customer request, but it should only be turned on by hidden config option.

For example, 2.5 rounded to no decimal places is 3. If it's not exact within the limits of precision of the software, any rounding like that should only be displayed as ~3 or 3 to make it obvious there is a discrepancy between the geometry and the dimension. I'm sure the programmers would not like it if their accountants altered the paychecks to not match what the actual direct deposit; why would they think this is a good idea (besides being told by management)?

True. I'm in the same camp where a rounded .875 on a drawing at .88 better be .88 in the model or .875+/-.010 if that's your intent. Do you know how tough it is to get that point across to people?

StephenW
23-Emerald III
(To:TomD.inPDX)

Ohhhh, this drives me bonkers!!! You wouldn't believe how many times I have argued this with an co-worker who is overly precise on everything else but on this one thing he wants the exact fraction value in the model but the drawing to show a rounded value for tolerancing. Arrggghhh!!!! Most of our stuff is big dumb steel, welded and flame cut and is good if its within 1/8", so usually it doesn't matter. But we do a little bit of pressure containing stuff and everyone knows that seals don't care if its a rounding error, a machining error or engineering error, they'll extrude out of that gap and let the fun begin!!!

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags