我有这段代码:试图施放一个对象类型到另一个在Python
const ON_Curve* curve = ...;
const ON_NurbsCurve* nurb = ON_NurbsCurve::Cast(curve);
if(nurb)
{
ON_Ellipse ellipse;
double tolerance = model.m_settings.m_ModelUnitsAndTolerances.m_absolute_tolerance;
bool rc = nurb->IsEllipse(0, &ellipse, tolerance);
它蒙上了ON_NurbsCurve对象ON_Curve对象。我不太确定这在Python中甚至是可能的。我知道我可以接受一个字符串并将其转换为一个整数,如:int(“1”)。我不知道是什么与不是建立在其它对象类型这样做的正确方法。
谢谢
那不是python代码!? – ypnos
这正是问题:我如何在Python中实现这一点? – konrad