Splitting a beam

Hello,

How to make Split of a beam via GH in Tekla? Would like to split beams based on their length and provide beam splices afterwards.
Reckon that it is possible through C# script, but I am not much into it yet.

Thank you!

Hi Zezza, I guess you could replicate the Split command in Tekla by

  1. Reference in a beam to GH
  2. Deconstruct it to get the centerline
  3. Split that centerline
  4. Use one line segment as input to the Modify Beam component to modify the original beam
  5. Use the other segment with a Beam component to create a new beam
  6. The new beam could get its attributes straight from the deconstructed old beam

Cheers,

Sebastian

1 Like

Hello Sebastian,

Thank you for your reply!
I thought in the proposed direction, but the beam at first is connected to other elements, and those components get disturbed with this approach - they remain to be a part of the initial beam. Assemblies are incorrect.
Still more thinks in pure Split command in Tekla as it does nicely what I want, even when there are all the connections in place, they do not get disturbed.
I was trying to make a C# script (please do not laugh much, this is my first C# script ever). But effect is the same as with the approach that you proposed.
Not related to the matter, the script itself does not wanna take the middle point directly, and do not return the created beam after splitting, only the original one.
Please refer to the attached definition, I have take a part of your file “InsertConnections_Example” and modified the connection type to a seated one for better clarity. A snap from Tekla is atached as well.
Splice test.gh (24.5 KB)

I think the API command you found does the same thing as the ‘Split’ command in Tekla, i.e. it moves any connections to the new beam if necessary. It might just need a

new Tekla.Structures.Model.Model().CommitChanges();

after the Split call, to make sure the original beam gets modified (in the example script this probably happens anyway because of the other Tekla components).

The problem is that when the C# script runs, all the connections haven’t been placed yet and so the Split command can’t move them to the new beam. One solution in this case could be turn off “Run in Background” for the Component component to make sure that it completes before the C# component is solved.

image

Cheers,

Sebastian

Thank you, Sebastian!
Works as a charm now! And C# script gives two beams as a result properly. Though observed, that if I click Delete All Objects in Tekla this second beam after splitting is not getting deleted.
Now struggling with putting it into Grasshopper Component, there C# script is not getting resolved at the proper time - the splitted beam does not have any connections. I was trying to stop execution of the script via a Boolean toggle and Stream filter, does not help much. Any ideas on this?
Think to put splitting itself and subsequent beam splice connections into a separate definition. Not convenient, but, hope will do at least.

2 Likes

Ok small steps forward, that’s good!

“Delete All” will go through the Tekla components in the GH link, it can’t keep track of any other objects that might have been generated by your API code. What you could do instead is to collect your objects and all other model objects into a Model Object param, then use the right click option “Delete objects in Tekla” on that one.

It seems the Split command doesn’t move the connections to the new beam when executed within a Tekla plugin. You can try this manually as well by using the Split command from Tekla on an inserted plugin instance (using “Select objects in components” selection mode) - that doesn’t seem to work either.

Cheers,

-b

Thank you for Model Object advice, I so got used to “normal” delete button, did not think about the proposed way even.
Your observation is true. There is no result with manual way from Tekla. It seems to be the easiest workaround to have a separate definition for splits and splice connections. Once a structure is ready based on the main definition parameters from Grasshopper Component, then this component could be exploded in Tekla and the separate definition is to be used for playing with splits/splices.
Otherwise, have no more ideas. Though was doing for one splice directly in GH, by making separate lines before creating beams. But afterwards to many exercises are requried for groupoing of correct elements for connections, though still achievable. But if there is a possibility for different quantity of splices, then this way would not do.
Still wondering how Grasshopper Component pushes C# script for run and get split done though it should not work as per the definition (refer to the snap).

Hmm, that shouldn’t be the case looking at the pic - it would try to solve the C# component, but that component wouldn’t have any input to work with and so shouldn’t do anything.

If that Stream Filter switch is a recent addition, make sure the definition has been saved and that you’ve reloaded the definition from the GH component dialog in Tekla, and then made sure the Splice option is set to False in the UI before modifying.

Cheers,

-b

1 Like

This was somewhat an odd behavior even with proper saving/reloading/False mode. Copying to a new file helped eventually.
Now I am kind of happy with the achieved result, though it is a separate GH definition for split/splice, and exploding of the original “structure” component is required.
If it would be possible for you to implement Tekla Split command into GH itself one day, I would be happy to have it there.
Thank you a lot for your guidance, Sebastian!

1 Like