Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: JK3990 on March 01, 2018, 05:13:45 PM

Title: Very Strange Behavior With Stair Railing
Post by: JK3990 on March 01, 2018, 05:13:45 PM
I am getting some very wacky behavior when I use OffsetY with a Linear 1S generator:
(http://www.vectorsource.com/misc/stairs.jpg)

Source file is attached.  Has anyone else encountered this bug?  I am running RailClone 3.1.0.
Title: Re: Very Strange Behavior With Stair Railing
Post by: IJ2087 on March 01, 2018, 08:34:43 PM
Hi,

I took a look at your definition and cannot figure out why you are getting this behavior, but I noticed that it gets close to working when two vertices are broken in the spline. See attached image. Not sure why this sort of fixes the issue, but perhaps it will do for now until iToosoft pipes in?
Title: Re: Very Strange Behavior With Stair Railing
Post by: JK3990 on March 01, 2018, 08:42:51 PM
Very interesting, thanks for taking a look at my file!  Glad to know you found a way to get it to work.  I'm assuming if it's a bug, we won't see a fix right away, so I'll try your fix for now.
Title: Re: Very Strange Behavior With Stair Railing
Post by: IJ2087 on March 02, 2018, 04:43:06 AM
It might have something to do with the spline overlapping itself in the Z direction, but I'm not entirely sure.
Title: Re: Very Strange Behavior With Stair Railing
Post by: iToo on March 02, 2018, 10:57:05 AM
Hi, the problem is caused by the "Y Offset".

It works applying an offset to the base spline (similar to Editable Spline->Outline), but it fails because tries to solve intersections with the overlapped vertices.
Obviously those vertices are not overlapped because are at different Z, but this case is not taked in account because the algorightm works only in 2D.

One alternative, may be to enable "Geometry->Simple Y Offset mode". It uses the same method than Spline->Outline, which is more simple and don't check intersections.
Anyway, i just noticed it doesn't generate the same result than Outline. Probably the code has been refined in the latest Max versions, but we are using an outdated revision.
I've added this to our to-do list, to check it.

Meanwhile, i would suggest to modify the style to use two base splines (inner and outer), and prepare them manually using Outline.
Setting Y Offset to zero should solve the problem completely, regardless of the spline's complexity.

Title: Re: Very Strange Behavior With Stair Railing
Post by: JK3990 on March 02, 2018, 04:15:26 PM
Thank you for the explanation and looking into it, much appreciated!