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

eryar

PipeCAD - Plant Piping Design Software.
PlantAssistant - Translate AVEVA RVM/SP3D VUE to glTF, STEP, etc.
posts - 606, comments - 590, trackbacks - 0, articles - 0

OpenCASCADE Trihedron Law

Posted on 2018-04-03 23:17 eryar 閱讀(2296) 評論(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。這個局部坐標(biāo)系隨著曲線上點的運動而運動,所以也稱為活動坐標(biāo)系。活動坐標(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)

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

2.Trihedron Law

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

wps_clip_image-18899

Figure 2. Trihedron Law define Trihedron along a Curve

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

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

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;
}

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

wps_clip_image-22393

Figure 3. Frenet Frame

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

4. Conclusion

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

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

5. References

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

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

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


為了方便大家在移動端也能看到我的博文和討論交流,現(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所示的各個點的坐標(biāo)方向?謝謝

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

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

如果理解了活動標(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>
            欧美岛国激情| 99在线|亚洲一区二区| 香蕉久久一区二区不卡无毒影院| 欧美日韩午夜激情| 亚洲女ⅴideoshd黑人| 亚洲资源av| 精品1区2区| 亚洲电影免费在线观看| 欧美二区在线观看| 亚洲视频欧美视频| 亚洲一区二区三区四区五区午夜| 国产精品一区二区在线观看网站| 久久精品天堂| 欧美岛国在线观看| 午夜国产精品影院在线观看| 欧美亚洲综合网| 亚洲日韩欧美视频| 亚洲欧美春色| 亚洲国产精品第一区二区| 日韩午夜激情电影| 国内精品福利| 亚洲人成绝费网站色www| 国产精品视频观看| 欧美xart系列高清| 国产精品免费网站在线观看| 蜜臀av一级做a爰片久久| 欧美日韩亚洲视频一区| 快she精品国产999| 欧美午夜精品久久久久久浪潮| 欧美一区在线视频| 欧美精品乱人伦久久久久久| 久久av最新网址| 欧美日韩在线观看一区二区三区| 久久激情五月婷婷| 欧美色图首页| 亚洲高清二区| 国产专区欧美精品| 一区二区三区视频免费在线观看| 国内成+人亚洲| 亚洲一区二区高清| 一区二区三区久久久| 久久精品一区二区三区中文字幕| 亚洲色无码播放| 欧美成人综合网站| 久久人人爽国产| 国产嫩草一区二区三区在线观看 | 久久er99精品| 欧美绝品在线观看成人午夜影视| 久久久久欧美精品| 国产精品亚洲网站| 亚洲作爱视频| 一区二区高清视频| 欧美.www| 亚洲第一主播视频| 亚洲国产精品成人综合色在线婷婷| 午夜久久美女| 久久不射中文字幕| 国产乱码精品1区2区3区| 99国产精品国产精品毛片| 亚洲日韩中文字幕在线播放| 久久精品综合一区| 狂野欧美激情性xxxx| 国产视频久久久久久久| 亚洲欧美经典视频| 欧美一区二区三区在线看| 欧美午夜电影完整版| 99精品免费| 亚洲自拍偷拍视频| 国产精品久久久久久久久久尿 | 亚洲欧美日韩精品久久久久| 亚洲欧美美女| 国产嫩草一区二区三区在线观看| 亚洲无线观看| 欧美资源在线观看| 韩国av一区二区三区| 午夜在线电影亚洲一区| 久久精品国产久精国产一老狼| 国产亚洲欧美激情| 久久久久免费视频| 亚洲国产日韩在线| 宅男在线国产精品| 国产精品免费一区豆花| 欧美在线视频观看免费网站| 久久久久久尹人网香蕉| 亚洲高清视频在线| 欧美破处大片在线视频| 亚洲午夜精品久久久久久浪潮| 亚洲综合视频1区| 国产亚洲欧美激情| 欧美大尺度在线| 一区二区免费在线观看| 久久久www免费人成黑人精品 | 激情久久久久久久久久久久久久久久| 欧美一区二区三区在| 欧美激情第二页| 亚洲私人黄色宅男| 韩日精品视频一区| 欧美理论大片| 久久精品国产第一区二区三区最新章节 | 欧美伦理一区二区| 亚洲欧美国产精品桃花| 欧美高清视频www夜色资源网| 中文国产成人精品久久一| 国产午夜精品福利| 欧美激情欧美狂野欧美精品| 亚洲一区在线观看视频| 欧美国产日本韩| 午夜日韩视频| 亚洲美女在线视频| 国产一区二区三区久久悠悠色av | 9久re热视频在线精品| 国产欧美日韩综合一区在线观看| 老司机久久99久久精品播放免费| 在线一区欧美| 欧美激情视频给我| 久久精品视频在线| 亚洲一区二区三区高清不卡| 在线观看91精品国产麻豆| 国产精品乱人伦一区二区| 欧美国产一区二区在线观看| 欧美一区二区免费| 亚洲天堂av图片| 亚洲人线精品午夜| 欧美激情 亚洲a∨综合| 久久久久久免费| 性18欧美另类| 亚洲深爱激情| 亚洲精一区二区三区| 亚洲电影第1页| 今天的高清视频免费播放成人 | 久久久久久久久岛国免费| 亚洲视频自拍偷拍| 99re国产精品| 91久久精品国产91久久| 欧美aa国产视频| 久久中文在线| 久久精品论坛| 久久久亚洲国产天美传媒修理工 | 亚洲视频综合在线| 日韩一级大片| 亚洲私拍自拍| 中日韩高清电影网| 在线午夜精品自拍| 亚洲直播在线一区| 亚洲一区尤物| 欧美一级专区免费大片| 午夜精品三级视频福利| 亚洲欧美国产高清va在线播| 亚洲一区二区三区涩| 亚洲男人的天堂在线| 亚洲欧美影院| 久久www成人_看片免费不卡| 久久黄金**| 欧美成人资源网| 91久久夜色精品国产网站| 亚洲日本电影在线| 亚洲神马久久| 午夜伦欧美伦电影理论片| 久久精品人人做人人爽| 久久久久一区二区三区| 免费观看日韩av| 国产精品theporn| 国产一区二区三区四区| 亚洲成色777777在线观看影院| 亚洲欧洲精品一区二区| 一本一本a久久| 久久精品av麻豆的观看方式| 久久亚洲免费| 亚洲人成绝费网站色www| 国产精品99久久99久久久二8| 午夜精品国产更新| 久久美女性网| 欧美理论在线| 国产无一区二区| 亚洲精选久久| 久久久久久成人| 亚洲激情在线观看视频免费| 亚洲一区二区三区在线| 老**午夜毛片一区二区三区| 欧美日韩一区三区四区| 韩日午夜在线资源一区二区| 99精品国产热久久91蜜凸| 久久av一区二区三区| 亚洲人成高清| 久久激情网站| 国产精品高清免费在线观看| 在线精品国精品国产尤物884a| 一区二区三区高清在线| 老司机午夜免费精品视频| 一本色道久久综合亚洲精品小说 | 欧美日韩中文字幕在线视频| 国产午夜精品视频| 一区二区av在线| 久久人人精品| 亚洲一区二区动漫| 欧美精品一区二区久久婷婷| 国内自拍视频一区二区三区| 亚洲一区在线播放| 亚洲欧洲在线一区| 久久久999国产|