hp2FEM
0.1
|
00001 #ifndef _NURBSLINE_H_ 00002 #define _NURBSLINE_H_ 00003 // --------------------------------------------- 00004 // company : 00005 // user : 00006 // date : 22 Mar 2015 17:25 00007 // file : NURBSLine.h 00008 // markers : Full 00009 // language : C++ 00010 // generator : Metamill 6.0 00011 // --------------------------------------------- 00012 00013 //#UBLK-BEG-HEADERH 00014 //#UBLK-END-HEADERH 00015 00016 /*================================================================================================= 00017 = = 00018 = Copyright 2010-2015 Marco Lucio Bittencourt / Fabiano Fernandes Bargos = 00019 = Gilberto Luis Valente / Jorge Luis Suzuki / Allan Patrick Cordeiro Dias = 00020 = = 00021 = Licensed under the Apache License, Version 2.0 (the "License"); = 00022 = you may not use this file except in compliance with the License. = 00023 = You may obtain a copy of the License at = 00024 = = 00025 = http://www.apache.org/licenses/LICENSE-2.0 = 00026 = = 00027 = Unless required by applicable law or agreed to in writing, software = 00028 = distributed under the License is distributed on an "AS IS" BASIS, = 00029 = WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. = 00030 = See the License for the specific language governing permissions and = 00031 = limitations under the License. = 00032 = = 00033 =================================================================================================*/ 00034 00035 00036 #include "ds/BuiltInArray.h" 00037 #include "model/Nodes.h" 00038 #include "BSpline.h" 00039 #include "enumerations/Variable_Defs_E.h" 00040 00041 00045 class NURBSLine 00046 { 00047 //#UBLK-BEG-CLASSDEF mm:d2b31225-7519-4ab4-a56a-465ec0f1b078 00048 //#UBLK-END-CLASSDEF 00049 00050 public: 00051 00052 // METHOD=mm:8ae0f77d-1499-4115-ad47-6511f95ff18a 00053 NURBSLine(); 00054 00055 // METHOD=mm:632196c8-5c29-4324-82a4-fdcbce3db43f 00056 ~NURBSLine(); 00057 00058 // METHOD=mm:d3996f48-3f2a-4f15-93fa-f0518d645d2b 00059 void Save(FILE* File); 00060 00061 // METHOD=mm:4a0f4dee-5134-417c-b5ca-216824c461c5 00062 void Restore(FILE* File); 00063 00064 // METHOD=mm:88358ed3-a297-4cb0-92a0-e3d6d262f53d 00065 void Read(FILE* File); 00066 00067 // METHOD=mm:81536bda-91d2-472e-a238-e9ed4fb27805 00068 void Print(FILE* File = stdout); 00069 00070 // METHOD=mm:6373e64b-fee5-48be-87bf-4f4c10d0e1d2 00071 void Free(); 00072 00073 // METHOD=mm:c1e9095c-6855-4e13-afae-5fd6c874743d 00074 void SetNumber(long number); 00075 00076 // METHOD=mm:1d8f4f7f-a4f9-4c20-87af-1c64beacff62 00077 long GetNumber(); 00078 00079 // METHOD=mm:ecbae384-fa3f-4c78-afd4-13410866b6a2 00080 void SetOrder(long orderu); 00081 00082 // METHOD=mm:32cf849c-247d-487d-90e9-edb6b9db407a 00083 void GetOrder(long& orderu); 00084 00085 // METHOD=mm:8e02f2aa-c823-45c3-adf0-d35c71b95de4 00086 void SetNumberOfCPs(long NCPu); 00087 00088 // METHOD=mm:962b0459-0ad1-404b-9f4a-02b5975f968c 00089 void GetNumberOfCPs(long& NCPu); 00090 00091 // METHOD=mm:73216fa1-59a6-4942-86a3-71c6377a936a 00092 void SetKnotVector(BuiltInArray<double>& KnotU); 00093 00094 // METHOD=mm:57ab6db6-5465-4995-b6bc-60db66ad1b7c 00095 void SetOpenUniformKnotVector(); 00096 00097 // METHOD=mm:0cb74097-b585-4363-a5e5-bd7ac9a9e805 00098 double* GetCPCoords(long CpU); 00099 00100 // METHOD=mm:7dfbbb61-0207-4c1a-a331-d31be87c90d4 00101 double GetWeight(long CpU); 00102 00103 // METHOD=mm:089ab5cc-c220-4c7c-8dfc-51d15af60b22 00104 void SetCPData(BuiltInArray<double>& X, BuiltInArray<double>& Y, BuiltInArray<double>& W); 00105 00106 // METHOD=mm:0cdf1d5f-2a3a-4403-bc5a-e6061a538642 00107 void GetCPData(BuiltInArray<double>& X, BuiltInArray<double>& Y, BuiltInArray<double>& W); 00108 00109 // METHOD=mm:763af1d3-2258-4f1d-9aca-93e067de833e 00110 void SetCPData(long CpU, Variable_Defs_E VarType, double Value); 00111 00112 // METHOD=mm:44dab80f-0c5b-46d9-9739-a29adfbb2ba9 00113 double EvalRBSplineBasisFunction(long CpU, double u); 00114 00115 // METHOD=mm:bed008ad-3e22-41af-92bd-62478167999f 00116 void SetParametricCoordinates(double* ParametricCoordinates, long*const BoundaryNodes, long NumNodes, Nodes& NN); 00117 00118 // METHOD=mm:b5745352-3d53-4bd1-aa37-141dad658147 00119 void SetParametricCoordinates(double& u, double* pCoordsi); 00120 00121 00122 protected: 00123 00124 // METHOD=mm:436f9f99-47eb-47b9-b947-80899135f25a 00125 void EvalRBSplineBasisFunctions(double u); 00126 00127 00136 // attr=mm:24b79c48-3595-4788-a93e-652a0962555f 00137 long OrderU; 00138 00144 // attr=mm:79cfc011-a96a-4e02-aea0-390a77b200b9 00145 BuiltInArray<double> KnotVectU; 00146 00152 // attr=mm:6d143f92-ab59-4e78-b4c8-8daf3ac2de06 00153 BuiltInArray<double> Weights; 00154 00160 // attr=mm:6b4ad469-c96b-49cd-9a94-ada91176890b 00161 BuiltInArray<double> CoordsX; 00162 00168 // attr=mm:7f87a9c8-2f39-4f78-8fd7-be3173e001f6 00169 BuiltInArray<double> CoordsY; 00170 00171 00172 private: 00173 00174 00184 // attr=mm:1f26a0e5-688b-4ef6-8eda-18db5dbc7a6b 00185 BuiltInArray<double> N; 00186 00196 // attr=mm:7b8d3ec9-f6a8-4dc6-84d0-b1178bb71345 00197 BuiltInArray<double> Nl; 00198 00205 // attr=mm:833dcd47-eeb8-4257-92f5-fe578a44db24 00206 BuiltInArray<double> R; 00207 00215 // attr=mm:11ba21d4-30bf-4607-a0b0-9ba66d7524a0 00216 BuiltInArray<double> DRu; 00217 00224 // attr=mm:93f03f7b-2309-478a-8b8b-b91398c3db77 00225 BuiltInArray<double> Coordsi; 00226 00233 // attr=mm:d9378595-6627-496e-b028-f38010fbf4bb 00234 BuiltInArray<double> Coordsip1; 00235 00242 // attr=mm:8f6aa9d3-9968-4b7c-b50a-f4bd5f74e622 00243 long Number; 00244 00245 00246 //#UBLK-BEG-CLASSMEMB mm:d2b31225-7519-4ab4-a56a-465ec0f1b078 00247 //#UBLK-END-CLASSMEMB 00248 }; 00249 00250 //#UBLK-BEG-GLOBALH 00251 //#UBLK-END-GLOBALH 00252 00253 00254 #endif // _NURBSLINE_H_