Itoo Software Forum

Author Topic: Corner problems for a city wall model  (Read 436 times)

byzantium1200

  • Newbie
  • *
  • Posts: 6
Corner problems for a city wall model
« on: December 29, 2017, 09:27:10 AM »
Hi, I have just started using R3 after 1.4 and I like it a lot so far. I have two problems that I have workarounds, but hope there are solutions to them. I am creating historic city walls for a huge project and have two issues:

1- The towers should be as little distorted as possible and the walls should try to adapt to them. But there will be gaps if I don't select bend & slice for the towers. I can minimize this by giving a fillet radius and using a central pivot. Then this fillet radius prevents me to use only corners for the corner rule (towers disappear for any non-zero value). Which also causes the second problem.

2- I want some corners not to have towers, I select Bezier-Corner from the Rules dropdown but I still have towers on both corners and bezier-corners, is this a bug or Bezier-Corner means both types of corners?. I can fix this later by breaking the vertex and later fixing the overlaps manually as shown in the image.

Thanks in advance.

byzantium1200

  • Newbie
  • *
  • Posts: 6
Re: Corner problems for a city wall model
« Reply #1 on: December 31, 2017, 08:56:17 AM »
If "Conditional" worked on the original spline not the one modified by Railclone this would solve the second problem.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: Corner problems for a city wall model
« Reply #2 on: January 02, 2018, 06:48:54 PM »
Hi,

Thanks for the questions.

Quote
1- The towers should be as little distorted as possible and the walls should try to adapt to them. But there will be gaps if I don't select bend & slice for the towers. I can minimize this by giving a fillet radius and using a central pivot. Then this fillet radius prevents me to use only corners for the corner rule (towers disappear for any non-zero value). Which also causes the second problem.

You are correct, when fillet is enabled the corner vertices are converted internally to Bezier Corner vertices (and the towers are removed if only Corner is selected). In fact Fillet operates on both Corner and Bezier corner vertices in the spline irrespective of the condition set in RailClone.

One solution is to use a different type condition to decide whether or not towers should appear. For example you could change the Material ID of the spline segment preceding a corner to determine whether or not a tower is present. Please see an example of this approach attached. It uses a Conditional Operator to detect if the Material ID is set to 1. If so a tower is used in the corner, if not an empty segment is used instead.

The only problem with this approach is that all the corners are still filleted and I suspect you need them to be bevelled. Mixing bevelled and filleted corners isn't currently possible in one generator.

Another solution therefore might be to manually fillet the vertices that need a tower and then divide the resultant segment to add a Bezier Corner. The bevelled corners should be left as Corner vertex types.

You can then use a conditional operator to add a tower on the Bezier Corner segments and leave a gap using an empty segment on the Corner segments. A second generator is used to add a bevelled corner segment to fill in the holes.

In the attached file you will see an example of this. I've used a Macro called adaptive corners that automatically outputs an empty segment or the correct size to create the gaps.

I hope that helps a little. Please let me know if you have any further questions.

All the best,

Paul
Paul Roberts
iToo Software

byzantium1200

  • Newbie
  • *
  • Posts: 6
Re: Corner problems for a city wall model
« Reply #3 on: January 05, 2018, 08:43:38 AM »
Thank you.