# 3.8.15: 借助缝合连接梁 (Connecting Beams with Stitches) 🔷

**“Stitches（缝合）”**&#x591A;元运算器具有三种状态，分别对应于三种不同的连接类型。用户可以通过运算器底部的下拉列表选择具体类型。

## 简单缝合 (Simple Stitch)

![图3.8.15.2：“Simple Stitch（简单缝合）”映射具有与图3.8.13.1相同的设置，但其随机连接数为15个](/files/-M9XuWV6CauWh7_q89_z)

**“Simple Stitch（简单缝合）”**&#x6620;射连接两个或更多具有桁架或梁单元的梁的集合。可通&#x8FC7;**“Stitches（缝合）”**&#x591A;元运算器组件获得。输入端&#x53E3;**“BeamSets（梁的集合）”**&#x9700;要一个梁的集合列表，依照其列出的顺序连接。可重复输入集合。通&#x8FC7;**“NConnect”**&#x53EF;以设置连接的数量。每个梁的集合和连接都需要一个参数来指定映射。参数的数值范围应为零至一：0是梁的集合的起始位置，1是梁的集合的结束位置。如果用户无法为映射器提供足够数量的参数，它将变为红色。阅读其报错消息以查看需要多少参数。输入端&#x53E3;**“Beam Id”**&#x53EF;用于定义连接元素的名称。图3.8.15.2显示了一个由30个随机选择的参数产生的具有15个连接的结构。

这&#x79CD;**“simple（简单）”**&#x7F1D;合模式也是用途最广泛的一种：通过定义如何将一组参数映射到一组被输入至“Simple Stitch（简单缝合）”的值的方式，为用户生成连接模式时提供了极大的自由度。**“Proximity Stitch（接近缝合）”**&#x548C;**“Stacked Stitch（堆叠缝合）”**&#x6A21;式限制了潜在的模式范围。在使用Galapagos等进行优化的情况下，可以加快收敛速度，省去了编写程序的工作，但&#x4E0E;**“Simple Stitch（简单缝合）”**&#x76F8;比，这两种方式缺乏充分的灵活性。

## 接近缝合 (Proximity Stitch)

![图3.8.15.1：“Proximity Stitch（接近缝合）”映射具有与图3.8.13.1相同的设置，但随机连接数为10个](/files/-M9XuWV8se9M0KkDt4Ni)

**“Proximity Stitch（接近缝合）”**&#x662F;经过修改&#x7684;**“Simple Stitch（简单缝合）”**：如果使用n个梁的集合，则应由n个参数的元组来描述一个连接。所有参数都在\[0，1]范围内。第一个值$$p\_1$$设置第一个梁集合上的相对位置$$l\_1$$。其后所有的参数$$p\_n$$relate to the restricted interval $$\[l\_{n-1}-min\_{Offset} ,l\_{n-1}+max\_{Offset}]$$相关联。用户可以在此处定&#x4E49;**“minOffset（最小偏移）”**&#x548C;**“maxOffset（最大偏移）”**。它们定义的间隔越窄，结构会越规则。

## 堆叠缝合 (Stacked Stitch)

![图3.8.15.3：“Stacked Stitch（堆叠缝合）”映射具有与图3.8.13.1相同的设置，但随机连接为15个](/files/-M9XuWVBpvNBMObTJ_jN)

**“Stacked Stich（堆叠缝合）”**&#x8FD0;算器的工作原理&#x4E0E;**“Simple Stitch（简单缝合）”**&#x76F8;同。其不同之处在于，它以确保两个连接元素不会相互交叉（如图3.8.15.3）的方式将给定的参数映射到几何形体。输入端口&#x7684;**“unevenness（不均匀性）”**&#x53EF;用于微调结果的平均不规则性。零表示完全平整：连接元件沿梁的集合放置的距离均等（根据相应的梁的集合参数）。**“unevenness（不均匀）”**&#x7684;值越大，连接元素的布局越不规则。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual-1-3.karamba3d.com/chinese_1_3_3/3-in-depth-component-reference/3.8-utilities/3.8.15-connecting-beams-with-stitches.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
