本文整理汇总了C#中Box.Move方法的典型用法代码示例。如果您正苦于以下问题:C# Box.Move方法的具体用法?C# Box.Move怎么用?C# Box.Move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box
的用法示例。
在下文中一共展示了Box.Move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InvertedF_2400MHz
public InvertedF_2400MHz(double thickness = 0.0, bool debug = false)
: base("Antenna-2400MHz-Inverted-F")
{
Vector3D feedPoint = new Vector3D(L3 + L4 + L7 + L8 + W2 / 2, 0, 0);
m_thickness = thickness;
// Antenna
Metal copper = new Metal("antenna-inverted-f");
copper.FillColor = new Material.Color(235, 148, 7, 255);
copper.EdgeColor = new Material.Color(235, 148, 7, 255);
uint priority = 100;
uint normDir = 2;
double[,] points = new double[,] {
{ L3+L4+L7, L3+L4+L7, L3, L3, L3+L4+L5, L3+L4+L5, L3+L4, L3+L4, L3+L4+L7-0.1, L3+L4+L7+L8, L3+L4+L7+L8, L3+L4+L7+L8+W2, L3+L4+L7+L8+W2, L3+L4+L7, L3+L4+L7, L1-L2, L1-L2, L1, L1, 0, 0, L3+L4, L3+L4, L3+L4+L5+0.2, L3+L4+L5+0.2, L3+L4+L7-L6-0.2, L3+L4+L7-L6-0.2 },
{ 0, H2+H3, H2+H3, H1+W1-H4, H1+W1-H4, H2+H3+H5+H6, H2+H3+H5+H6, H2+H3+H5, H2+H3+H5, H2+H3 + 0.2, 0, 0, H2+H3+Math.Sqrt(2)/2*W2 + W2/4, H2+H3+H5+Math.Sqrt(2)*W2 -0.08, H1-H8, H1-H8, H1, H1, H1+W1, H1+W1, H2, H2, 0, 0, H2, H2, 0 }
};
m_antenna = new LinearPolygon(null, copper, priority, normDir, 0.0, points, thickness);
m_antenna.Move(-feedPoint); // move feedpoint to origin w/o transformations
this.Add(m_antenna);
if (debug)
{
// Ground plane placeholders (priority = 0)
double groundPlaneWidth = 5.0;
Metal groundPlane = new Metal("ground-plane");
groundPlane.FillColor = new Material.Color(235, 148, 7, 255);
groundPlane.EdgeColor = new Material.Color(235, 148, 7, 255);
//Box groundPlaneLeft = new Box(null, groundPlane, 0, new Vector3D(-W2 / 2 - L8, -groundPlaneWidth, 0), new Vector3D(L3 + L4 + L7, 0, thickness));
Box groundPlaneLeft = new Box(null, groundPlane, 0, new Vector3D(0, -groundPlaneWidth, 0), new Vector3D(L3 + L4 + L7, 0, thickness));
Box groundPlaneRight = new Box(null, groundPlane, 0, new Vector3D(L3 + L4 + L7 + L8 + W2 + L8, -groundPlaneWidth, 0), new Vector3D(L1, 0, thickness));
groundPlaneLeft.Move(-feedPoint);
groundPlaneRight.Move(-feedPoint);
this.Add(groundPlaneLeft);
this.Add(groundPlaneRight);
/*
double pcbWidth = 0.56; // FIXME
Box groundPlaneBottom = new Box(null, groundPlane, 0, new Vector3D(0, -groundPlaneWidth, 0-pcbWidth), new Vector3D(L1, 0, thickness-pcbWidth));
groundPlaneBottom.Move(-feedPoint);
this.Add(groundPlaneBottom);
// Keep-off region
Dielectric keepOff = new Dielectric("keep-off");
keepOff.FillColor = new Material.Color(255, 0, 0, 32);
keepOff.EdgeColor = new Material.Color(255, 0, 0, 32);
Box keepOffArea = new Box(null, keepOff, 0, new Vector3D(-1, 0, 0), new Vector3D(L1 + 1, H1 + W1 + 1, thickness));
keepOffArea.Move(-feedPoint);
this.Add(keepOffArea);
*/
}
}