Exporting Support Points / Conditions to Excel

Hi All,

(ENGLISH)

This is mostly a Teddy / Results question; however, I am also using Rhino and Grasshopper for Sofistik if that is important. I am currently trying to export the support points / lines and their constraint conditions into an excel file, but I have not been able to find the information for the support points in the results file that Sofistik automatically generates. I can find the node numbers of the fixed points, but I cannot find which fixation conditions (i.e. F, LPP, LPPMX, etc.) these points have, which is important since I have multiple different support types in my model. I think there must be a way to get this information out of Sofistik somehow, so if anyone knows a way, please let me know! Ideally, I would also like to be able to write a PROG file in Teddy that would allow me to automatically export this data, which I have done before for quad, beam, node elements before.

(DEUTSCH - DEEPL)

Dies ist hauptsächlich eine Teddy / Results Frage; allerdings benutze ich auch Rhino und Grasshopper für Sofistik, falls das wichtig ist. Ich versuche gerade, die Stützpunkte / Linien und ihre Fixierungsbedingungen in eine Excel-Datei zu exportieren, aber ich kann die Informationen für die Stützpunkte nicht in der Ergebnisdatei finden, die Sofistik automatisch erzeugt. Ich kann die Knotennummern der Fixpunkte finden, aber ich kann nicht herausfinden, welche Fixierungsbedingungen (z.B. F, LPP, LPPMX, usw.) diese Punkte haben, was wichtig ist, da ich mehrere verschiedene Stützentypen in meinem Modell habe. Ich denke, es muss einen Weg geben, diese Informationen irgendwie aus Sofistik herauszubekommen, wenn also jemand einen Weg kennt, lassen Sie es mich bitte wissen! Idealerweise würde ich auch gerne in der Lage sein, eine PROG-Datei in Teddy zu schreiben, die es mir ermöglicht, diese Daten automatisch zu exportieren, was ich bereits für Quad-, Balken- und Knotenelemente getan habe.

Best,

Grant

Hello, Grant.
Here is a code for Teddy from examples.
C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\interfaces\examples\cadinp
I’ve modified it a bit.
Run it and go to Report file.

There you will see a list of nodes and their constraints. Constraints are represented as an integer, which, when converted to binary, becomes a bitmask like 0011111. For example, 127 is a free node. Hope this helps.

+prog template urs:5
head all nodes
let#cdb_ier 0

@key node
loop
   let#num @(nr)
   let#ff @(kfix)
   if #cdb_ier<2
     txb   #(#num,0)  #(#ff,0)
   endif
endloop #cdb_ier<2
end
1 Like

Thanks Kirill! This is exactly what I was looking for.

Also, for anyone else who finds this thread, I used Python to decode the integers into the text-based support constraints. You can follow along at the following link, or see the code copied below.

https://www.sofistik.de/documentation/2020/en/cdb_interfaces/python/examples/python_example3.html

If you want more information about what the bitmasks mean, you can look in the cdbase.chm file under SOFiSTiK Data > Nodes > KFIX. The cdbase.chm file can be found in the following folder: C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020

Convert integers to bitmasks

intList = iInts
binList = []

for i in range(len(iInts)):
    binList.append('{0:011b}'.format(iInts[i]))

oBins = binList

OR

Decode integers to constraints

import string

intList = iInts
fixList = []

for i in range(len(intList)):
    
    x = 1
    result = intList[i] #input te KFIX value here
    value = "PXPYPZMXMYMZ"
    
    x = 64 & result
    if x > 0:
       value = "PXPYPZMXMYMZ"
    
    x = 32 & result
    if x > 0:
       value = string.replace(value, "MZ", "")
    
    x = 16 & result
    if x > 0:
       value = string.replace(value, "MY", "")
    
    x = 8 & result
    if x > 0:
       value = string.replace(value, "MX", "")
    
    x = 4 & result
    if x > 0:
       value = string.replace(value, "PZ", "")
    
    x = 2 & result
    if x > 0:
       value = string.replace(value, "PY", "")
    
    x = 1 & result
    if x > 0:
       value = string.replace(value, "PX", "")
    
    # Replace the text
    value = string.replace(value, "PXPYPZ", "PP")
    value = string.replace(value, "MXMYMZ", "MM")
    value = string.replace(value, "PYPZ", "XP")
    value = string.replace(value, "PXPZ", "YP")
    value = string.replace(value, "PXPY", "ZP")
    value = string.replace(value, "MYMZ", "XM")
    value = string.replace(value, "MXMZ", "YM")
    value = string.replace(value, "MXMY", "ZM")
    value = string.replace(value, "PPMM", "F")
    
    fixList.append(value)


oFixs = fixList
2 Likes

Hello @ggalloway,

I’m also attempting to achieve similar results with sofistik cdb using python. Can you please guide me on how to use “PPMX” and “XPMX” results from python code for filtering purposes?

Since I am not a structural engineering expert, I am unfamiliar with these acronyms. I have posted my question on the SOFiSTiK forum How to identify columns in 3D system using CDB with python - SOFiSTiK - SOFiSTiK Forum. Any assistance would be greatly appreciated.

Best regards, Kuladeep

Hi @Kuladeep,

I’m not exactly sure what your question is, but if you need help understanding the acronyms, I would suggest looking through the Sofistik documentation, specifically, this page from the SOFIMSHC document:

You can see in my code how I translate the literal decoded fixations into the Sofistik shorthand acronyms with the following script (which gives you some insite into what PP and XP mean, for example):

 # Replace the text
    value = string.replace(value, "PXPYPZ", "PP")
    value = string.replace(value, "MXMYMZ", "MM")
    value = string.replace(value, "PYPZ", "XP")
    value = string.replace(value, "PXPZ", "YP")
    value = string.replace(value, "PXPY", "ZP")
    value = string.replace(value, "MYMZ", "XM")
    value = string.replace(value, "MXMZ", "YM")
    value = string.replace(value, "MXMY", "ZM")
    value = string.replace(value, "PPMM", "F")

I hope this helps.

-Grant

1 Like