青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

eryar

PipeCAD - Plant Piping Design Software.
RvmTranslator - Translate AVEVA RVM to OBJ, glTF, etc.
posts - 603, comments - 590, trackbacks - 0, articles - 0

OpenCASCADE Trihedron Law

Posted on 2018-04-03 23:17 eryar 閱讀(2281) 評論(3)  編輯 收藏 引用 所屬分類: 2.OpenCASCADE

OpenCASCADE Trihedron Law

eryar@163.com

Abstract. In differential geometry the Frenet-Serret formulas describe the kinematic properties of a particle moving along a continuous, differentiable curve in 3d space, or the geometric properties of the curve itself irrespective of any motion. More specifically, the formulas describe the derivatives of the so-called Tangent, Normal and Binormal unit vectors in terms of each other. 

Key Words. Frenet-Serret Frame, TNB frame, Trihedron Law

1. Introduction

參數(shù)曲線上的局部坐標(biāo)系,也稱為標(biāo)架Frame,OpenCASCADE中叫Trihedron。這個(gè)局部坐標(biāo)系隨著曲線上點(diǎn)的運(yùn)動(dòng)而運(yùn)動(dòng),所以也稱為活動(dòng)坐標(biāo)系。活動(dòng)坐標(biāo)系中各坐標(biāo)軸的選取:

l T是參數(shù)曲線的切線方向;

l N是曲線的主法線方向,或稱主法矢;主法矢總是指向曲線凹入的方向;

l B是副法矢;當(dāng)T 和N確定后,通過叉乘即得到B。

wps_clip_image-12476

Figure 1. T, N, B frame of a curve (from wiki)

定義一個(gè)活動(dòng)標(biāo)架有什么作用呢?把這個(gè)問題先保留一下。本文先介紹OpenCASCADE中的標(biāo)架規(guī)則Trihedron Law。

2.Trihedron Law

在OpenCASCADE中,類GeomFill_TrihedronLaw定義了曲線活動(dòng)標(biāo)架。其類圖如下所示:

wps_clip_image-18899

Figure 2. Trihedron Law define Trihedron along a Curve

從基類GeomFill_TrihedronLaw派生出了各種標(biāo)架,如:

l GeomFill_Fixed:固定的活動(dòng)動(dòng)標(biāo)架,即標(biāo)架沿著曲線移動(dòng)時(shí),標(biāo)架的三個(gè)方向是固定的;

l GeomFill_Frenet: Frenet標(biāo)架;

l GeomFill_Darboux :Darboux標(biāo)架;

l GeomFill_ConstantBiNormal:副法矢固定的標(biāo)架;

3. Code Demo

下面通過示例代碼來顯示出曲線上的Frenet標(biāo)架,GeomFill_TrihedronLaw子類的用法類似。

