cqparts的杂项内容库
cqparts-misc的Python项目详细描述
部件
灵长类形状
快速构建或测试想法的灵长类形状
- 立方体
- 框
- 球体
- 气缸
指标
在开发过程中,这些组件可以作为一种方法用于部件中 调试部件位置,并演示Mate坐标系。
- 坐标系指示器
- 平面指示器
示例
在灵长类动物上使用指示符
为了说明如何使用煽动者来显示Mate在 Part,我们将创建一个简单的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())
从这里我们可以看到mate_neg_ymate有:
- 其Z轴沿世界-Y轴, 它的X轴沿着世界Z轴。