Elvas Tower: Bounding Box Issue - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Bounding Box Issue Has OR Dropped the use of the .SD files? Rate Topic: -----

#1 User is offline   Greg Davies 

  • Apprentice
  • Group: Status: First Class
  • Posts: 21
  • Joined: 08-December 09
  • Gender:Male
  • Location:Olathe, Kansas
  • Country:

Posted 17 November 2015 - 07:52 AM

Let me first apologize if this questions has already been asked and answered, I sure can't find it.

My problem is this, I have some equipment where the center of the shape file is not the true center. As such, the distance from center to the front is not the same as the distance from the center to the rear. I am having trouble getting the equipment to couple properly using the Size() function, where the front will couple but the rear leaves a gap. In MSTS the .SD file could be used to compensate for this issue via the Bounding Box but it does not appear the .SD file is being used in OR?

Is there a new parameter that we can use in the Wagon() Section for locomotives and cars that we can use to adjust the coupling distance when the center of the shape file is not really the actual center? In other words, the Size() function allows for an X, Y and Z parameter where Z is the total length of the equipment. If the center of the shape file is the actual center, then adjustments can be made so the equipment couples properly. But if the center of the shape file is off, then you can get one end to couple properly but not the other.

Please point me in the right direction.

Greg Davies

#2 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,146
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 17 November 2015 - 08:00 AM

The bounding box in MSTS is used to calculate collision positions. Make it too long and you cannot couple, make it too wide and you can have a collision with stock on an the line beside you. Open Rails uses the size line to determine those conditions. Can you give some example files for investigation.

#3 User is offline   burgerbern 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 493
  • Joined: 26-May 06
  • Gender:Male
  • Location:UK
  • Simulator:ORTS
  • Country:

Posted 17 November 2015 - 11:02 AM

search for the tutorial "Dealing With Oddly-Spaced Wagons (the Centre of Gravity Fix)" on the steam4me site will show you how to fix this in the .eng file it does not use the sd file at all for this method.

#4 User is offline   Greg Davies 

  • Apprentice
  • Group: Status: First Class
  • Posts: 21
  • Joined: 08-December 09
  • Gender:Male
  • Location:Olathe, Kansas
  • Country:

Posted 18 November 2015 - 07:40 PM

The CentreOfGravity does not seem to work in OR as well. Probably dropped in the conversion as being unnecessary. Back to the original issue. I will try and find a freeware example to post here as the example I am working with is payware and I am not going to upload it as others will have access to the files.

I might suggest that the Size() function be expanded to allow 3 or 4 parameters, X, Y and Z or X, Y, Za and Zb. Za + Zb = Z. This would allow for the Center of the Shape to be in another location other than the true center.

Greg

#5 User is offline   Sid P. 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 463
  • Joined: 12-February 13
  • Gender:Male
  • Location:Canada
  • Simulator:Open Rails / MSTS
  • Country:

Posted 19 November 2015 - 07:23 AM

There is an article "How to Set a Bounding Box" on the TrainSim site, at
http://www.trainsim....-A-Bounding-Box
that may be of interest. Look under the tab "Articles/ How To" on the main page.

Cheers,

#6 User is offline   Greg Davies 

  • Apprentice
  • Group: Status: First Class
  • Posts: 21
  • Joined: 08-December 09
  • Gender:Male
  • Location:Olathe, Kansas
  • Country:

Posted 19 November 2015 - 04:16 PM

Interesting article. I could have used that years ago when I was having issues with Bounding Boxes but today we are in Open Rails and Open Rails, it appears, does not use the .sd file to determine the Bounding Box any longer. Rather, it seems, the Size() function values are used and there is where the problem is.

From what I have been able to determine, an assumption was made that every shape file's center point is really in the center of the shape file. I have a shape file where that is not the case and as a result I can get one coupler adjusted correctly but then the other has a gap. I want to see if there is a solution at hand before I create a request for a change in the application.

Greg

#7 User is offline   Greg Davies 

  • Apprentice
  • Group: Status: First Class
  • Posts: 21
  • Joined: 08-December 09
  • Gender:Male
  • Location:Olathe, Kansas
  • Country:

Posted 21 November 2015 - 01:29 PM

Problem solved. There is no need to create a solution in OR. The solution is to use the Shape File Manager application that was created by Decapod several years ago. Current version is 2.5 and is available on Train-Sim. It took me a couple of minutes to think about the possibility of fixing the problem in the shape file itself.

This is how I devised a solution. Within the shape file itself, there is no "center" as such, but it can be calculated. Simply take the max and min Z values in the Points Section, which is what the Shape Viewer application does when you want to see the Bounding Info for a shape. For my specific problem, I needed to adjust the Z axis. The original Bounding Box was set as follows -

ESD_Bounding_Box( -1.744779 0.036100 -10.436934 1.731379 4.727739 10.142363 )

which means the "center" of the shape file is not zero since the min and max Z values are not the same number. In this case the values are off by 0.294571, enough to cause problems coupling and viewing in OR. So I thought, since OR does not use the .sd file as MSTS did the adjustment needs to be made within the shape file itself, so what if I use Shape File Manager to "SHIFT" the Z values by half the difference. It worked perfectly. Now the units are coupled together without any gaps.

That is thinking outside of the Bounding Box.......I couldn't help it.

Greg

#8 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 21 November 2015 - 03:02 PM

View PostGreg Davies, on 21 November 2015 - 01:29 PM, said:

Problem solved. There is no need to create a solution in OR.

We should probably fix it in OR anyway, if it's not too much trouble. I think all we need to do is to offset the visual shape by the CentreOfGravity (or the inverse of it), which should be really easy to do. The bounding box is not necessary/relevant to OR as we have no rigid body physics and coupling is simply done at the edge of the (logical, not visual) shape (modulo some values from the coupling in the wagon file, I guess).

View PostGreg Davies, on 21 November 2015 - 01:29 PM, said:

That is thinking outside of the Bounding Box.......I couldn't help it.

I groaned. :p

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users