private void OnSceneGUI() { 通孔 t = target as 通孔; Handles.color = Color.yellow; HandleExtention.DrawColumn(t.transform, Vector3.zero, t.直径 * 0.001f / 2, t.厚度 * 0.001f); }
private void OnSceneGUI() { 螺丝 t = target as 螺丝; Handles.color = Color.yellow; HandleExtention.DrawColumn(t.transform, Vector3.zero + Vector3.forward * t.长度 * 0.001f / 2, t.直径 * 0.001f / 2, t.长度 * 0.001f); HandleExtention.DrawEnd(t.transform, Vector3.zero + Vector3.forward * t.长度 * 0.001f, t.直径 * 0.001f / 2, 0); }
private void OnSceneGUI() { 双层通孔 t = target as 双层通孔; Handles.color = Color.yellow; HandleExtention.DrawColumn(t.transform, Vector3.zero + Vector3.forward * t.厚度1 * 0.001f / 2, t.直径1 * 0.001f / 2, t.厚度1 * 0.001f); HandleExtention.DrawColumn(t.transform, Vector3.zero - Vector3.forward * t.厚度2 * 0.001f / 2, t.直径2 * 0.001f / 2, t.厚度2 * 0.001f); }
public static void DrawDualHole(Transform transform, Vector3 center, float distanceBetweenCenters, float radius, float thickness) { var center1 = center + Vector3.left * distanceBetweenCenters / 2; var center2 = center - Vector3.left * distanceBetweenCenters / 2; HandleExtention.DrawColumn(transform, center1, radius, thickness); HandleExtention.DrawColumn(transform, center2, radius, thickness); HandleExtention.DrawBeam(transform, center1, center2, thickness, radius * 2); }