/*
Copyright(C) 2018 Shing Liu(eryar@163.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/


#include <TColgp_Array1OfPnt.hxx>

#include <math_BullardGenerator.hxx>

#include <GCPnts_UniformAbscissa.hxx>
#include <GCPnts_UniformDeflection.hxx>
#include <GCPnts_TangentialDeflection.hxx>
#include <GCPnts_QuasiUniformDeflection.hxx>

#include <Geom_BSplineCurve.hxx>

#include <GeomAdaptor_HCurve.hxx>

#include <GeomAPI_PointsToBSpline.hxx>

#include <GeomFill_Fixed.hxx>
#include <GeomFill_Frenet.hxx>
#include <GeomFill_ConstantBiNormal.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
#include <GeomFill_Darboux.hxx>
#include <GeomFill_DiscreteTrihedron.hxx>
#include <GeomFill_GuideTrihedronAC.hxx>
#include <GeomFill_GuideTrihedronPlan.hxx>

#include <BRepBuilderAPI_MakeEdge.hxx>

#include <BRepTools.hxx>


#pragma comment(lib, "TKernel.lib")
#pragma comment(lib, "TKMath.lib")

#pragma comment(lib, "TKG2d.lib")
#pragma comment(lib, "TKG3d.lib")
#pragma comment(lib, "TKGeomBase.lib")
#pragma comment(lib, "TKGeomAlgo.lib")

#pragma comment(lib, "TKBRep.lib")
#pragma comment(lib, "TKTopAlgo.lib")


void test()
{
    TColgp_Array1OfPnt aPoints(1, 6);
    math_BullardGenerator aBullardGenerator;
    for (Standard_Integer i = aPoints.Lower(); i <= aPoints.Upper(); ++i)
    {
        Standard_Real aX = aBullardGenerator.NextReal() * 50.0;
        Standard_Real aY = aBullardGenerator.NextReal() * 50.0;
        Standard_Real aZ = aBullardGenerator.NextReal() * 50.0;

        aPoints.SetValue(i, gp_Pnt(aX, aY, aZ));
    }

    GeomAPI_PointsToBSpline aBSplineFitter(aPoints);
    if (!aBSplineFitter.IsDone())
    {
        return;
    }

    std::ofstream aTclFile("d:/tcl/trihedron.tcl");

    aTclFile << std::fixed;
    aTclFile << "vclear" << std::endl;

    Handle(Geom_BSplineCurve) aBSplineCurve = aBSplineFitter.Curve();
    Handle(GeomAdaptor_HCurve) aCurveAdaptor = new GeomAdaptor_HCurve(aBSplineCurve);

    BRepBuilderAPI_MakeEdge anEdgeMaker(aBSplineCurve);
    BRepTools::Write(anEdgeMaker, "d:/edge.brep");

    aTclFile << "restore " <<  " d:/edge.brep e" << std::endl;
    aTclFile << "incmesh e " << " 0.01" << std::endl;
    aTclFile << "vdisplay e " << std::endl;

    Handle(GeomFill_Frenet) aFrenet = new GeomFill_Frenet();
    aFrenet->SetCurve(aCurveAdaptor);

    GCPnts_UniformAbscissa aPointSampler(aCurveAdaptor->Curve(), 5.0);
    for (Standard_Integer i = 1; i <= aPointSampler.NbPoints(); ++i)
    {
        Standard_Real aParam = aPointSampler.Parameter(i);
        gp_Pnt aP = aCurveAdaptor->Value(aParam);

        gp_Vec aT;
        gp_Vec aN;
        gp_Vec aB;

        aFrenet->D0(aParam, aT, aN, aB);

        // vtrihedron in opencascade draw 6.9.1
        /*aTclFile << "vtrihedron vt" << i << " " << aP.X() << " " << aP.Y() << " " << aP.Z() << " "
                 << " " << aB.X() << " " << aB.Y() << " " << aB.Z() << " "
                 << " " << aT.X() << " " << aT.Y() << " " << aT.Z() << std::endl;
*/

        // vtrihedron in opencascade draw 7.1.0 has bug.
        /*aTclFile << "vtrihedron vt" << i << " -origin " << aP.X() << " " << aP.Y() << " " << aP.Z() << " "
            << " -zaxis " << aB.X() << " " << aB.Y() << " " << aB.Z() << " "
            << " -xaxis " << aT.X() << " " << aT.Y() << " " << aT.Z() << std::endl;
*/

        // vtrihedron in opencascade draw 7.2.0
        aTclFile << "vtrihedron vt" << i << " -origin " << aP.X() << " " << aP.Y() << " " << aP.Z() << " "
            << " -zaxis " << aB.X() << " " << aB.Y() << " " << aB.Z() << " "
            << " -xaxis " << aT.X() << " " << aT.Y() << " " << aT.Z() << std::endl;
        aTclFile << "vtrihedron vt" << i << " -labels xaxis T 1" << std::endl;
        aTclFile << "vtrihedron vt" << i << " -labels yaxis N 1" << std::endl;
        aTclFile << "vtrihedron vt" << i << " -labels zaxis B 1" << std::endl;

        aTclFile << "vsize vt" << i << " 2" << std::endl;
    }
}

int main(int argc, char* argv[])
{
    test();

    return 0;
}

程序通過擬合幾個(gè)隨機(jī)產(chǎn)生的點(diǎn)生成B樣條曲線,再將曲線按弧長等距采樣,將得到的參數(shù)計(jì)算出曲線上的點(diǎn),及Frenet標(biāo)架。再生成Draw腳本文件,最后將生成的Draw腳本文件trihedron.tcl加載到Draw Test Harness中顯示結(jié)果如下圖所示:

