BIMHome v1.0.0
BIMHome接口文档说明
CurveHelper.h
浏览该文件的文档.
1/************************************************************************
2* @file CurveHelper.h
3*
4* @brief 曲线助手类
5*
6* @details 曲线助手类
7*
8* @author sunpeng
9*
10* @version 版本号 V0.1
11*
12* @date 2025-6-24
13*
14* @license 北京华科软科技有限公司
15*
16*************************************************************************/
17
18#ifndef PLATFORMALGORITHM_INTERFACE_CURVEHELPER_H
19#define PLATFORMALGORITHM_INTERFACE_CURVEHELPER_H
20
21#include <BHGlobal.h>
22#include <string>
23#include <vector>
24#include <memory>
25#include "Base/Vector3D.h"
26#include "Base/Vector2D.h"
27
28namespace App
29{
30 class IDocument;
31 class IDocumentObject;
32}
33
34namespace Base
35{
36 class Placement;
37 class PolyLine;
38 class PolyLine2D;
39 class Curve;
40}
41
42enum CurveType;
43
44namespace PlatformAlgorithm
45{
46
47 class PlatformAlgorithmEXPORTS CurveHelper
48 {
49 public:
50
58
67 static App::IDocumentObject* getBasisCurveOfTrimmedCurve(App::IDocumentObject* pTrimmedCurve, const std::string& objName = "BasisCurveOfTrimmedCurve", App::IDocument* pParentDoc = nullptr);
68
69 //获取点在曲线(或者多线段)上的参数(U)
77 static double getParameter(const Base::PolyLine& polyLine, const Base::Vector3d& point);
85 static double getParameter(std::shared_ptr<Base::Curve> bcurve, const Base::Vector3d& point);
86
87
95 static double getParameter(const Base::PolyLine2D& polyLine, const Base::Vector2d& point);
96
106
107
108 };
109}
110
111#endif //PLATFORMALGORITHM_INTERFACE_CURVEHELPER_H
CurveType
枚举类型,定义了曲线类型
Definition CurveTypeDefine.h:35
文档接口类
Definition IDocument.h:43
Definition IDocumentObject.h:35
Definition PolyLine2D.h:27
Definition PolyLine.h:27
Vector2d 类,表示二维空间中的向量
Definition Vector2D.h:58
static double getParameter(const Base::PolyLine &polyLine, const Base::Vector3d &point)
计算点在多段线上的参数值
static double getParameter(std::shared_ptr< Base::Curve > bcurve, const Base::Vector3d &point)
计算点在曲线上的参数值
static double getParameter(const Base::PolyLine2D &polyLine, const Base::Vector2d &point)
计算点在2D多段线上的参数值
static bool getCurveStartPointAndEndPoint(App::IDocumentObject *pCurve, Base::Vector3d &startPoint, Base::Vector3d &endPoint)
获取曲线的起点和终点三维坐标
static CurveType getCurveType(App::IDocumentObject *pCurve)
获取曲线类型
static App::IDocumentObject * getBasisCurveOfTrimmedCurve(App::IDocumentObject *pTrimmedCurve, const std::string &objName="BasisCurveOfTrimmedCurve", App::IDocument *pParentDoc=nullptr)
获取修剪曲线的基准曲线
Definition CurveHelper.h:48
Definition BaseFigureFactory.h:28
Definition BaseFigureFactory.h:24
Definition BaseFigureFactory.h:33