本文整理汇总了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();
}
示例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();
}