Itoo Software Forum

Author Topic: Feature Request - Generator spline vertices  (Read 1147 times)

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Feature Request - Generator spline vertices
« on: November 24, 2016, 04:16:28 PM »
Hello,

I want to suggest a feature that I think would be very useful in certain circumstances. I'm not sure it would be possible, but perhaps it is.

Currently I am developing RailClone definitions that generate parametric building podiums. I use several generators to build the walls and another set of generators to build the floors, roofs and parapets. The "wall" generators need to use a spline that has "broken", or un-welded vertices so that the segments clean up nicely at corners and are adaptive. The other generators need a closed "welded" spline in order to have a clipping area for cropping the segments. As a result, I need to use two splines (one with un-welded vertices for the walls, and one with welded vertices for the rest) and it can get a bit tedious.

I am wondering if it is possible to add an option in the generators to have it assume, or pretend that the vertices are un-welded. That way, I can create one spline that is closed and welded, but check a tick box on the generators I need to have adaptive and clean at the corners.

Attached are some images of what I am doing for reference.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1531
Re: Feature Request - Generator spline vertices
« Reply #1 on: November 24, 2016, 05:37:37 PM »
Hi,

I would suggest you to check the "Bevelling Corners in Adaptive or Count mode" tip shown in the chapter 8 - How to Fine Tune Corners of our Next Steps with RailClone guide.

As explained there more in detail, splitting Corners into an individual Generator is good workaround for these cases. Attaching a sample scene, where such work-flow is used and more advanced version using Expression to cover problematic angles. Hope you'll find it useful.

Best regards,

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #2 on: November 24, 2016, 06:04:02 PM »
Thanks for the response. This looks like it will work. I just need to analyze what you did and apply it to my definition. I'll report back once I give it a go. :-)

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #3 on: November 25, 2016, 05:40:27 PM »
I've taken a look at what you did in your example, but it only covers 1D arrays. I am using a 2D array (with a 90 degree X rotation to get multiple floors) and I cannot figure out any way to add padding for the corners without breaking the spline vertices. Thus, I still have a problem doing what I want to do using only one closed and welded spline. Any ideas on how to do this, or am I stuck using 2 splines? File attached for reference.

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #4 on: November 25, 2016, 09:01:10 PM »
Okay...I'm getting closer....Need help with the non-90 degree angles.  I will try to further dissect the file you sent earlier. :-)

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #5 on: November 29, 2016, 08:52:10 PM »
I'm getting close, but I am having issues with the interior corners. Can you take a look at my modified version of your file and provide assistance?  I've adjusted the pivots so that the building footprint (spline) determines the outer-most edge of the facade and I changed to 2D arrays for the generators so that I can create multiple floors.  I am thinking that I will have to create some conditional nodes that test the corner angles and do some trigonometry to reduce the blank segment x size, but I can't wrap my mind around it.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1582
Re: Feature Request - Generator spline vertices
« Reply #6 on: November 30, 2016, 06:47:38 PM »
Hi,

Please take a look at the attached file. It uses the same principles as in the previous post, but adapted to work with the A2S generator. To do this I made the following changes to the previous file.

- Changed the trigonometric function that calculates the size of the space so that it uses the segments size on the Z axis. This is necessary because the array is rotated by 90 degrees (So Segment's Y size is actually Z size)
- Changed all segment's Z Alignment to centre.
- Added a Y Offset parameter so that both arrays can be moved so that the spline defines an outside face.



I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Paul Roberts
iToo Software

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #7 on: December 01, 2016, 04:56:03 PM »
Thanks Paul,

I'll download and take a look and let you know how it goes. Thanks for your help!

Phil

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #8 on: December 01, 2016, 06:08:29 PM »
Hello Paul,

This helps tremendously, but there is an issue when the spline is closed. In all of your examples, the spline is open and all is well. If you use on a closed spline, there is weirdness around the first vertex of the spline. Any ideas?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1582
Re: Feature Request - Generator spline vertices
« Reply #9 on: December 01, 2016, 06:32:18 PM »
Hi,

There does seem to be an issue you're right. As a workaround add an extra vertex on a straight section, set it to first vertex and make sure it's a type that doesn't generate a corner. That seems to fix it.

Thanks.

Paul.
Paul Roberts
iToo Software

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #10 on: December 01, 2016, 07:56:42 PM »
Thanks Paul,

That works for now. Is this a bug in RailClone that can be fixed? Adding that extra vertex changes the panel sizes along that section of wall undesirably.

IJ2087

  • Jr. Member
  • **
  • Posts: 71
Re: Feature Request - Generator spline vertices
« Reply #11 on: March 07, 2018, 04:55:39 PM »
Hi,

There does seem to be an issue you're right. As a workaround add an extra vertex on a straight section, set it to first vertex and make sure it's a type that doesn't generate a corner. That seems to fix it.

Thanks.

Paul.

Hello Paul,

This BUG still seems to be present in the latest version of RC. Any chance of getting this fixed???

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1582
Re: Feature Request - Generator spline vertices
« Reply #12 on: March 09, 2018, 06:21:59 PM »
Hi,

Thanks for the note. We're looking into it. It's a rare problem that this style shows up where the final corner's angle appears not to be correctly calculated in expressions.

Thanks,

Paul
Paul Roberts
iToo Software