cgma
PartPTCurve Class Reference

#include <PartPTCurve.hpp>

Inheritance diagram for PartPTCurve:
PartitionCurve Curve PartitionEntity GeometryEntity TopologyBridge

List of all members.

Public Member Functions

 PartPTCurve (PartitionSurface *owner)
virtual ~PartPTCurve ()
PartitionCurvesplit (double)
CubitStatus combine (PartitionCurve *curve)
CubitStatus get_graphics (GMem &result, double angle_tolerance=0, double distance_tolerance=0, double max_edge_length=0)
CubitVector coordinates () const
virtual CubitStatus save (CubitSimpleAttrib &attrib)
void append_simple_attribute_virt (const CubitSimpleAttrib &)
void remove_simple_attribute_virt (const CubitSimpleAttrib &)
void remove_all_simple_attribute_virt ()
CubitStatus get_simple_attribute (DLIList< CubitSimpleAttrib > &)
CubitStatus get_simple_attribute (const CubitString &name, DLIList< CubitSimpleAttrib > &)
CubitBox bounding_box () const
double measure ()
GeometryType geometry_type ()
CubitStatus closest_point (CubitVector const &from, CubitVector &closest, CubitVector *tangent=0, CubitVector *curvature=0, double *param=0)
CubitPointContainment point_containment (const CubitVector &point)
CubitBoolean is_position_on (const CubitVector &position)
CubitBoolean G1_discontinuous (double u, CubitVector *minus_tangent=0, CubitVector *plus_tangent=0)
CubitStatus get_interior_extrema (DLIList< CubitVector * > &points, CubitSense &sense)
CubitStatus get_center_radius (CubitVector &center, double &radius)
CubitBoolean get_param_range (double &lower, double &upper)
double start_param ()
double end_param ()
CubitBoolean is_periodic (double &period)
double length_from_u (double u1, double u2)
double u_from_position (const CubitVector &position)
CubitStatus position_from_u (double u, CubitVector &result)
double u_from_arc_length (double root, double length)
void reverse_sense ()
virtual CubitStatus get_spline_params (bool &rational, int &degree, DLIList< CubitVector > &cntrl_pts, DLIList< double > &cntrl_pt_weights, DLIList< double > &knots, bool &spline_is_reversed) const
virtual CubitStatus get_ellipse_params (CubitVector &center, CubitVector &normal, CubitVector &major_axis, double &radius_ratio) const

Static Public Member Functions

static PartPTCurveconstruct (const CubitSimpleAttrib &attrib, PartitionSurface *owner)

Private Member Functions

 PartPTCurve (PartitionSurface *owner, const CubitSimpleAttrib &attrib, DLIList< int > &vertex_connectivity)

Detailed Description

Definition at line 20 of file PartPTCurve.hpp.


Constructor & Destructor Documentation

Definition at line 8 of file PartPTCurve.cpp.

{
  owner->sub_entity_set().add_lower_order( this );
}

Definition at line 58 of file PartPTCurve.cpp.

  {}
PartPTCurve::PartPTCurve ( PartitionSurface owner,
const CubitSimpleAttrib attrib,
DLIList< int > &  vertex_connectivity 
) [private]

Definition at line 48 of file PartPTCurve.cpp.

{
  DLIList<CubitVector*> points;
  DLIList<int> junk;
  surface->sub_entity_set().add_lower_order( this, attrib, 1, points, junk, vertex_conn, junk );
  assert( points.size() == 0 );
}

Member Function Documentation

Reimplemented from PartitionCurve.

Definition at line 81 of file PartPTCurve.cpp.

  { sub_entity_set().add_attribute( this, csa ); }
CubitBox PartPTCurve::bounding_box ( void  ) const [virtual]

Implements PartitionEntity.

Definition at line 99 of file PartPTCurve.cpp.

  { return CubitBox( coordinates() ); }
CubitStatus PartPTCurve::closest_point ( CubitVector const &  from,
CubitVector closest,
CubitVector tangent = 0,
CubitVector curvature = 0,
double *  param = 0 
) [virtual]

