cgma
|
00001 //------------------------------------------------------------------------- 00002 // Filename : PartPtCurve.hpp 00003 // 00004 // Purpose : Point Curve for Partition Geometry 00005 // 00006 // Special Notes : 00007 // 00008 // Creator : Jason Kraftcheck 00009 // 00010 // Creation Date : 04/27/02 00011 //------------------------------------------------------------------------- 00012 00013 #ifndef PART_PT_CURVE 00014 #define PART_PT_CURVE 00015 00016 #include "PartitionCurve.hpp" 00017 00018 class PartitionSurface; 00019 00020 class PartPTCurve : public PartitionCurve 00021 { 00022 00023 public: 00024 00025 PartPTCurve( PartitionSurface* owner ); 00026 00027 static PartPTCurve* construct( const CubitSimpleAttrib& attrib, 00028 PartitionSurface* owner ); 00029 00030 virtual ~PartPTCurve(); 00031 00032 PartitionCurve* split( double ); 00033 00034 CubitStatus combine( PartitionCurve* curve ); 00035 00036 CubitStatus get_graphics( GMem& result, 00037 double angle_tolerance=0, 00038 double distance_tolerance=0, 00039 double max_edge_length=0); 00040 00041 CubitVector coordinates() const; 00042 00043 virtual CubitStatus save( CubitSimpleAttrib& attrib ); 00044 00045 /*** Methods from TopologyBridge ***/ 00046 00047 void append_simple_attribute_virt( const CubitSimpleAttrib& ); 00048 void remove_simple_attribute_virt( const CubitSimpleAttrib& ); 00049 void remove_all_simple_attribute_virt(); 00050 CubitStatus get_simple_attribute( DLIList<CubitSimpleAttrib>& ); 00051 CubitStatus get_simple_attribute( const CubitString& name, 00052 DLIList<CubitSimpleAttrib>& ); 00053 00054 /*** Methods from GeometryEntity ***/ 00055 00056 CubitBox bounding_box() const; 00057 double measure(); 00058 GeometryType geometry_type(); 00059 00060 /*** Methods from Curve ***/ 00061 00062 CubitStatus closest_point( CubitVector const& from, CubitVector& closest, 00063 CubitVector* tangent = 0, CubitVector* curvature = 0, 00064 double* param = 0 ); 00065 CubitPointContainment point_containment( const CubitVector& point ); 00066 CubitBoolean is_position_on( const CubitVector& position ); 00067 CubitBoolean G1_discontinuous( double u, CubitVector* minus_tangent = 0, 00068 CubitVector* plus_tangent = 0 ); 00069 CubitStatus get_interior_extrema( DLIList<CubitVector*>& points, CubitSense& sense ); 00070 CubitStatus get_center_radius( CubitVector& center, double& radius ); 00071 00072 CubitBoolean get_param_range( double& lower, double& upper ); 00073 double start_param(); 00074 double end_param(); 00075 CubitBoolean is_periodic( double& period ); 00076 00077 double length_from_u( double u1, double u2 ); 00078 double u_from_position( const CubitVector& position ); 00079 CubitStatus position_from_u( double u, CubitVector& result ); 00080 double u_from_arc_length( double root, double length ); 00081 00082 void reverse_sense(); 00083 00084 //R CubitStatus 00085 //O- true or false if spline is rational or not. 00086 //O- the degree of this spline 00087 //O- the control points 00088 //O- If rational, weight for each control point 00089 //O- whether underlying spline is reversed 00090 virtual CubitStatus get_spline_params( bool &rational, 00091 int °ree, 00092 DLIList<CubitVector> &cntrl_pts, 00093 DLIList<double> &cntrl_pt_weights, 00094 DLIList<double> &knots, 00095 bool &spline_is_reversed 00096 ) const; 00097 //R CubitStatus 00098 //O- center - ellipse center point 00099 //O- normal - normal of the plane of the ellipse 00100 //O- major_axis - major axis of the ellipse 00101 //O- radius_ratio - ratio of the length of the major to minor axis. 00102 virtual CubitStatus get_ellipse_params( CubitVector ¢er, 00103 CubitVector &normal, 00104 CubitVector &major_axis, 00105 double &radius_ratio ) const; 00106 00107 private: 00108 00109 PartPTCurve( PartitionSurface* owner, 00110 const CubitSimpleAttrib& attrib, 00111 DLIList<int>& vertex_connectivity ); 00112 00113 }; 00114 00115 00116 #endif 00117 00118 00119