00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _GOBOUNDEDUTILS_H
00034 #define _GOBOUNDEDUTILS_H
00035
00036
00037 #include "BoundedSurface.h"
00038 #include "SplineSurface.h"
00039 #include "CurveOnSurface.h"
00040 #include "LoopUtils.h"
00041
00042 #include <boost/smart_ptr.hpp>
00043
00044 using std::vector;
00045 using boost::shared_ptr;
00046 using Go::SplineSurface;
00047 using Go::BoundedSurface;
00048 using Go::CurveOnSurface;
00049 using Go::Point;
00050 using Go::ParamCurve;
00051
00052 namespace Go {
00055
00056
00060 namespace BoundedUtils {
00063
00064
00073 std::vector<shared_ptr<CurveOnSurface> >
00074 intersectWithSurface(CurveOnSurface& curve,
00075 BoundedSurface& bounded_surf, double epsge);
00076
00094 void intersectWithSurfaces(vector<shared_ptr<CurveOnSurface> >& curves1,
00095 shared_ptr<BoundedSurface>& bd_sf1,
00096 vector<shared_ptr<CurveOnSurface> >& curves2,
00097 shared_ptr<BoundedSurface>& bd_sf2,
00098 double epsge);
00099
00103
00111 vector<vector<shared_ptr<CurveOnSurface> > >
00112 getBoundaryLoops(const BoundedSurface& sf,
00113 vector<shared_ptr<CurveOnSurface> >& part_bnd_cvs);
00114
00127 vector<shared_ptr<BoundedSurface> >
00128 trimWithPlane(const shared_ptr<Go::ParamSurface>& surf,
00129 Point point, Point normal, double epsge);
00130
00133
00143 vector<shared_ptr<BoundedSurface> >
00144 trimSurfWithSurf(const shared_ptr<Go::ParamSurface>& sf1,
00145 const shared_ptr<Go::ParamSurface>& sf2, double epsge);
00146
00147
00150
00157 BoundedSurface* convertToBoundedSurface(const SplineSurface& surf,
00158 double space_epsilon);
00159
00160
00165
00166
00182 vector<shared_ptr<BoundedSurface> >
00183 createTrimmedSurfs(vector<vector<boost::shared_ptr<CurveOnSurface> > >& loops,
00184 shared_ptr<SplineSurface>& under_sf,
00185 double epsgeo);
00186
00195 std::vector<shared_ptr<CurveOnSurface> >
00196 intersectWithPlane(shared_ptr<SplineSurface>& surf,
00197 Point pnt, Point normal, double geom_tol);
00198
00207 void getIntersectionCurve(shared_ptr<SplineSurface>& sf1,
00208 shared_ptr<SplineSurface>& sf2,
00209 vector<shared_ptr<CurveOnSurface> >& int_segments1,
00210 vector<shared_ptr<CurveOnSurface> >& int_segments2,
00211 double epsge);
00212
00213
00218 void translateBoundedSurf(Point trans_vec, BoundedSurface& bd_sf,
00219 double deg_eps);
00220
00221
00226 void rotateBoundedSurf(Point rot_axis, double alpha,
00227 BoundedSurface& bf_sf, double deg_eps);
00228
00230 }
00232 }
00233
00234 #endif // _GOBOUNDEDUTILS_H
00235