当前位置: 首页>>代码示例>>C#>>正文


C# Arc.GetEndParameter方法代码示例

本文整理汇总了C#中Arc.GetEndParameter方法的典型用法代码示例。如果您正苦于以下问题:C# Arc.GetEndParameter方法的具体用法?C# Arc.GetEndParameter怎么用?C# Arc.GetEndParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Arc的用法示例。


在下文中一共展示了Arc.GetEndParameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ComputeArcBoundingBox

        private static void ComputeArcBoundingBox(Arc arc, IList<XYZ> pts)
        {
            if (arc == null)
                return;

            if (arc.IsBound)
            {
                ComputeArcBoundingBox(arc, pts, arc.GetEndParameter(0), arc.GetEndParameter(1));
            }
            else
            {
                ComputeArcBoundingBox(arc, pts, 0.0, Math.PI);
                ComputeArcBoundingBox(arc, pts, Math.PI, 2.0 * Math.PI);
            }
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:15,代码来源:DoorWindowUtil.cs

示例2: GetAdjustedEndParameters

        private KeyValuePair<double, double> GetAdjustedEndParameters(Arc arc, bool flipped, double offset)
        {
            double endParam0 = (flipped ? arc.GetEndParameter(1) : arc.GetEndParameter(0)) - offset;
            double endParam1 = (flipped ? arc.GetEndParameter(0) : arc.GetEndParameter(1)) - offset;
            double angle = endParam1 - endParam0;
            endParam0 = MathUtil.PutInRange(endParam0, Math.PI, 2 * Math.PI);
            endParam1 = endParam0 + angle;

            return new KeyValuePair<double, double>(endParam0, endParam1);
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:10,代码来源:DoorWindowInfo.cs

示例3: OffsetArc

        /// <summary>
        /// Offsets an arc along the offset direction from the point on the arc.
        /// </summary>
        /// <param name="arc">The arc.</param>
        /// <param name="offsetPntOnArc">The point on the arc.</param>
        /// <param name="offset">The offset vector.</param>
        /// <returns>The offset Arc.</returns>
        private static Arc OffsetArc(Arc arc, XYZ offsetPntOnArc, XYZ offset)
        {
            if (arc == null || offset == null)
                throw new ArgumentNullException();

            if (offset.IsZeroLength())
                return arc;

            XYZ axis = arc.Normal.Normalize();

            XYZ offsetAlongAxis = axis.Multiply(offset.DotProduct(axis));
            XYZ offsetOrthAxis = offset - offsetAlongAxis;
            XYZ offsetPntToCenter = (arc.Center - offsetPntOnArc).Normalize();

            double signedOffsetLengthTowardCenter = offsetOrthAxis.DotProduct(offsetPntToCenter);
            double newRadius = arc.Radius - signedOffsetLengthTowardCenter; // signedOffsetLengthTowardCenter > 0, minus, < 0, add

            Arc offsetArc = Arc.Create(arc.Center, newRadius, arc.GetEndParameter(0), arc.GetEndParameter(1), arc.XDirection, arc.YDirection);

            offsetArc = GeometryUtil.MoveCurve(offsetArc, offsetAlongAxis) as Arc;

            return offsetArc;
        }
开发者ID:whztt07,项目名称:RevitCustomIFCexporter,代码行数:30,代码来源:SimpleSweptSolidAnalyzer.cs


注:本文中的Arc.GetEndParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。