cqparts的杂项内容库

cqparts-misc的Python项目详细描述


部件

灵长类形状

快速构建或测试想法的灵长类形状

  • 立方体
  • 球体
  • 气缸

指标

在开发过程中,这些组件可以作为一种方法用于部件中 调试部件位置,并演示Mate坐标系。

  • 坐标系指示器
  • 平面指示器
https://fragmuffin.github.io/cqparts/media/img/misc/indicators.png

示例

在灵长类动物上使用指示符

为了说明如何使用煽动者来显示MatePart,我们将创建一个简单的Assembly

import cqparts
from cqparts.constraint import Fixed, Coincident

from cqparts_misc.basic.indicators import CoordSysIndicator
from cqparts_misc.basic.primatives import Box


class MyAsm(cqparts.Assembly):
    def make_components(self):
        return {
            'box': Box(length=30, width=20, height=10),
            'indicator': CoordSysIndicator(),
        }

    def make_constraints(self):
        return [
            Fixed(self.components['box'].mate_origin),  # fix at world origin
            Coincident(
                self.components['indicator'].mate_origin,
                self.components['box'].mate_neg_y,
            ),
        ]


from cqparts.display import display
display(MyAsm())
https://fragmuffin.github.io/cqparts/media/img/misc/example-coordsys-indicator.png

从这里我们可以看到mate_neg_ymate有:

  • 其Z轴沿世界-Y轴,
  • 它的X轴沿着世界Z轴。

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

推荐PyPI第三方库


热门话题
Java中是否有数字的默认类型   java调用一个类的方法来使用另一个类的实例   java HtmlUnit不适用于javascript处理   java需要帮助才能连接MongoDB   java如何从Maven中的src/main/resources复制文件?   java保存Int值(共享首选项)   从另一个类调用方法时,java Autowired组件出现空指针异常   java Spring JPA:PropertyAccessException 1:。。。MethodInvocationException:。'driverClassName'。。。org/postgresql/Driver:不支持的专业。次要版本52.0   java使用增强的JDO模型类在Eclipse中运行Junit测试   java如何使用eclipse IDE为junit创建可运行的jar文件   java如何在安卓中检测应用程序的启动和退出   java在其他线程可以访问静态映射时从数据库更新静态映射   java@Entitty和@EntityScan不起作用。我正在使用SpringBoot和jpa存储库,发生了很多次   java如何与google日历集成?