wps_clip_image-22393

Figure 3. Frenet Frame

由上圖可知,局部坐標(biāo)系的T方向?yàn)榍€的切線方向。主法向N總是指向曲線凹側(cè)。

4. Conclusion

曲線的活動(dòng)標(biāo)架是《微分幾何》中一個(gè)很基礎(chǔ)的概念。有了曲線的活動(dòng)標(biāo)架,掃掠造型Sweep算法的實(shí)現(xiàn)有了一些思路。當(dāng)給定一個(gè)輪廓線后,將輪廓線沿著路徑曲線掃掠可以理解為將輪廓線變換到曲線的活動(dòng)標(biāo)架中。

本文主要演示了Frenet活動(dòng)標(biāo)架的例子,讀者可以將GeomFill_TrihedronLaw其他的子類表示的其他類型活動(dòng)標(biāo)架自己實(shí)現(xiàn),加深理解。

5. References

1. 趙罡, 穆國旺, 王拉柱. 非均勻有理B樣條. 清華大學(xué)出版社. 2010

2. 陳維桓. 微分幾何. 北京大學(xué)出版社. 2006

3. 朱心雄. 自由曲線曲面造型技術(shù). 科學(xué)出版社.  2000


為了方便大家在移動(dòng)端也能看到我的博文和討論交流,現(xiàn)已注冊微信公眾號,歡迎大家掃描下方二維碼關(guān)注。
Shing Liu(eryar@163.com)

 

Feedback

# re: OpenCASCADE Trihedron Law  回復(fù)  更多評論   

2018-06-08 16:21 by birds
博主您好
又有問題請教了,我如何用vs+qt來顯示如上圖DRAW所示的各個(gè)點(diǎn)的坐標(biāo)方向?謝謝

# re: OpenCASCADE Trihedron Law  回復(fù)  更多評論   

2018-06-09 09:00 by eryar
@birds
你好!

如果理解了活動(dòng)標(biāo)架的概念,就沒有問題了。

# re: OpenCASCADE Trihedron Law  回復(fù)  更多評論   

