This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
rsa_lib_path = ( | |
r'C:\Program Files\Autodesk\Robot Structural Analysis Professional 2023' | |
r'\Exe\Interop.RobotOM.dll' | |
) | |
clr.AddReference(rsa_lib_path) | |
clr.setPreload(True) # Preloading the namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import platform | |
from subprocess import check_output, PIPE, CalledProcessError | |
# Linux man page for `/proc`: | |
# http://man7.org/linux/man-pages/man5/proc.5.html | |
# Windows documentation for `wmic OS`: | |
# https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/cim-operatingsystem | |
# MacOS man page for `sysctl`: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
from scipy import interpolate | |
from scipy.optimize import curve_fit | |
import numpy as np | |
def func(r, kb, b0): | |
return kb * (r - b0)**2 | |
# This function generates total functions for a given number of objects | |
def total_factory(n): |