My week-end challenge and DC problems
-
@unknownuser said:
You deserve a medal for that! With a day to spare what will you do with your time?
Looking for an other challenge !
-
OR perhaps go back to where 'A' is set and use something like
=IF(A=0, 0.0001, A)
then A is never quite 0 ? -
@tig said:
OR perhaps go back to where 'A' is set and use something like
=IF(A=0, 0.0001, A)
then A is never quite 0 ?Good idea too !!
Faster, but the bridge never be horizontal. OK, 0.0001 is quite horizontal... but not . I'm a man thinking Zero is not quite Zero
So two solutions : one simple and faster but cant realy accept all angles, the other more mathematic but slow and made long sentences.Remember me the time I worked as multimedia designer. Me and a friend worked on Flash and for the same job, I made 1 frame and 200 lines of actionscript, and my friend made 1 line of actionscript and 200 frames
-
You'll also probably find that when it looks flat, in reality the bridge is slightly 'arched' [in a shallow 'hump'], because it will deflect under its own weight and the people standing on it, the engineer would want it to 'settle-down' to be no more than 'flat', in a 'worst case'.
So this is then even more complicated, because it means at some point the parts will go from a positive 'arch' to a negative 'curl', passing through 'zero' just after it has started to 'rollup'...
-
@tig said:
You'll also probably find that when it looks flat, in reality the bridge is slightly 'arched' [in a shallow 'hump'], because it will deflect under its own weight and the people standing on it, the engineer would want it to 'settle-down' to be no more than 'flat', in a 'worst case'.
So this is then even more complicated, because it means at some point the parts will go from a positive 'arch' to a negative 'curl', passing through 'zero' just after it has started to 'rollup'...
Yes, I noticed the arc, but not at the end.
If you set the Course value to can se the end of the bridge dive into the pier
In the final position, Course = 109 (or 109.2 to avoid the divide by zero ) all is quite horizontal in my model.
But in the model quite all is parametric. So if I want to have an arc at the end, just change the Lb value for little greater. This dimension is the size of the arms, that don't change the mesh size but just de calculation, so the axes aren't on the right place, but at the end the bridge is arched. -
Here is a little guide to understand the variables :
All the variables don't change the shape of the bridge, only the calculation.
Only Course, La and Lb are variables ; Angles are calculated with them. -
i had a similar problem before..
the way i ended up dealing with it was by adding another attribute.. it wasn't elegant at the time and it still isn't ..your double if statement seems better but i'll post the method anyway.. (might get the discussion going again to find a better solution than either of these)
for your Divide_Zero.skp, it would look like:
Position
X =if(trap=.12345,0,100/trap)Custom
trap =if(value=0,.12345,value)
value =(user input)you'd just have to make sure the trap value (.12345 in this example) is a number that should never come up as input..
not sure but doing it like this might speed things up if you have to enter the double IF statement for all parts of the bridge.. this will result in one IF statement in each part of the bridge plus a single extra IF
-
@unknownuser said:
Here is a little guide to understand the variables :
[attachment=0:20dsmooa]<!-- ia0 -->02_1.jpg<!-- ia0 -->[/attachment:20dsmooa]
All the variables don't change the shape of the bridge, only the calculation.
Only Course, La and Lb are variables ; Angles are calculated with them.Instead of checking sin(a) have you considered checking the angle. There are only a few cases( maybe only a=0) that would need checking constrained by your geo. Conversely can't you create a variable say z= sin(a) and do a check on that?? you could even go as far as using a taylor series exapnsion for all if SU has problem with small angles.
-
@unknownuser said:
Position
X =if(trap=.12345,0,100/trap)Custom
trap =if(value=0,.12345,value)
value =(user input)I like this solution Simple and economic.
As you say, the only inconvenient is to found an unusable value for the test. In the case of the bridge, no problem? because the angles are limited.
I will test it soon -
Three years ago, I made this model to test DC and my trigonometry knowledge. I bring out it to show my students the wonder of SU Dynamic Components.
But...After the divide by zero problem we talk in this thread, I have a new problem with SU 2015 (on Windows 7 and 8 64): it seems that there are any problems with very small numbers.
That's what happen when I roll and unroll the bridge on SU 2015 :
That's is the good position after the sams operation on SU 8 :
If I explore components, I find it :
An error is highlighted on a very little number with a negative exponent e-6. Is the result of a COS calculated in the formula.
Perhaps SU DC don't understand this way to write a number and consider it like a text... Perhaps...Some one have same issue with this model or other DC ?
Advertisement