2018-06-09 14:34 by birds
謝謝
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美一区二区啪啪| 亚洲精选在线| 欧美在线啊v一区| 国际精品欧美精品| 美女黄毛**国产精品啪啪| 久久综合网色—综合色88| 亚洲日本欧美日韩高观看| 亚洲三级毛片| 国产精品久久久免费| 久久精品国产久精国产爱| 久久天天狠狠| 亚洲视频在线视频| 午夜精品久久久久久久久| 亚洲二区视频| 在线一区二区三区四区| 国产亚洲a∨片在线观看| 欧美成人性生活| 国产精品99一区| 快she精品国产999| 欧美午夜在线观看| 欧美va天堂| 国产精品美女久久久久aⅴ国产馆| 久久嫩草精品久久久久| 欧美精品福利| 久久理论片午夜琪琪电影网| 欧美福利在线观看| 久久精品亚洲一区二区| 欧美精品激情在线| 久久尤物电影视频在线观看| 欧美色欧美亚洲另类二区| 可以免费看不卡的av网站| 欧美日韩在线免费| 欧美肥婆在线| 国产一区二区三区自拍| 亚洲精品视频一区| 亚洲高清资源综合久久精品| 亚洲永久网站| 一区二区三区成人精品| 老司机午夜免费精品视频| 欧美一区二区播放| 欧美三日本三级少妇三99| 欧美高清你懂得| 黄色成人在线网址| 欧美一区二区三区久久精品 | 久久夜色精品一区| 欧美一区二区三区免费在线看| 欧美激情视频网站| 欧美成人精品在线视频| 韩国久久久久| 欧美亚洲专区| 久久国产毛片| 国产情侣一区| 午夜精品一区二区三区在线视 | 最新亚洲视频| 久久九九99| 久久躁日日躁aaaaxxxx| 国产日韩视频| 久久国产精品99精品国产| 欧美一区二区私人影院日本| 国产精品无人区| 亚洲午夜av| 新狼窝色av性久久久久久| 国产精品久久久久久超碰| 99爱精品视频| 亚洲欧美视频在线观看| 国产精品一区二区久激情瑜伽| 亚洲一区精品视频| 久久黄金**| 一区二区三区中文在线观看| 久久精品国产免费观看| 噜噜噜在线观看免费视频日韩| 激情一区二区三区| 女主播福利一区| 亚洲巨乳在线| 亚洲欧美日韩国产中文| 国产欧美日韩激情| 久久久xxx| 亚洲国产91| 亚洲免费在线视频一区 二区| 国产免费观看久久| 久久久久久久综合狠狠综合| 欧美激情一区在线观看| 一区二区久久久久久| 国产精品magnet| 久久福利影视| 亚洲精品护士| 香蕉久久久久久久av网站| 伊人久久大香线蕉综合热线 | 欧美日韩123| 亚洲一区区二区| 免费成人网www| 中日韩高清电影网| 国产一区二区三区四区五区美女 | 国产精品99久久久久久久久| 久久av红桃一区二区小说| 影音先锋中文字幕一区| 欧美日韩国产综合网 | 猛男gaygay欧美视频| 亚洲精品免费在线播放| 国产伦精品一区二区三区免费 | 中国女人久久久| 免费不卡在线观看av| 亚洲在线观看视频| 在线精品国产欧美| 国产精品乱码一区二区三区| 久久久久久久91| 亚洲视频一二三| 亚洲福利一区| 久久夜色精品亚洲噜噜国产mv| 99re6热只有精品免费观看| 国产欧美日韩精品专区| 欧美精品免费在线| 久久经典综合| 亚洲一区不卡| 亚洲精品日韩久久| 欧美成年人网| 久久免费视频在线观看| 亚洲综合首页| 这里只有视频精品| 亚洲精品日韩精品| 伊人蜜桃色噜噜激情综合| 国产模特精品视频久久久久| 欧美日韩久久不卡| 欧美成人亚洲成人| 久久久久久亚洲精品中文字幕| 午夜激情一区| 亚洲欧美日韩成人| 亚洲一区二区三区国产| 日韩一区二区精品视频| 亚洲人成网站精品片在线观看 | 亚洲一区二区三区四区视频| 亚洲欧洲日本一区二区三区| 欧美大片一区| 免费亚洲婷婷| 麻豆av福利av久久av| 久久手机精品视频| 久久亚洲精品一区| 玖玖精品视频| 蜜臀a∨国产成人精品| 免费h精品视频在线播放| 久久亚洲风情| 你懂的视频一区二区| 欧美va天堂在线| 亚洲第一精品福利| 亚洲经典三级| 一本色道久久综合亚洲91| 制服丝袜激情欧洲亚洲| 亚洲影院在线观看| 欧美在线三区| 免播放器亚洲一区| 欧美大色视频| 欧美性大战xxxxx久久久| 国产精品视频久久一区| 国产日韩欧美黄色| 黄色成人在线观看| 亚洲另类黄色| 亚洲一区二区三区在线看| 午夜精品国产| 老司机精品福利视频| 亚洲国产黄色| 亚洲午夜视频| 久久成人免费网| 欧美—级a级欧美特级ar全黄| 欧美三级黄美女| 国产尤物精品| 9久re热视频在线精品| 午夜日韩激情| 欧美激情一区二区三区在线视频观看| 亚洲精品1区| 亚洲欧美视频一区| 欧美xart系列在线观看| 国产精品久久久久一区二区| 一区二区亚洲精品| 亚洲视频在线观看网站| 久久久久一本一区二区青青蜜月| 欧美大片第1页| 亚洲一区二区精品| 欧美成人免费观看| 国产精品综合av一区二区国产馆| 亚洲二区在线| 欧美一级网站| 亚洲精品久久久久久久久久久久久 | 久久婷婷亚洲| 亚洲作爱视频| 美女精品在线观看| 国产人成精品一区二区三| 日韩视频国产视频| 久久色在线观看| 在线亚洲一区二区| 欧美国产欧美亚州国产日韩mv天天看完整| 国产精品久久77777| 91久久亚洲| 久久九九有精品国产23| 一本久久综合| 欧美国产日韩一二三区| 极品尤物一区二区三区| 性欧美超级视频| 99re热精品| 欧美日韩国产在线一区| 亚洲人成在线播放网站岛国|