Exemplo n.º 1
0
def ecope():
    """ecope"""
    data = ecope_data

    # modify a skin to add nervures and ecope
    # TODO
    skin = profiles.skin_item(rd.case_parachute['len'] + profiles.bague_data['thick'])

    return skin
Exemplo n.º 2
0
def skin_draw(doc):
    """draw each skin items"""
    # lower fin skins
    # TODO

    # upper fin skins
    offset = profiles.fins_data['len'] / 2
    for i in range(3):
        comp = profiles.skin_item(propulsor.propulsor_data['len'] - profiles.fins_data['len'] / 2 + profiles.bague_data['thick'])
        comp.translate(Vector(0, 0, offset))
        comp.rotate(Vector(0, 0, 0), Vector(0, 0, 1), 120 * i)
        doc.addObject("Part::Feature", 'upper fin skin %d' % i).Shape = comp

    # equipement skins
    offset = propulsor.propulsor_data['len'] + profiles.bague_data['thick'] + profiles.disque_data['thick']
    for i in range(3):
        comp = profiles.skin_item(rd.case_equipement['len'] + profiles.bague_data['thick'])
        comp.translate(Vector(0, 0, offset))
        comp.rotate(Vector(0, 0, 0), Vector(0, 0, 1), 120 * i)
        doc.addObject("Part::Feature", 'equiment skin %d' % i).Shape = comp

    # parachute skins
    offset += rd.case_equipement['len'] + profiles.bague_data['thick'] + profiles.disque_data['thick']
    for i in range(3):
        comp = parachute.ecope()
        comp.translate(Vector(0, 0, offset))
        comp.rotate(Vector(0, 0, 0), Vector(0, 0, 1), 120 * i)
        doc.addObject("Part::Feature", 'parachute skin %d' % i).Shape = comp

    # lower cone skins
    offset += rd.case_parachute['len'] + profiles.bague_data['thick'] + profiles.disque_data['thick']
    for i in range(3):
        comp = profiles.skin_item(profiles.profile_data['len'] - offset)
        comp.translate(Vector(0, 0, offset))
        comp.rotate(Vector(0, 0, 0), Vector(0, 0, 1), 120 * i)
        doc.addObject("Part::Feature", 'lower cone skin %d' % i).Shape = comp