| 318 | } |
| 319 | |
| 320 | unique_ptr<WebguiData> GenerateWebguiData(shared_ptr<MeshAccess> ma, |
| 321 | shared_ptr<CoefficientFunction> cf, |
| 322 | int order) { |
| 323 | auto d = make_unique<WebguiData>(); |
| 324 | d->mesh_dim = ma->GetDimension(); |
| 325 | d->order2d = min(order, 3); |
| 326 | d->order3d = min(order, 2); |
| 327 | d->funcmin = 0.0; |
| 328 | d->funcmax = 1.0; |
| 329 | d->draw_vol = true; |
| 330 | d->draw_surf = true; |
| 331 | d->show_wireframe = true; |
| 332 | d->show_mesh = true; |
| 333 | |
| 334 | for (const auto &mat : ma->GetMaterials(VOL)) d->names.push_back(string(mat)); |
| 335 | |
| 336 | netgen::Point3d pmin, pmax; |
| 337 | ma->GetNetgenMesh()->GetBox(pmin, pmax); |
| 338 | d->mesh_radius = (pmax - pmin).Length() / 2; |
| 339 | auto c = Center(pmin, pmax); |
| 340 | d->mesh_center = {c.X(), c.Y(), c.Z()}; |
| 341 | |
| 342 | d->edges = GenerateEdgeData(ma, cf, order); |
| 343 | d->Bezier_points = GenerateWireframeData(ma, cf, d->order2d); |
| 344 | d->Bezier_trig_points = GenerateSurfaceData(ma, cf, d->order2d); |
| 345 | d->points3d = GenerateVolumeData(ma, cf, d->order3d); |
| 346 | |
| 347 | return d; |
| 348 | } |
| 349 | |
| 350 | } // namespace webgui |
nothing calls this directly
no test coverage detected