| 1 | /* |
|---|
| 2 | * |
|---|
| 3 | * |
|---|
| 4 | * Copyright (C) 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 |
|---|
| 5 | * with Sandia Corporation, the U.S. Government retains certain rights in this software. |
|---|
| 6 | * |
|---|
| 7 | * This file is part of facetbool--contact via cubit@sandia.gov |
|---|
| 8 | * |
|---|
| 9 | * This library is free software; you can redistribute it and/or |
|---|
| 10 | * modify it under the terms of the GNU Lesser General Public |
|---|
| 11 | * License as published by the Free Software Foundation; either |
|---|
| 12 | * version 2.1 of the License, or (at your option) any later version. |
|---|
| 13 | * |
|---|
| 14 | * This library is distributed in the hope that it will be useful, |
|---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 17 | * Lesser General Public License for more details. |
|---|
| 18 | * |
|---|
| 19 | * You should have received a copy of the GNU Lesser General Public |
|---|
| 20 | * License along with this library; if not, write to the Free Software |
|---|
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 22 | * |
|---|
| 23 | * |
|---|
| 24 | * |
|---|
| 25 | */ |
|---|
| 26 | |
|---|
| 27 | #ifndef _FACETEDBOOLEANIMPRINT |
|---|
| 28 | #define _FACETEDBOOLEANIMPRINT |
|---|
| 29 | #include <math.h> |
|---|
| 30 | #include <vector> |
|---|
| 31 | #include "FBDefines.hpp" |
|---|
| 32 | #include "FBStructs.hpp" |
|---|
| 33 | #include "CubitDefines.h" |
|---|
| 34 | |
|---|
| 35 | class FBPolyhedron; |
|---|
| 36 | class FBRetriangulate; |
|---|
| 37 | |
|---|
| 38 | class FBImprint { |
|---|
| 39 | |
|---|
| 40 | public: |
|---|
| 41 | FBImprint(); |
|---|
| 42 | ~FBImprint(); |
|---|
| 43 | |
|---|
| 44 | CubitStatus imprint_body_curve(const std::vector<double>& Bodycoords, |
|---|
| 45 | const std::vector<int>& Bodyconnections, |
|---|
| 46 | const std::vector<FB_Coord*>& FB_imprint_edge_coords, |
|---|
| 47 | const std::vector<FB_Edge*>& FB_imprint_edges, |
|---|
| 48 | const std::vector<FSBoundingBox*>& FB_imprint_edge_bboxes, |
|---|
| 49 | std::vector<int>* indices); |
|---|
| 50 | |
|---|
| 51 | CubitStatus update_surfs_and_curves(std::vector<double>& out_coords, |
|---|
| 52 | std::vector<int>& out_connections, |
|---|
| 53 | std::vector<int> *out_surf_index, |
|---|
| 54 | std::vector<int> *out_curve_index |
|---|
| 55 | ); |
|---|
| 56 | |
|---|
| 57 | private: |
|---|
| 58 | std::vector<int> *f_c_indices; |
|---|
| 59 | FBPolyhedron *poly; |
|---|
| 60 | CubitStatus edges_tri_intersect(const std::vector<FB_Coord*>& FB_imprint_edge_coords, |
|---|
| 61 | const std::vector<FB_Edge*>& FB_imprint_edges, |
|---|
| 62 | const std::vector<FSBoundingBox*>& FB_imprint_edge_bboxes, |
|---|
| 63 | bool &new_edge_created); |
|---|
| 64 | |
|---|
| 65 | CubitStatus single_edge_tri_intersect(double *edge_0,double *edge_1, |
|---|
| 66 | bool &new_edge_created, |
|---|
| 67 | FB_Triangle *tri, |
|---|
| 68 | bool big_angle); |
|---|
| 69 | double imprint_res; |
|---|
| 70 | |
|---|
| 71 | }; |
|---|
| 72 | |
|---|
| 73 | #endif |
|---|