Rhino C++ API  8.5
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CRhinoGumballFrame Class Reference

#include <rhinoSdkGumball.h>

Public Member Functions

 CRhinoGumballFrame ()
 
 ~CRhinoGumballFrame ()
 
const ON_3dVectorAxis (int i) const
 
ON_Line AxisLine (int i, double length) const
 
ON_3dPoint AxisPoint (int i, double t) const
 
const ON_3dPointCenter () const
 
bool DragTo (GUMBALL_MODE gumball_mode, const CRhinoGumballDragSettings &drag_settings, ON_3dPoint start_point, ON_3dPoint drag_to_point, CRhinoGumballFrame &dragged_gumball_frame, ON_Line &drag_line) const
 
bool GetDragToPoint (GUMBALL_MODE gumball_mode, ON_3dPoint world_pick_point, ON_Line world_pick_line, ON_3dPoint &drag_to_point) const
 
bool GetPlane (int plane_index, ON_Plane &plane) const
 
bool IsValid () const
 
bool Read (ON_BinaryArchive &binary_archive)
 
double ScaleGripDistance (int i) const
 
ON_3dPoint ScaleGripPoint (int i) const
 
bool SetCenter (const ON_3dPoint &center)
 
bool SetFromArc (const ON_Arc &arc)
 
bool SetFromBoundingBox (ON_BoundingBox bbox)
 gumball points More...
 
bool SetFromBoundingBox (ON_Plane frame, ON_BoundingBox bbox)
 
bool SetFromBrepObject (const CRhinoBrepObject &brep, double dTol=ON_ZERO_TOLERANCE)
 
bool SetFromCircle (const ON_Circle &circle)
 
bool SetFromClippingPlane (const ON_PlaneSurface &clipping_plane)
 
bool SetFromCurve (const ON_Curve &curve)
 
bool SetFromEllipse (const ON_Ellipse &ellipse)
 
bool SetFromExtrusion (const ON_Extrusion &extrusion)
 
bool SetFromExtrusionObject (const CRhinoExtrusionObject &ext, double dTol=ON_ZERO_TOLERANCE)
 
bool SetFromHatch (const ON_Hatch &hatch)
 
bool SetFromLight (const ON_Light &light)
 
bool SetFromLine (const ON_Line &line)
 
bool SetFromMeshObject (const CRhinoMeshObject &mesh, double dTol=ON_ZERO_TOLERANCE)
 
bool SetFromMorphControlObject (const CRhinoMorphControl &mc, double dTol=ON_ZERO_TOLERANCE)
 
bool SetFromPlane (const ON_Plane &plane)
 
bool SetFromSubDObject (const CRhinoSubDObject &ext, double dTol=ON_ZERO_TOLERANCE)
 
bool SetScaleFromAnnotation (const ON_Plane &frame, const class CRhinoAnnotation &annotation)
 
bool SetScaleFromArc (const ON_Plane &frame, const ON_Arc &arc)
 
bool SetScaleFromBoundingBox (const ON_Plane &frame, const ON_BoundingBox &bbox)
 
bool SetScaleFromBrepObject (const ON_Plane &frame, const CRhinoBrepObject &brep, double dTol=ON_ZERO_TOLERANCE)
 
bool SetScaleFromCircle (const ON_Plane &frame, const ON_Circle &circle)
 
bool SetScaleFromClippingPlane (const ON_Plane &frame, const ON_PlaneSurface &clipping_plane)
 
bool SetScaleFromCurve (const ON_Plane &frame, const ON_Curve &curve)
 
bool SetScaleFromEllipse (const ON_Plane &frame, const ON_Ellipse &ellipse)
 
bool SetScaleFromExtrusion (const ON_Plane &frame, const ON_Extrusion &extrusion)
 
bool SetScaleFromExtrusionObject (const ON_Plane &frame, const CRhinoExtrusionObject &ext, double dTol=ON_ZERO_TOLERANCE)
 
bool SetScaleFromHatch (const ON_Plane &frame, const ON_Hatch &hatch)
 
bool SetScaleFromLight (const ON_Plane &frame, const ON_Light &light)
 
bool SetScaleFromLine (const ON_Plane &frame, const ON_Line &line)
 
bool SetScaleFromMeshObject (const ON_Plane &frame, const CRhinoMeshObject &mesh, double dTol=ON_ZERO_TOLERANCE)
 
