CQParts的螺母、螺栓和螺钉内容库

cqparts-fasteners的Python项目详细描述


部件

基本组件

它们中很少有自己有用的,它们被用来制造更复杂的零件。

头部

  • 反沉品种
  • 圆柱形品种
  • 外部驱动(如:六角头)
https://fragmuffin.github.io/cqparts/media/img/fasteners/heads-assorted.png

驱动类型

  • 十字形品种(如菲利普斯、弗雷森)
  • 十六进制(又名:艾伦)变种
  • 方形品种(如:单、双、三方形)
  • 开槽
  • 抗篡改品种
https://fragmuffin.github.io/cqparts/media/img/fasteners/drives-assorted.png

螺纹

包括标准螺纹:

  • ISO68(公制螺栓标准)
  • 三角形(例如:用于木螺钉)
  • 滚珠丝杠
https://fragmuffin.github.io/cqparts/media/img/fasteners/threads-assorted.png

任何自定义线程都可以通过从内部创建profile作为Wireprofile来构建 从基类Thread继承的对象。 (read more here

注意

线程当前被issue #1窃听。

线程目前被简化为一个圆柱体,直到这是固定的。

警告:用于三维打印时,在 错误已修复…如果要使用正确的格式,请+1解决此问题 线

外紧固件组件

  • 螺栓
  • 螺钉
https://fragmuffin.github.io/cqparts/media/img/fasteners/male-assorted.png

母扣件组件

  • 螺母
https://fragmuffin.github.io/cqparts/media/img/fasteners/female-assorted.png

实用程序

Fasteners实用程序集可用于自动应用紧固件 任意材料。

例如,对于以下两个已分派的块:

https://fragmuffin.github.io/cqparts/media/img/fasteners/fastener-detatched.png

可以将Fastener应用于这两个块,以将它们放在 有多种方法,参数也各不相同,例如以下两个示例:

https://fragmuffin.github.io/cqparts/media/img/fasteners/fastener-assorted.png

定制Fastener的更详细示例如下 documented here

https://fragmuffin.github.io/cqparts/media/img/fasteners/fastener-custom-assorted.png

目录

boltdepot

boltdepot.com有一个特殊的网站 他们产品的细节,足以为大多数人建立足够精确的三维模型 应用。

现在,这个图书馆的目录包含了 boltdepot.com产品类别:

  • 螺栓:boltdepot-bolts.json
  • 坚果:boltdepot-nuts.json
  • 木螺钉:boltdepot-woodscrews.json

其他供应商

随着对这个库兴趣的增加,我希望看到这个列表的增长,但是 此时,只是上面列出的目录。

示例

机用螺钉

我们可以创建一个具有许多调谐参数的紧固件,在本例中,我们将创建 一个M3机用螺钉,4毫米长,圆顶圆柱头,2毫米六角驱动:

from cqparts_fasteners.male import MaleFastenerPart

screw = MaleFastenerPart(
    head=('cheese', {
        'diameter': 4.5,
        'height': 1.5,
        'domed': True,
        'dome_ratio': 0.5,
    }),
    drive=('hex', {
        'depth': 1,
        'width': 2,
    }),
    thread=('iso68', {
        'diameter': 3,  # M3
    }),
    length=4,
)

from cqparts.display import display
display(screw)
https://fragmuffin.github.io/cqparts/media/img/fasteners/example-screw.png

目录Bolt

使用JSONCatalogue我们可以搜索其中的所有紧固件 适合某些参数的目录,如长度、直径、使用的任何东西 作为构建零件的参数。

在本例中,我们将显式定义产品的id,保证 只返回一个结果:

import os

from cqparts.catalogue import JSONCatalogue
import cqparts_fasteners

catalogue_filename = os.path.join(
    os.path.dirname(cqparts_fasteners.__file__),
    'catalogue',
    'boltdepot-bolts.json',
)
catalogue = JSONCatalogue(catalogue_filename)
item = catalogue.get_query()
bolt = catalogue.get(item.id == '221')

from cqparts.display import display
display(bolt)

这应该能为博尔特普顿的 product #221

https://fragmuffin.github.io/cqparts/media/img/fasteners/example-catalogue.png

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
使用Java将JSON转换为哈希映射   java如何通过使用MapStruct从源对象复制值来填充目标对象内部的映射?   注入泛型类型为@InjectGuice的类时发生java错误   字符串如何在JavaIDE中导入基本符号   在Java中将JSON转换为List<List<String>>   java Java9 HttpClient SSLHandshakeException   java jOOQ代码生成器   java如何调整图标(图像按钮),使其不会放大?   java我可以在使用Eclipse时安装2个或更多Android SDK吗   sqlite Java实现DAO   如何解决此错误?“java.lang.NoSuchFieldError:org.apache.http.conn.ssl.SSLConnectionSocketFactory上的实例。<clinit>。”   java Maven:将基于OSP的zip文件解压缩到WEBINF/lib   java如何在每次调用函数时获取当前gps位置?