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