斜齿轮结构:带自旋(扭曲)的扫掠轮廓

Helical Gear Construction: Sweep Profile with Spin (twist)

The goal is to produce a so called helical gear

如下图所示:

我已经完成了配置文件生成(TopoDS_Wire --> TopoDS_Face 使用 BRepBuilderAPI_MakeFace)- 描绘了齿轮顶部的面。

我认为任务是沿穿过中间钻孔的齿轮轴线性扫过face/wire,同时将面旋转一个恒定角度定义螺旋角,直到达到所需的齿轮高度...

我考虑过使用 GeomFill_PipeBRepOffsetAPI_MakePipeShell 但我不知道如何使用它...

能否请您看看并分享任何可能对我有帮助或至少让我朝着正确的方向进行调查的想法/代码片段?

非常感谢任何愿意帮助我的人...

不幸的是,在我自己找到解决方案之前,没有人回复。在这里,因为它可能会帮助其他人有一天面临同样的问题...

算法说明:

齿圈宽度分为几个等级 (nSteps)。对于每一步,所需的旋转角度和平移使用以下公式计算:

rotation_angle = atan( b_TranslationStep * CONST_FACTOR )

在哪里 b_TranslationStep 是轮辋宽度,对应于计算的步长,

CONST_FACTOR = 2 * tan( beta ) / d_a

在哪里 beta为斜齿轮螺旋角 d_a为外圆直径 使用应用于轮辋轮廓的旋转和平移变换,创建定义轮辋形状的截面线。完成后,BRepOffsetAPI_ThruSections 使用截面线生成斜齿轮原始轮辋形状。

齿轮轮廓面在 XY 平面中构造,而齿轮的轴线与 Z 轴对齐。 GearProfile 是之前构建的,是一个封闭的线 "containing" 所有的齿。

执行:

/* TopoDS_Wire GearProfile is constructed previously - out of the question scope */
TopoDS_Shape HelicalGearRim( const TopoDS_Wire & GearProfile )
{
    double ToothFaceWidth = 10e-3; /* 10mm */
    double HelixAngle = 0.349; /* [rad] --> 20deg */
    double OutsideDiameter = 42e-3; /* 42mm */
    int nSteps = 10;

    /* Make solid with the faces interpolated */
    BRepOffsetAPI_ThruSections tShapeGen( Standard_True, Standard_False );

    /* Instantiate rim profile transformations */
    gp_Trsf RimProfileRotation;
    gp_Trsf RimProfileTranslation;

    /* Initially add the first section wire - the original rim profile */
    tShapeGen.AddWire( RimProfile );

    /* Calculate translation step equal to tooth face width divided by required number of steps */
    const double TranslationStep = ToothFaceWidth / nSteps;

    /* Constant part of rotation angle calculation is referred as factor */
    const double Factor = 2.0 * std::tan( HelixAngle ) / OutsideDiameter;

    /* Calculate rotation angle and translation for each step */
    for( int i = 1; i <= nSteps; i++ )
    {
        /* Setup rotation for current step */
        RimProfileRotation.SetRotation( gp::OZ(), std::atan( i * TranslationStep * Factor ) );

        /* Setup translation for current step */
        RimProfileTranslation.SetTranslation( gp_Vec( 0.0, 0.0, ( i * TranslationStep ) ) );

        /* Apply the transformations */
        BRepBuilderAPI_Transform RotationTransformer( RimProfile, RimProfileRotation );
        BRepBuilderAPI_Transform TranslationTransformer( RotationTransformer.Shape(), RimProfileTranslation );

        /* Add generated wire of current step section */
        tShapeGen.AddWire( TopoDS::Wire( TranslationTransformer.Shape() ) );
    }

    /* Generate the shape out of the section wires created previously */
    return( tShapeGen.Shape() );
}

上面的实现不能独立运行,但在我的应用程序中进行了测试并证明可以正常工作。它可能对任何寻找斜齿轮形状构造原理的人有所帮助......见截图上的结果:

希望这对某人有所帮助。干杯马丁