bool SetScaleFromMorphControlObject (const ON_Plane &frame, const CRhinoMorphControl &mc, double dTol=ON_ZERO_TOLERANCE)
 
bool SetScaleFromPlane (const ON_Plane &frame, const ON_Plane &plane)
 
bool SetScaleFromSubDObject (const ON_Plane &frame, const CRhinoSubDObject &ext, double dTol=ON_ZERO_TOLERANCE)
 
bool SetScaleGripDistance (const ON_3dVector &)
 
bool SetScaleGripDistance (int i, double d)
 
void SetToDefaultFrame ()
 
bool Transform (const ON_Xform &xform)
 
bool Translate (ON_3dVector V)
 
bool Write (ON_BinaryArchive &binary_archive) const
 

Static Public Member Functions

static bool GetXform (const CRhinoGumballFrame &f0, const CRhinoGumballFrame &f1, int scale_mode, ON_Xform &xform)
 
static double StatusValue (const CRhinoGumballFrame &f0, const CRhinoGumballFrame &f1, int scale_mode, GUMBALL_MODE gumball_mode)
 

Public Attributes

signed char m_iExtendAxis
 -1 = unset, 0 = x, 1 = y, 2 = z, corresponding to the axis face extension is supported along More...
 
ON_Plane m_plane
 
ON_3dVector m_scale_grip_distance
 
int m_scale_mode
 0 = independent, 1 = xy, 2 = yz, 3 = zx, 4 = xyz More...
 

Static Public Attributes

static const double scale_tolerance
 

Detailed Description

CRhinoGumballFrame class - gumball location settings

Constructor & Destructor Documentation

◆ CRhinoGumballFrame()

CRhinoGumballFrame::CRhinoGumballFrame ( )

◆ ~CRhinoGumballFrame()

CRhinoGumballFrame::~CRhinoGumballFrame ( )

Member Function Documentation

◆ Axis()

const ON_3dVector& CRhinoGumballFrame::Axis ( int  i) const

Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: frame axis

◆ AxisLine()

ON_Line CRhinoGumballFrame::AxisLine ( int  i,
double  length 
) const

◆ AxisPoint()

ON_3dPoint CRhinoGumballFrame::AxisPoint ( int  i,
double  t 
) const

◆ Center()

const ON_3dPoint& CRhinoGumballFrame::Center ( ) const

◆ DragTo()

bool CRhinoGumballFrame::DragTo ( GUMBALL_MODE  gumball_mode,
const CRhinoGumballDragSettings drag_settings,
ON_3dPoint  start_point,
ON_3dPoint  drag_to_point,
CRhinoGumballFrame dragged_gumball_frame,
ON_Line drag_line 
) const

Description: Get a new location for a gumball frame based on an input drag_to_point. Parameters: gumball_mode - [in] indicates which part of the gumball is being dragged. drag_settings - [in] Settings that modify default drag behavior. drag_to_point - [in] dragged_gumball_frame - [out] drag_line - [out]

◆ GetDragToPoint()

bool CRhinoGumballFrame::GetDragToPoint ( GUMBALL_MODE  gumball_mode,
ON_3dPoint  world_pick_point,
ON_Line  world_pick_line,
ON_3dPoint drag_to_point 
) const

Description: Get drag to point from picking information when the world_pick_point is not on the gumball. This typically happens when a GetPoint or grip drag is not being constrained. The returned value in drag_to_point can be passed to DragTo(). Parameters: gumball_mode - [in] indicates which part of the gumball is being dragged. world_pick_point - [in] world coordinate of pick point world_pick_line - [in] world coordinate pick line drag_to_point - [out] Point that can be passed to DragTo()

◆ GetPlane()

bool CRhinoGumballFrame::GetPlane ( int  plane_index,
ON_Plane plane 
) const

Parameters: plane_index - [in] 0 = get yz plane 1 = get zx plane 2 = get xy plane

◆ GetXform()

static bool CRhinoGumballFrame::GetXform ( const CRhinoGumballFrame f0,
const CRhinoGumballFrame f1,
int  scale_mode,
ON_Xform xform 
)
static

Description: Get the transformation determined by two gumball locations. Parameters: f0 - [in] starting gumball frame f1 - [in] ending gumball frame scale_mode - [in] 0 freem 1 x=y, 2 y=z, 3 z=x, 4 x=y=z xform - [out]

◆ IsValid()

bool CRhinoGumballFrame::IsValid ( ) const

◆ Read()

bool CRhinoGumballFrame::Read ( ON_BinaryArchive binary_archive)

◆ ScaleGripDistance()

double CRhinoGumballFrame::ScaleGripDistance ( int  i) const

Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: 0.0 if scale grip is distance is not set

0.0 if scale grip distance is set

◆ ScaleGripPoint()

ON_3dPoint CRhinoGumballFrame::ScaleGripPoint ( int  i) const

Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: Location of scale grip point or ON_UNSET_POINT if it is not defined.

◆ SetCenter()

bool CRhinoGumballFrame::SetCenter ( const ON_3dPoint center)

◆ SetFromArc()

bool CRhinoGumballFrame::SetFromArc ( const ON_Arc arc)

◆ SetFromBoundingBox() [1/2]

bool CRhinoGumballFrame::SetFromBoundingBox ( ON_BoundingBox  bbox)

gumball points

◆ SetFromBoundingBox() [2/2]

bool CRhinoGumballFrame::SetFromBoundingBox ( ON_Plane  frame,
ON_BoundingBox  bbox 
)

Parameters: frame - [in] bbox - [in] bounding box with respect to frame. Returns: True if input is valid and gumball is set. False if input is not valid. In this case, gumball is set to the default.

◆ SetFromBrepObject()

bool CRhinoGumballFrame::SetFromBrepObject ( const CRhinoBrepObject brep,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetFromCircle()

bool CRhinoGumballFrame::SetFromCircle ( const ON_Circle circle)

◆ SetFromClippingPlane()

bool CRhinoGumballFrame::SetFromClippingPlane ( const ON_PlaneSurface clipping_plane)

◆ SetFromCurve()

bool CRhinoGumballFrame::SetFromCurve ( const ON_Curve curve)

◆ SetFromEllipse()

bool CRhinoGumballFrame::SetFromEllipse ( const ON_Ellipse ellipse)

◆ SetFromExtrusion()

bool CRhinoGumballFrame::SetFromExtrusion ( const ON_Extrusion extrusion)

◆ SetFromExtrusionObject()

bool CRhinoGumballFrame::SetFromExtrusionObject ( const CRhinoExtrusionObject ext,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetFromHatch()

bool CRhinoGumballFrame::SetFromHatch ( const ON_Hatch hatch)

◆ SetFromLight()

bool CRhinoGumballFrame::SetFromLight ( const ON_Light light)

◆ SetFromLine()

bool CRhinoGumballFrame::SetFromLine ( const ON_Line line)

◆ SetFromMeshObject()

bool CRhinoGumballFrame::SetFromMeshObject ( const CRhinoMeshObject mesh,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetFromMorphControlObject()

bool CRhinoGumballFrame::SetFromMorphControlObject ( const CRhinoMorphControl mc,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetFromPlane()

bool CRhinoGumballFrame::SetFromPlane ( const ON_Plane plane)

◆ SetFromSubDObject()

bool CRhinoGumballFrame::SetFromSubDObject ( const CRhinoSubDObject ext,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetScaleFromAnnotation()

bool CRhinoGumballFrame::SetScaleFromAnnotation ( const ON_Plane frame,
const class CRhinoAnnotation annotation 
)

◆ SetScaleFromArc()

bool CRhinoGumballFrame::SetScaleFromArc ( const ON_Plane frame,
const ON_Arc arc 
)

◆ SetScaleFromBoundingBox()

bool CRhinoGumballFrame::SetScaleFromBoundingBox ( const ON_Plane frame,
const ON_BoundingBox bbox 
)

These functions only set the size of the scale handles. They do not affect the gumball origin or rotation. In all cases, the first parameter is the plane which defines the Gumball origin and rotation (ie - the object frame)

◆ SetScaleFromBrepObject()

bool CRhinoGumballFrame::SetScaleFromBrepObject ( const ON_Plane frame,
const CRhinoBrepObject brep,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetScaleFromCircle()

bool CRhinoGumballFrame::SetScaleFromCircle ( const ON_Plane frame,
const ON_Circle circle 
)

◆ SetScaleFromClippingPlane()

bool CRhinoGumballFrame::SetScaleFromClippingPlane ( const ON_Plane frame,
const ON_PlaneSurface clipping_plane 
)

◆ SetScaleFromCurve()

bool CRhinoGumballFrame::SetScaleFromCurve ( const ON_Plane frame,
const ON_Curve curve 
)

◆ SetScaleFromEllipse()

bool CRhinoGumballFrame::SetScaleFromEllipse ( const ON_Plane frame,
const ON_Ellipse ellipse 
)

◆ SetScaleFromExtrusion()

bool CRhinoGumballFrame::SetScaleFromExtrusion ( const ON_Plane frame,
const ON_Extrusion extrusion 
)

◆ SetScaleFromExtrusionObject()

bool CRhinoGumballFrame::SetScaleFromExtrusionObject ( const ON_Plane frame,
const CRhinoExtrusionObject ext,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetScaleFromHatch()

bool CRhinoGumballFrame::SetScaleFromHatch ( const ON_Plane frame,
const ON_Hatch hatch 
)

◆ SetScaleFromLight()

bool CRhinoGumballFrame::SetScaleFromLight ( const ON_Plane frame,
const ON_Light light 
)

◆ SetScaleFromLine()

bool CRhinoGumballFrame::SetScaleFromLine ( const ON_Plane frame,
const ON_Line line 
)

◆ SetScaleFromMeshObject()

bool CRhinoGumballFrame::SetScaleFromMeshObject ( const ON_Plane frame,
const CRhinoMeshObject mesh,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetScaleFromMorphControlObject()

bool CRhinoGumballFrame::SetScaleFromMorphControlObject ( const ON_Plane frame,
const CRhinoMorphControl mc,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetScaleFromPlane()

bool CRhinoGumballFrame::SetScaleFromPlane ( const ON_Plane frame,
const ON_Plane plane 
)

◆ SetScaleFromSubDObject()

bool CRhinoGumballFrame::SetScaleFromSubDObject ( const ON_Plane frame,
const CRhinoSubDObject ext,
double  dTol = ON_ZERO_TOLERANCE 
)

◆ SetScaleGripDistance() [1/2]

bool CRhinoGumballFrame::SetScaleGripDistance ( const ON_3dVector )

◆ SetScaleGripDistance() [2/2]

bool CRhinoGumballFrame::SetScaleGripDistance ( int  i,
double  d 
)

◆ SetToDefaultFrame()

void CRhinoGumballFrame::SetToDefaultFrame ( )

◆ StatusValue()

static double CRhinoGumballFrame::StatusValue ( const CRhinoGumballFrame f0,
const CRhinoGumballFrame f1,
int  scale_mode,
GUMBALL_MODE  gumball_mode 
)
static

Description: Get Rhino status bar value of translation distance, scale, or rotation angle. Parameters: f0 - [in] starting frame f1 - [in] ending frame; scale_mode - [in] 0 freem 1 x=y, 2 y=z, 3 z=x, 4 x=y=z gumball_mode - [in]; Returns: If gumball mode is one of the gmode_rotate*, the returned status value is the rotation in radians. If gumball mode is one of the gmode_translate*, the returned status value is the translation distance. If gumball mode is one of the gmode_scale*, the returned status value is the scale multiplier. If the status value cannot be computed, then ON_UNSET_VALUE is returned.

◆ Transform()

bool CRhinoGumballFrame::Transform ( const ON_Xform xform)

◆ Translate()

bool CRhinoGumballFrame::Translate ( ON_3dVector  V)

◆ Write()

bool CRhinoGumballFrame::Write ( ON_BinaryArchive binary_archive) const

Member Data Documentation

◆ m_iExtendAxis

signed char CRhinoGumballFrame::m_iExtendAxis

-1 = unset, 0 = x, 1 = y, 2 = z, corresponding to the axis face extension is supported along

◆ m_plane

ON_Plane CRhinoGumballFrame::m_plane

◆ m_scale_grip_distance

ON_3dVector CRhinoGumballFrame::m_scale_grip_distance

if a coordinate is valid and non-zero, then the world coordinate of the scale grip is m_frame.origin + m_scale_grip_distance.X*m_frame.Xaxis where "X" is x, y or z. Otherwise the scale grip is a "snap-back" view sized grip.

◆ m_scale_mode

int CRhinoGumballFrame::m_scale_mode

0 = independent, 1 = xy, 2 = yz, 3 = zx, 4 = xyz

◆ scale_tolerance

const double CRhinoGumballFrame::scale_tolerance
static