Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:sdksamples:curvecast [2015/09/14]
127.0.0.1 external edit
developer:sdksamples:curvecast [2016/02/10] (current)
sandy
Line 1: Line 1:
 ====== Determine Curve Object Types ====== ====== Determine Curve Object Types ======
 ====== C++ ====== ====== C++ ======
-> **Summary:​** //​Demonstrates how to determine the curve type using the Rhino SDK.//+> **Summary:​** //​Demonstrates how to determine the curve type using the Rhino SDK//
  
 =====Question===== =====Question=====
-Given an **ON_Curve**,​ how can I determine which kind of **ON_Curve**-derived object it really is? (e.g. **ON_LineCurve**,​ **ON_ArcCurve**,​ **ON_PolylineCurve**,​ **ON_PolyCurve**,​ **ON_NurbsCurve**,​ etc.)?+Given an **ON_Curve**,​ how can I determine which kind of **ON_Curve**-derived object it really is? (e.g. **ON_LineCurve**,​ **ON_ArcCurve**,​ **ON_PolylineCurve**,​ **ON_PolyCurve**,​ **ON_NurbsCurve**,​ etc.)
  
 =====Answer===== =====Answer=====
  
-Basically, you try to cast the **ON_Curve** object to one of the **ON_Curve**-derived classes using it'​s ​**Cast** operator. If the cast operation is success, you are good to go. If it fails, then you know the test object is some other **ON_Curve**-derived object.+Basically, you try to cast the **ON_Curve** object to one of the **ON_Curve**-derived classes using its **Cast** operator. If the cast operation is successful, you are good to go. If it fails, then you know the test object is some other **ON_Curve**-derived object.
  
 =====Example===== =====Example=====
developer/sdksamples/curvecast.txt ยท Last modified: 2016/02/10 by sandy