Itoo Software Forum

Author Topic: Very Strange Behavior With Stair Railing  (Read 592 times)

JK3990

  • Newbie
  • *
  • Posts: 13
Very Strange Behavior With Stair Railing
« on: March 01, 2018, 05:13:45 PM »
I am getting some very wacky behavior when I use OffsetY with a Linear 1S generator:


Source file is attached.  Has anyone else encountered this bug?  I am running RailClone 3.1.0.

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Very Strange Behavior With Stair Railing
« Reply #1 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?

JK3990

  • Newbie
  • *
  • Posts: 13
Re: Very Strange Behavior With Stair Railing
« Reply #2 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.

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Very Strange Behavior With Stair Railing
« Reply #3 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.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3328
    • iToo Software
Re: Very Strange Behavior With Stair Railing
« Reply #4 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.

Carlos Quintero
iToo Software

JK3990

  • Newbie
  • *
  • Posts: 13
Re: Very Strange Behavior With Stair Railing
« Reply #5 on: March 02, 2018, 04:15:26 PM »
Thank you for the explanation and looking into it, much appreciated!