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


C# LineStyle.SetLineWidth方法代码示例

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


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

示例1: surfaceSectionToolStripMenuItem_Click

        private void surfaceSectionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TopoShape oCircle1 = GlobalInstance.BrepTools.MakeCircle(Vector3.ZERO, 20, Vector3.UNIT_Z);
            TopoShape Pipe01_Surf = GlobalInstance.BrepTools.Extrude(oCircle1, 100, Vector3.UNIT_Z);
            renderView.ShowGeometry(Pipe01_Surf, ++shapeId);

            TopoShape oCircle2 = GlobalInstance.BrepTools.MakeCircle(new Vector3(0.0f, 0.0f, 50.0f), 10, Vector3.UNIT_Y);
            TopoShape Pipe02_Surf = GlobalInstance.BrepTools.Extrude(oCircle2, 80, Vector3.UNIT_Y);
            renderView.ShowGeometry(Pipe02_Surf, ++shapeId);

            TopoShape Inters1 = GlobalInstance.BrepTools.SurfaceSection(Pipe01_Surf, Pipe02_Surf);
            if (Inters1 != null)
            {
                SceneNode node = renderView.ShowGeometry(Inters1, ++shapeId);
                LineStyle ls = new LineStyle();
                ls.SetLineWidth(3);
                ls.SetColor(ColorValue.RED);
                node.SetLineStyle(ls);

                GeomCurve curve = new GeomCurve();
                if (curve.Initialize(Inters1))
                {
                    LineStyle ls2 = new LineStyle();
                    ls2.SetColor(ColorValue.GREEN);

                    float start = curve.FirstParameter();
                    float end = curve.LastParameter();
                    for (float ii = start; ii <= end; ii += 0.1f)
                    {
                        List<Vector3> rt = curve.D1(ii);
                        LineNode ln = new LineNode();
                        ln.SetLineStyle(ls2);
                        ln.Set(rt[0], rt[0] + rt[1]);
                        renderView.ShowSceneNode(ln);
                    }
                }
            }
            renderView.RequestDraw();
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:39,代码来源:FormMain.cs

示例2: sectionToolStripMenuItem_Click

        private void sectionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // build two surfaces
            TopoShape arc = GlobalInstance.BrepTools.MakeArc(Vector3.ZERO, 100, 0, 135, Vector3.UNIT_Z);
            TopoShape cir = GlobalInstance.BrepTools.MakeCircle(new Vector3(-200,0,0), 50, Vector3.UNIT_X);
            TopoShape surf1 = GlobalInstance.BrepTools.Extrude(arc, 100, Vector3.UNIT_Z);
            TopoShape surf2 = GlobalInstance.BrepTools.Extrude(cir, 400, Vector3.UNIT_X);

            renderView.ShowGeometry(surf1, ++shapeId);
            //renderView.ShowGeometry(surf2, ++shapeId);

            // compute section wire
            TopoShape wire = GlobalInstance.BrepTools.SurfaceSection(surf1, surf2);
            if (wire == null)
                return;


            SceneNode sectionNode = renderView.ShowGeometry(wire, ++shapeId);
            LineStyle lineStyle = new LineStyle();
            lineStyle.SetLineWidth(4);
            lineStyle.SetColor(ColorValue.RED);
            sectionNode.SetLineStyle(lineStyle);
       
            renderView.RequestDraw();
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:25,代码来源:FormMain.cs


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