Пример #1
0
def sweepCurve(surface, curve, *args, **kwargs):
    """ Creates a volume by sweeping a surface along an arbitrary curve
    :param surface: source surface
    :param curve: sweep curve
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: create volume
    """
    _system.cubitCmd('Sweep surface {0} along curve {1} {2} {3}'.format(surface.id(), curve.id(),
                                                                        _functions.listStr(args),
                                                                        _functions.listKeywordString(kwargs)))
    return _transform.getLastBody()
Пример #2
0
def sweepCurve(surface, curve, *args, **kwargs):
    """ Creates a volume by sweeping a surface along an arbitrary curve
    :param surface: source surface
    :param curve: sweep curve
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: create volume
    """
    _system.cubitCmd('Sweep surface {0} along curve {1} {2} {3}'.format(
        surface.id(), curve.id(), _functions.listStr(args),
        _functions.listKeywordString(kwargs)))
    return _transform.getLastBody()
Пример #3
0
def intersect(bodies, *args, **kwargs):
    """ Create the logical AND of bodies

    :param bodies: list of bodies
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: intersected body
    """
    _system.cubitCmd('intersect {0[0]} {0[1]} {1} {2}'.format(
        _functions.listIdString(bodies), _functions.listStr(args),
        _functions.listKeywordString(kwargs)))
    return _transform.getLastBody()
Пример #4
0
def intersect(bodies, *args, **kwargs):
    """ Create the logical AND of bodies

    :param bodies: list of bodies
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: intersected body
    """
    _system.cubitCmd('intersect {0[0]} {0[1]} {1} {2}'.format(_functions.listIdString(bodies),
                                                              _functions.listStr(args),
                                                              _functions.listKeywordString(kwargs)))
    return _transform.getLastBody()
Пример #5
0
def sweepVector(surface, vector, *args, **kwargs):
    """ Creates a volume by sweeping a surface along an arbitrary curve
    :param surface: source surface
    :param vector: vector in tuple form
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: create volume
    """
    _system.cubitCmd(
        'Sweep surface {0} vector {1[0]} {1[1]} {1[2]} {2} {3}'.format(
            surface.id(), vector, _functions.listStr(args),
            _functions.listKeywordString(kwargs)))
    return _transform.getLastBody()
Пример #6
0
def sweepVector(surface, vector, *args, **kwargs):
    """ Creates a volume by sweeping a surface along an arbitrary curve
    :param surface: source surface
    :param vector: vector in tuple form
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: create volume
    """
    _system.cubitCmd('Sweep surface {0} vector {1[0]} {1[1]} {1[2]} {2} {3}'.format(surface.id(), vector,
                                                                                    _functions.listStr(args),
                                                                                    _functions.listKeywordString(
                                                                                        kwargs)))
    return _transform.getLastBody()
Пример #7
0
def sweepDirection(surface, distance, direction='z', *args, **kwargs):
    """
    :param surface: source surface
    :param distance: distance to sweep
    :param direction: direction: x, y, z, negative: nx, ny, nz
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: created volume
    """
    _system.cubitCmd(
        'sweep surface {0} direction {1} distance {2} {3} {4}'.format(
            surface.id(), direction, distance, _functions.listStr(args),
            _functions.listKeywordString(kwargs)))
    return _transform.getLastBody()
Пример #8
0
def sweepDirection(surface, distance, direction='z', *args, **kwargs):
    """
    :param surface: source surface
    :param distance: distance to sweep
    :param direction: direction: x, y, z, negative: nx, ny, nz
    :param args: additional parameters for the command: 'option'
    :param kwargs: additional parameter value pairs: option=value
    :return: created volume
    """
    _system.cubitCmd('sweep surface {0} direction {1} distance {2} {3} {4}'.format(surface.id(), direction, distance,
                                                                                   _functions.listStr(args),
                                                                                   _functions.listKeywordString(
                                                                                       kwargs)))
    return _transform.getLastBody()