本文整理汇总了C#中Autodesk.Evaluate方法的典型用法代码示例。如果您正苦于以下问题:C# Autodesk.Evaluate方法的具体用法?C# Autodesk.Evaluate怎么用?C# Autodesk.Evaluate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Autodesk
的用法示例。
在下文中一共展示了Autodesk.Evaluate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setupParticleSystem
void setupParticleSystem(Autodesk.Revit.DB.Face f, int uDiv, int vDiv, double springDampening, double springRestLength, double springConstant, double mass)
{
BoundingBoxUV bbox = f.GetBoundingBox();
double uStep = (bbox.Max.U - bbox.Min.U)/uDiv;
double vStep = (bbox.Max.V - bbox.Min.V)/vDiv;
for (int j = 0; j <=uDiv; j++) // Y axis is outer loop
{
double u = bbox.Min.U + uStep * j;
for (int i = 0; i <= vDiv; i++) // X axis is inner loop
{
double v = bbox.Min.V + vStep * i;
Particle a = particleSystem.makeParticle(mass, f.Evaluate(new UV(u, v)), false);
if(i > 0)
{
particleSystem.makeSpring(particleSystem.getParticle((i - 1) + (j * (vDiv+1))), a, springRestLength, springConstant, springDampening);
}
if (j > 0)
{
Particle b = particleSystem.getParticle(i + ((j - 1) * (vDiv+1)));
particleSystem.makeSpring(a, b, springRestLength, springConstant, springDampening);
}
if (i == 0 || i == vDiv || j==0 || j==uDiv)
{
a.makeFixed();
}
}
}
}
示例2: CreateReversedCurve
/// <summary>
/// Create a new curve with the same
/// geometry in the reverse direction.
/// rom Jeremy Tammik
/// </summary>
/// <param name="orig">The original curve.</param>
/// <returns>The reversed curve.</returns>
/// <throws cref="NotImplementedException">If the
/// curve type is not supported by this utility.</throws>
static Autodesk.Revit.DB.Curve CreateReversedCurve(Autodesk.Revit.DB.Curve orig)
{
if (orig is Autodesk.Revit.DB.Line)
{
return Autodesk.Revit.DB.Line.CreateBound(
orig.GetEndPoint(1),
orig.GetEndPoint(0));
}
else if (orig is Autodesk.Revit.DB.Arc)
{
return Autodesk.Revit.DB.Arc.Create(orig.GetEndPoint(1),
orig.GetEndPoint(0),
orig.Evaluate(0.5, true));
}
else
{
throw new Exception(
"CreateReversedCurve - Unreachable");
}
}