Springs.Feet2Fraction didn't work


#1

Hi all,

I don’t get the correct results from the Springs.Feet2Fraction node,
why?

feet2fraction.dyn (2.3 KB)


#2

Which version of spring nodes do you have installed? Only time I have seen it fail was when I had upgraded and node names changed so the internal workings of the node were broken.


#3

I have the latest version 121.0.1


#4

And which Dynamo version?


#5

1.3.1


#6

So, what is the solution?


#7

Don’t know yet. I can’t even test your setup as I am in 1.2.1.


#8

It sounds like another namespace clash. Try uninstalling all packages - only install SpringNodes…and it should work. A similar issue was reported here:

FYI @Zach_Kron @Aparajit_Pratap The issue of namespace clashes with packages had cropped up a number of times recently and appears to be on the rise
https://github.com/DynamoDS/Dynamo/issues/7697


#10

@SamBerk could you ensure that the “Number.ToString” node in the Feet2Fraction custom node has its second argument’s (digits) default value enabled as shown. I think it is disabled by default and must be enabled for your graph to work.This particular case does not seem to be a namespace collision issue.

@Thomas_Mahon I agree there are issues with namespace collisions with methods called in Imperative blocks, which need fixing, however, if you see namespace issues in associative language, I would be interested in seeing the examples.


#11

Hi @Aparajit_Pratap
Yes, enabling the default value for the number.tostring node in the custom node solves the problem,

Thank you


#12

I was able to correct the Feet2Fraction node with this solution, but the Fraction2Feet node is also not working. It’s just outputting “0” for each value. This was working prior to the 1.3.1.0 upgrade for Dynamo.


#13

I’m also having trouble with Springs.Feet2Fraction. Using Dynamo 1.3.1.1736 and Springs package 121.1.1

Whole numbers work fine, but it’s giving erroneous data for fractional feet. For example, -1.5 becomes -2’-6"

Is there something I am doing wrong?


#14

@nelsonweeks Can you upload your .dyn file or a screenshot showing more of the graph? It almost looks like maybe the indices are shifting…


#15

@awilliams Thanks for the response. They are definitely lining up and consistent in results. Any value of -1.5 goes to -2’6" and any whole number remains the same. The previous image I posted, I was trying to show more variety of results and was a bit lazy in having them align.


#16

@nelsonweeks Ah. Have a look at the code in the Springs.Feet2Fraction node, you’ll see that the math will not perform properly with negative numbers. I would just multiply your flattened list by -1 before running it through the node, then concat the negative symbol to the output strings.


#17

@awilliams Thanks for the suggestion. Seems like I will need to build in logic testing values for positive or negative. In this case all the values are negative, but I’m not sure it will always be the case.


#18

Thought I would post the workaround. I added an if statement, and if the value of the list is less than 0, it takes the absolute value and passes to the Feet2Fraction, then prepends “-” to the resulting value. Otherwise the value is passed “as is.”


#19

Thanks for pointing this out. The nodes will be fixed in the next release.


#20

Where is the code can I fix the output to look like X’ - X", and/or X’ - X x/x"