Implements Curve.

Definition at line 106 of file PartPTCurve.cpp.

{
  closest = coordinates();
  if( tangent ) tangent->set(0.,0.,0.);
  if( curvature) curvature->set(0.,0.,0.);
  if( param ) *param = 0.0;
  return CUBIT_SUCCESS;
}

Implements PartitionCurve.

Definition at line 64 of file PartPTCurve.cpp.

{
  assert( dynamic_cast<PartPTCurve*>(curve) != NULL );
  assert( 0 );
  return CUBIT_FAILURE;
}
PartPTCurve * PartPTCurve::construct ( const CubitSimpleAttrib attrib,
PartitionSurface owner 
) [static]

Definition at line 13 of file PartPTCurve.cpp.

{
  DLIList<int> vertex_conn;
  PartPTCurve* result = new PartPTCurve( owner, attrib, vertex_conn );
  
  if ( vertex_conn.size() != 4 )
  {
    delete result;
    return 0;
  }
  
  PartitionPoint *start = 0, *end = 0;
  PartitionEntity* ent;
  vertex_conn.reset();
  int set_id = vertex_conn.get_and_step();
  int ent_id = vertex_conn.get_and_step();
  ent = PartitionEngine::instance().entity_from_id(set_id,ent_id,owner->sub_entity_set());
  start = dynamic_cast<PartitionPoint*>(ent);
  set_id = vertex_conn.get_and_step();
  ent_id = vertex_conn.get_and_step();
  ent = PartitionEngine::instance().entity_from_id(set_id,ent_id,owner->sub_entity_set());
  end = dynamic_cast<PartitionPoint*>(ent);
  
  if ( !start || !end || start != end )
  {
    delete result;
    return 0;
  }
  
  result->start_point( end );
  result->end_point( end );
  return result;
}

Definition at line 164 of file PartPTCurve.cpp.

{
  if( start_point() )
    return start_point()->coordinates();
  
  if( end_point() )
    return end_point()->coordinates();
  
  return CubitVector(0.,0.,0.);
}
double PartPTCurve::end_param ( ) [virtual]

Implements Curve.

Definition at line 146 of file PartPTCurve.cpp.

  { return 0.0; }
CubitBoolean PartPTCurve::G1_discontinuous ( double  u,
CubitVector minus_tangent = 0,
CubitVector plus_tangent = 0 
) [virtual]

Reimplemented from Curve.

Definition at line 128 of file PartPTCurve.cpp.

{
  if( min ) min->set( 0., 0., 0. );
  if( plu ) plu->set( 0., 0., 0. );
  return CUBIT_TRUE;
}

Reimplemented from Curve.

Definition at line 103 of file PartPTCurve.cpp.

  { return POINT_CURVE_TYPE; }
CubitStatus PartPTCurve::get_center_radius ( CubitVector center,
double &  radius 
) [virtual]

Implements Curve.

Definition at line 138 of file PartPTCurve.cpp.

  { return CUBIT_FAILURE; }
CubitStatus PartPTCurve::get_ellipse_params ( CubitVector center,
CubitVector normal,
CubitVector major_axis,
double &  radius_ratio 
) const [virtual]

Implements Curve.

Definition at line 204 of file PartPTCurve.cpp.

{
  PRINT_ERROR("Currently, Cubit is unable to determine ellipse parameters for PartPTCurves.\n");
  return CUBIT_FAILURE;
}
CubitStatus PartPTCurve::get_graphics ( GMem result,
double  angle_tolerance = 0,
double  distance_tolerance = 0,
double  max_edge_length = 0 
) [virtual]

Implements PartitionCurve.

Definition at line 71 of file PartPTCurve.cpp.

{
  result.pointListCount = 0;
  return CUBIT_SUCCESS;
}
CubitStatus PartPTCurve::get_interior_extrema ( DLIList< CubitVector * > &  points,
CubitSense sense 
) [virtual]

Implements Curve.

Definition at line 135 of file PartPTCurve.cpp.

  { return CUBIT_SUCCESS; }
