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


C# NsNode.SimpleQuery方法代码示例

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


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

示例1: TapeContour

        void TapeContour(NsNode node, int ply, double den, double width)
        {
            double[] dir = direction.Point;
            if (Math.Abs(dir[0]) < 1e-5 && Math.Abs(dir[1]) < 1e-5)
            {
                MessageBox.Show("Must specify a taping direction");
                return;
            }

            double[] ofs = offset.Point;

            List<IAttribute> lines = new List<IAttribute>(1);
            List<devDept.Geometry.Point3D> pnts = null;
            if (node.SimpleQuery("PolylineAttribute=*", lines, true))
            {
                pnts = (List<devDept.Geometry.Point3D>)lines[0].Value;
            }
            if (pnts != null && pnts.Count > 2)
                CreateContour(den, width, dir, ofs, pnts);
        }
开发者ID:GMTurbo,项目名称:Free-Form-Matcher,代码行数:20,代码来源:ContourMaker.cs

示例2: TapeRosette

        void TapeRosette(NsNode node, int ply, double den, double width)
        {
            double rad = 0;
            if (radius.Text != "")
                rad = double.Parse(radius.Text);
            if (rad <= 0)
            {
                MessageBox.Show("Must enter a positive radius");
                return;
            }

            double ntapes  = 0;

            if ( numtapes.Text != "")
                ntapes = double.Parse(numtapes.Text);
            if (ntapes <= 0)
            {
                MessageBox.Show("Must enter a positive number of tapes");
                return;
            }

            double[] ang = angles.Point;
            if (Math.Abs(ang[0]) < 1e-5 && Math.Abs(ang[1]) < 1e-5)
            {
                MessageBox.Show("Both angles cannot be 0");
                return;
            }

            List<IAttribute> lines = new List<IAttribute>(3);
            List<double[]> pnts = null;
            PointAttribute pnt;
            if (node.SimpleQuery("PointAttribute=*", lines, true))
            {
                pnts = new List<double[]>(lines.Count);
                foreach (IAttribute atr in lines)
                {
                    if (atr is PointAttribute)
                    {
                        pnt = atr as PointAttribute;
                        pnts.Add((double[])pnt.Value);
                    }
                }
            }
            if (pnts != null && pnts.Count >= 1)
                CreateRosettes(pnts, ply, den, width, rad, ntapes, ang[0], ang[1]);
        }
开发者ID:GMTurbo,项目名称:Free-Form-Matcher,代码行数:46,代码来源:ContourMaker.cs


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