Itoo Software Forum
RailClone => RailClone Pro (*) => Topic started by: US3087 on February 02, 2020, 03:35:00 AM
-
Hi All,
I've got a rather basic question, although I just cant wrap my head around it. I have a generator creating a door FRAME, and within that FRAME I have another generator creating a DOOR.
I want the DOOR X size to be free, and calculated to be a percentage of the FRAME X spline.
No matter what I try using arithmetic expressions, the moment you plug an X Spline into the generator of the DOOR, it overrides any free X sizing. And it cannot return the XSplineLength value if there is no Xspline associated with it....
I hope this is understandable..
-
Hi and welcome.
It will be helpful if you can share your scene and please downgrade it to Max2017 version.
You can also look into Macro I shared:
https://forum.itoosoft.com/railclone-pro/railclone-4-macros/
Best Regards.
-
Hi Dragan, attached.
One more thing - why should I have to use 2 generators for the glass and the frame? Surely plugging the glass as the default to the frame should work?
I basically want the length of the spline circled to drive the input for the arithmetic node... The only thing it's driving so far is me nuts. :D
-
Hi, as I can see you are doing just fine. ;)
Here are some modifications.
Need some adjustment to adopt Door size to fit all the Doors to fit the frame. I think you can manage this. ;D
-
Hi Dragan, attached.
One more thing - why should I have to use 2 generators for the glass and the frame? Surely plugging the glass as the default to the frame should work?
I basically want the length of the spline circled to drive the input for the arithmetic node... The only thing it's driving so far is me nuts. :D
Nothing wrong to have separate Generator for the Glass. Usually, the Default segment can cause problems when you calculating Y Size so it can not be fitted automatically between other segments.
-
Thanks Dragan!
Your solution has helped me a lot. So it does seem that the arithmetic operator and the spline have to be a part of the one master graph. Also the syntax naming had me very confused! I've named the generator Door01 - FP but the call syntax is actually Door01__FP...
Very strange?
-
The Generator’s name must be normalized to be used in the expression (non-ascii characters, cannot start with digits, etc).
-
Hi Everyone,
continuing this same thread as it does relate to what I'm trying to do:
My programming and syntax knowledge is pretty basic. I'm trying to recreate the following function using an arithmetic node but it's just not working...
f(x) = \frac{x^2}{5100}+\frac{5081 x}{1700}-\frac{4888}{51}
(See attachment - clearer)
So basically I have separated each element of the equation through multiple nodes to achieve it... (which is tedious - see 2nd attachment)
There has to be a simpler way to do all that at once through one arithmetic node, but I can't for the life of me figure out the correct syntax...
Is it:
(Input1*Input1/5100)+(5081*Input1/1700)-(4888/51);
Also,
Let's say I have 3 such functions that need be applied independently based on another input,
Would it be:
If (Input2==2);
f(Input1) // (above function);
If (Input2==3);
g(Input1) // (2nd function);
If (Input2==4);
h(Input1) // (3rd function);
Appreciate any help guys, thanks in advance!
-
I think Your expression is fine, apart it is missing "return" construct.
real a =(Input1*Input1/5100)+(5081*Input1/1700)-(4888/51);
print a;
return a;
(https://i.imgur.com/mT8X7hC.png)
-
Thanks Rokas!
I do have issues still with my syntax for the if else statement :(
Basically I have a limit of 2,3 and 4 doors, and based on that I want it to return different input functions...
Please help!
-
All good. Worked it out with much trial and error!
real a=If(Input1==3,Input3,Input4);
return If(Input1==2,Input2,a);
-
Hi Everyone,
Any idea why the spline length prints as 0?