cgma
OffsetSplitTool.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : OffsetSplitTool.hpp
00003 //
00004 // Purpose       :
00005 //
00006 //   Split Surface <id_list> Offset Curve <id_list>
00007 //       Distance <val> [Segment <val>] [Partition] [Blunt] [Preview [Create]]
00008 //
00009 // Special Notes :
00010 //
00011 // Creator       : Sam Showman
00012 //
00013 // Creation Date : 05/10/2005
00014 //-------------------------------------------------------------------------
00015 #ifndef OFFSETSPLITTOOL_HPP
00016 #define OFFSETSPLITTOOL_HPP
00017 
00018 #include "CubitDefines.h"
00019 #include "RefEdge.hpp"
00020 #include "RefVertex.hpp"
00021 #include "CoEdge.hpp"
00022 
00023 class RefEdge;
00024 class RefFace;
00025 class GeometryModifyEngine;
00026 class Curve;
00027 class Surface;
00028 template <class X> class DLIList;
00029 
00030 class OffsetSplitTool
00031 {
00032 public:
00033 
00034     OffsetSplitTool();
00035     ~OffsetSplitTool(){}
00036 
00037     CubitStatus split_surfaces_offset(DLIList<RefFace*> &ref_face_list,
00038         DLIList<RefEdge*> &edge_list,
00039         int num_segs,
00040         double distance,
00041         CubitBoolean divide_flg = CUBIT_FALSE,
00042         CubitBoolean blunt_flg = CUBIT_FALSE,
00043         CubitBoolean preview_flg = CUBIT_FALSE,
00044         CubitBoolean create_ref_edges_flg = CUBIT_FALSE);
00045     //- Splits surface by offsetting curves.
00046     //- ref_face_list - list of surfaces to split.
00047     //- num_segs - the number of segments to create (must be >= 1 );
00048     //- distance - distance of the offset
00049     //- divide_flg - divide the surface between each offset curve to create a better
00050     //-              region for map mesh.
00051     //- blunt_flg - create a blunt type ending instead of the arc type ending
00052     //- preview_flg - if CUBIT_TRUE, just draw the curves that will be used to split
00053     //-               instead of actually splitting.
00054     //- create_ref_edges_flg - valid only if preview_flg=CUBIT_TRUE.  If CUBIT_TRUE,
00055     //-                    create RefEdges *instead* of splitting.
00056 
00057 private:
00058     CubitStatus draw_preview(
00059         DLIList<Curve*> &curve_list,
00060         int color=CUBIT_BLUE_INDEX);
00061     //- Draw the curves
00062 
00063     CubitStatus draw_preview(
00064         Curve *curve_ptr,
00065         CubitBoolean flush=CUBIT_TRUE,
00066         int color=CUBIT_BLUE_INDEX);
00067     //- Draw the curves
00068 
00069     Curve *create_sweep_curve(
00070         Curve *curve_in,
00071         double distance,
00072         double chord_tol,
00073         CubitBoolean iterate = CUBIT_FALSE);
00074     //- Create a sweep curve offset a distance given the input curve.
00075 
00076     Surface *create_sweep_section(
00077         Curve* path,
00078         double distance,
00079         CubitVector up_vector,
00080         double fraction = 0.0);
00081     //- Uses two arcs to create a surface section normal to the input curve
00082 
00083     BodySM* create_sweep_body(
00084         Surface* section,
00085         Curve* path);
00086     //- Sweeps the input surface along the curve path
00087 
00088     CubitStatus create_ref_edges(
00089         DLIList<Curve*> &curve_list );
00090     //- Creates RefEdges from the list of Curve entities
00091 
00092     DLIList<Curve*> create_divide_curves(
00093         DLIList<Curve*> &curve_list,
00094         Surface* surface_in,
00095         double distance);
00096     //- Creates perpendicular curves of length 'distance' at the ends of the
00097     //- input curves. The curves are projected to the input surface if the 
00098     //- Surface in not of type 'PLANE_SURFACE_TYPE'.
00099 
00100     DLIList<Curve*> sourceCurves;
00101     //- List of the Curve entities to offset.
00102 
00103     static double tolerance;
00104     //- Linear tolerace
00105 };
00106 
00107 #endif
00108 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines