I have created a track by constructing points to form a polyline, and then sweeping around a curve that I selected in Rhino. I have done this for 2 rails (created a curve and an offset curve and used sweep 2 for both).
Now that I have the track on flat ground, I have created a point above the track where I want both the rails to rotate. I want to allow, at each section of the track selected, for it to rotate around the point above the track selected. I have sketched out how I would like this to look.
This is so that I can create a “banking angle” of the section at different points along the track. I want to be able to select a point, and for the rail to gradually bank until its at the target angle (at that point), and then at the next point, gradually return to flat.
Ok, first thing to say is that your profile generation is massively overcomplicated. When you have a handful of X and Y coordinates like this, you can just merge them in the right order and feed that into a single Construct Point component.
Once you have a simple profile object, you just use Perp Frames and Orient to copy the profile to each “station”. They can then be rotated into place. Here’s an example with a single bank angle transition:
Say there is a section of track that needs a banking angle (e.g. approaching a sharp corner), I want to be able to select either a point or multiple points that will bank to an angle which I choose to input. This banking will have a rotation centred around a point above the track.
Further to my point about it being “smooth”, I want to have a lead-in and lead-out of the banking angle just before the curve and just after, again within a range that I have selected.
So it will go like this:
Starting to approach the curve, the track starts to rotate (rotating around the centre curve above the track)
It will rotate until it has reached the point (or points) that I have specified to be the maximum banking angle.
Immediately after the curve, it will rotate until it is back to a flat (upright) position.
To answer your question, it most likely falls into: at specific locations chosen, specifying the points in the viewport.
Solution exception:The type initializer for ‘Grasshopper.Rhinoceros.Display.ModelDisplayMode’ threw an exception.
So I have directly referenced some points and aded sliders to adjust the angle at each one.
You should be able to disconnect my temporary setup and hook up the Query Model Objects.Then you can add as many bank angle Text Blocks as you like on the Angles layer. Note that a zero angle point is required just after the start point of the curve. This is highlighted with a circle. This process could be automated but I am very tired now
The method has the following blocks:
Collect the track and bank angle data and analyse each pair of angles to test for flat sections. Do a test for a closed or open track and modify the data a little accordingly.
The .3dm includes the track curve and the bank angle text blocks, as well as my temporary points, which you can delete once you have Query Model Objects working.