CubitBoolean PartPTCurve::get_param_range ( double &  lower,
double &  upper 
) [virtual]

Implements Curve.

Definition at line 141 of file PartPTCurve.cpp.

  { lower = upper = 0.0; return CUBIT_TRUE; }

Reimplemented from PartitionCurve.

Definition at line 87 of file PartPTCurve.cpp.

{ 
  sub_entity_set().get_attributes( this, list ); 
  return CUBIT_SUCCESS;
}

Reimplemented from PartitionCurve.

Definition at line 92 of file PartPTCurve.cpp.

{ 
  sub_entity_set().get_attributes( this, name.c_str(), list ); 
  return CUBIT_SUCCESS;
}
CubitStatus PartPTCurve::get_spline_params ( bool &  rational,
int &  degree,
DLIList< CubitVector > &  cntrl_pts,
DLIList< double > &  cntrl_pt_weights,
DLIList< double > &  knots,
bool &  spline_is_reversed 
) const [virtual]

Implements Curve.

Definition at line 190 of file PartPTCurve.cpp.

{
  PRINT_ERROR("Currently, Cubit is unable to determine spline parameters for PartPTCurves.\n");
  return CUBIT_FAILURE;
}
CubitBoolean PartPTCurve::is_periodic ( double &  period) [virtual]

Implements Curve.

Definition at line 149 of file PartPTCurve.cpp.

  { period = 0.0; return CUBIT_TRUE; }
CubitBoolean PartPTCurve::is_position_on ( const CubitVector position) [virtual]

Implements Curve.

Definition at line 122 of file PartPTCurve.cpp.

{
  const double tolsqr = GEOMETRY_RESABS * GEOMETRY_RESABS;
  return (position - coordinates()).length_squared() < tolsqr;
}
double PartPTCurve::length_from_u ( double  u1,
double  u2 
) [virtual]

Implements Curve.

Definition at line 152 of file PartPTCurve.cpp.

  { return  0.0; }
double PartPTCurve::measure ( ) [virtual]

Implements GeometryEntity.

Definition at line 101 of file PartPTCurve.cpp.

  { return 0.0; }

Implements Curve.

Definition at line 119 of file PartPTCurve.cpp.

  { return is_position_on(position) ? CUBIT_PNT_BOUNDARY : CUBIT_PNT_OFF; }
CubitStatus PartPTCurve::position_from_u ( double  u,
CubitVector result 
) [virtual]

Implements Curve.

Definition at line 158 of file PartPTCurve.cpp.

  { result = coordinates(); return CUBIT_SUCCESS; }

Reimplemented from PartitionCurve.

Definition at line 85 of file PartPTCurve.cpp.

Reimplemented from PartitionCurve.

Definition at line 83 of file PartPTCurve.cpp.

  { sub_entity_set().rem_attribute( this, csa ); }
void PartPTCurve::reverse_sense ( ) [virtual]

Implements PartitionEntity.

Definition at line 175 of file PartPTCurve.cpp.

  { }

Implements PartitionEntity.

Definition at line 178 of file PartPTCurve.cpp.

{
  int id = sub_entity_set().get_id(this);
  if( id <= 0 ) return CUBIT_FAILURE;
  
  DLIList<int> end_points(4);
  get_save_topology(end_points);

  return sub_entity_set().save_geometry( id, 1, 0, 0, &end_points, 0, attrib );
}
PartitionCurve * PartPTCurve::split ( double  ) [virtual]

Implements PartitionCurve.

Definition at line 61 of file PartPTCurve.cpp.

  { assert(0); return 0; }
double PartPTCurve::start_param ( ) [virtual]

Implements Curve.

Definition at line 144 of file PartPTCurve.cpp.

  { return 0.0; }
double PartPTCurve::u_from_arc_length ( double  root,
double  length 
) [virtual]

Implements Curve.

Definition at line 161 of file PartPTCurve.cpp.

  { return 0.0; }
double PartPTCurve::u_from_position ( const CubitVector position) [virtual]

Implements Curve.

Definition at line 155 of file PartPTCurve.cpp.

  { return 0.0; }

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines