RH_C_FUNCTION bool ON_Curve_IsEllipse( const ON_Curve* pCurve, int ignore, ON_PLANE_STRUCT* plane, ON_Ellipse* ellipse, double tolerance ) { bool rc = false; if( pCurve ) { // ignore = 0 (none) // ignore = 1 (ignore plane) // ignore = 2 (ignore plane and ellipse) if( ignore>0 ) plane = NULL; if( ignore>1 ) ellipse = NULL; ON_Plane temp; ON_Plane* pPlane = NULL; if( plane ) { temp = FromPlaneStruct(*plane); pPlane = &temp; } rc = pCurve->IsEllipse(pPlane,ellipse,tolerance); if( plane ) CopyToPlaneStruct(*plane, temp); } return rc; }
RH_C_FUNCTION bool ON_Curve_IsArc( const ON_Curve* pCurve, int ignore, ON_PLANE_STRUCT* plane, ON_Arc* arc, double tolerance ) { bool rc = false; if( pCurve ) { // ignore = 0 (none) // ignore = 1 (ignore plane) // ignore = 2 (ignore plane and arc) if( ignore>0 ) plane = NULL; if( ignore>1 ) arc = NULL; ON_Plane temp; ON_Plane* pPlane = NULL; if( plane ) { temp = FromPlaneStruct(*plane); pPlane = &temp; } rc = pCurve->IsArc(pPlane,arc,tolerance)?true:false; if( plane ) CopyToPlaneStruct(*plane, temp); } return rc; }
RH_C_FUNCTION void ON_Annotation2_Plane(ON_Annotation2* ptr, ON_PLANE_STRUCT* plane, bool set) { if( ptr && plane ) { if( set ) ptr->m_plane = FromPlaneStruct(*plane); else CopyToPlaneStruct(*plane, ptr->m_plane); } }
RH_C_FUNCTION bool ON_Quaternion_GetRotation( const ON_Quaternion* q, ON_PLANE_STRUCT* plane) { bool rc = false; if( q && plane ) { ON_Plane temp; rc = q->GetRotation(temp); CopyToPlaneStruct(*plane, temp); } return rc; }
RH_C_FUNCTION bool ON_Extrusion_GetPlane(const ON_Extrusion* pConstExtrusion, bool profilePlane, double s, ON_PLANE_STRUCT* plane) { bool rc = false; if( pConstExtrusion && plane ) { ON_Plane _plane; if( profilePlane ) rc = pConstExtrusion->GetProfilePlane(s, _plane); else rc = pConstExtrusion->GetPathPlane(s, _plane); if( rc ) CopyToPlaneStruct(*plane, _plane); } return rc; }
RH_C_FUNCTION bool ON_Curve_FrameAt( const ON_Curve* pConstCurve, double t, ON_PLANE_STRUCT* plane, bool zero_twisting) { bool rc = false; if( pConstCurve && plane ) { ON_Plane temp; #if defined(OPENNURBS_BUILD) rc = pConstCurve->FrameAt(t, temp)?true:false; #else // rhino.exe build if( zero_twisting ) rc = RhinoGetPerpendicularCurvePlane(pConstCurve, t, temp); else rc = pConstCurve->FrameAt(t, temp)?true:false; #endif CopyToPlaneStruct(*plane, temp); } return rc; }
RH_C_FUNCTION bool ON_Curve_IsPlanar( const ON_Curve* pCurve, bool ignorePlane, ON_PLANE_STRUCT* plane, double tolerance ) { bool rc = false; if(ignorePlane) plane = NULL; if( pCurve ) { ON_Plane temp; ON_Plane* pPlane = NULL; if( plane ) { temp = FromPlaneStruct(*plane); pPlane = &temp; } rc = pCurve->IsPlanar(pPlane, tolerance)?true:false; if( plane ) CopyToPlaneStruct(*plane, temp); } return rc; }