使用 SkyCiv API 和 Python 进行参数化桁架建模

了解如何使用 SkyCiv API 对参数化桁架结构进行建模.
在本演练中, we’ll look at a way to model nodes, 支持, 成员, 负载, and many more using the SkyCiv API and Python.

See the Code
查看其他示例

Using the SkyCiv API

The SkyCiv Structural Analysis and Design API allows engineers to access all the features and functionality of SkyCiv software for their own solutions. 在这个例子中, we will be using Python.

Steel Silo Structure

如果我们有重复性任务,SkyCiv API 将是首选方法. 从长远来看,花更多时间从几个参数生成模型可以节省时间. 保存脚本以便一次又一次地为您的结构使用将可以节省大量时间!

Configure the SkyCiv API

我们需要按照以下步骤开始配置环境以使用 SkyCiv API:

  • 使用Python安装SkyCiv包 pip 安装 skyciv
  • 创建一个名为的新文件 主要.py
  • 进口 天空文明, 我们目前支持多种文件格式 数学 主文件中的包
Steel Silo Structure using Plates

有了这些包, 我们可以使用数学运算, 使用 JSON 美化器打印输出, 并使用 SkyCiv 请求与服务器通信脚本.

输入参数

我们可以在脚本中定义输入参数. 我们只会修改这些值, 该脚本必须创建所有节点, 成员, 支持, 以及我们结构中所需的元素. 在这个例子中, 我们需要声明 高度, 宽度, 和空间 在我们结构的上弦.

节点创建

我们可以去 文件资料 > s3d_model 对象 > 节点. 我们需要使用 x 来定义每个节点的坐标, 和, 和 z 位置. 在我们的脚本中定义了所有节点之后, 我们可以运行脚本并查看这些结果.

Design Steel Silo Structure

Supports and Sections

我们可以去 文件资料 > s3d_model 对象 > 支持. We need to define the ID of the node at which the support is located and the restraint code. 在这种情况下, we will use a fixed support FFFFFF in node 1, and a roller support 射频FRRR in node 3.

To create sections, we can load sections of the database, load custom data, define the properties of the section, and more options that you can check 这里. 在这个例子中, we will load a section from the database, specifically the 美国人 > 学会 > W shapes > W4x13.

Design Steel Silo Structure using Plates

Members creation

We can add members to our structure. 我们可以去 文件资料 > s3d_model 对象 > 成员. 对于我们的例子, it’s important to define the fixities of our members, 在这种情况下, as we are using truss elements we need to use FFFFRR, because we don’t want to transmit moments to other elements. We will define vertical, diagonal, 最佳, and bottom members for both the left and right sides of our truss.

steel silo design

Point Loads creation

我们可以去 文件资料 > s3d_model 对象 > 点荷载. 在我们的例子中, we will apply the point loads to our nodes. All the loads will be in the y direction, and the load group will be equal to DL. The nodes where we need to apply these loads are 1, 2, 3.

Point loads using the SkyCiv API

常问问题

每个 SkyCiv 用户都可以根据其帐户级别获得最大数量的 API 积分. 更多信息 这里.

SkyCiv 配置器解决方案是定制软件,允许制造商和工程师使用设计自动化更高效地进行设计. 想要查询更多的信息, 检查这个 链接

我们有SkyCiv 对于Python, 诚实是整个简历的最佳策略, 和 C#. 然而, 你可以 手动调用API 来自任何支持 HTTP 请求的语言.

相关教程