0

目標は、いわゆるはすば歯車を製造することです

下の図に示すように:

ここに画像の説明を入力

プロファイルの生成を完了しました ( TopoDS_Wire--> TopoDS_Faceusing BRepBuilderAPI_MakeFace) - 描かれている歯車の上の顔。

タスクは、目的のギアの高さに達するまで、ねじれ角を定義する一定の角度で面を回転させながら、中央のドリル穴を通過するギア軸に沿って面/ワイヤを直線的にスイープすることだと思います...

GeomFill_Pipeorを使おうと思っBRepOffsetAPI_MakePipeShellたのですが、使い方がわかりません...

私を助けてくれるかもしれない、または少なくとも調査のために正しい方向に私を蹴るのに役立つかもしれないアイデア/コードスニペットを見て共有していただけますか?

私を助けてくれる人に前もって感謝します...

4

1 に答える 1

1

残念ながら、自分で解決策を見つけるまで誰も返信しませんでした。これは、ある日同じ問題に直面している他の誰かを助けるかもしれないということです...

アルゴリズムの説明:

ここに画像の説明を入力

ギアのリム幅は数段階に分かれています(nSteps)。各ステップで、必要な回転角度と平行移動は次の式を使用して計算されます。

rotation_angle = atan( b_TranslationStep * CONST_FACTOR )

b_TranslationStep計算されたステップに対応するリム幅はどこに ありますか、

CONST_FACTOR = 2 * tan( beta ) / d_a

ここ betaで、はすば歯車のねじれ角 d_aは円の外径です。リム プロファイルに適用された回転および並進変換を使用して、リム形状を定義するセクション ワイヤが作成されます。完了したら、セクション ワイヤを使用しBRepOffsetAPI_ThruSectionsて、はすば歯車の生のリム形状を生成します。

歯車のプロファイル面は、歯車の軸が Z 軸と整列している間、XY 平面で構築されます。GearProfile は以前に作成され、すべての歯を「含む」閉じたワイヤーです。

実装:

/* 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() );
}

上記の実装はスタンドアロンでは実行できませんが、私のアプリでテストされ、動作することが証明されています。はすば歯車の形状がどのように構築されるかの原理を探している人には役立つかもしれません...スクリーンショットの結果を参照してください。

ここに画像の説明を入力

これが誰かに役立つことを願っています。乾杯マーティン

于 2016-09-13T07:15:24.187 に答える