AddPrimitiveTorus
Overloads
AddPrimitiveTorus(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float torusRadius, float tubeRadius, Vector3D move, UInt16 segmentCount)
public Node AddPrimitiveTorus(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float torusRadius, float tubeRadius, Vector3D move, UInt16 segmentCount)
Primitive Torus 생성
Parameters
| Name | Type | Description |
|---|---|---|
| node | Node | Primitive 부모 노드 |
| nodeName | string | 노드 이름 |
| IsCreateAssembly | bool | Assembly 노드 생성 여부(선택된 노드가 Assembly 일 경우 생성 또는 미생성, Part 인 경우에는 Assembly 생성 안됨) |
| axisAnchor | AxisAnchor | 상자 생성 기준점 지정 |
| color | Color | 색상 |
| torusRadius | float | 고리 반지름 |
| tubeRadius | float | 관 반지름 |
| move | Vector3D | 이동값 |
| segmentCount | UInt16 | 원형 품질 개수(8 ~ 128) |
Returns
| Type | Description |
|---|---|
| Node | 생성된 Node 정보 |
Examples
// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;
private void Example()
{
List<string> strings = new List<string>();
strings.Add("PIPE");
List<Data.Node> nodes = vizcore3dx.Object3D.Find.QuickSearch(strings, false, true, true, false, false);
if (nodes.Count <= 0) return;
Data.Node node = vizcore3dx.Object3D.Primitive.AddPrimitiveTorus(nodes[0], "Primitive Torus", true, Data.AxisAnchor.Min, Color.Yellow, 600, 100, new Data.Vector3D(207699.75f, -60.75f, 6758.44), 64);
vizcore3dx.StatusbarInfo.Text = string.Format("'{0}' 노드 생성", node.NodeName);
}
AddPrimitiveTorus(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float torusRadius, float tubeRadius, float startAngleDegree, float endAngleDegree, Vector3D move, UInt16 segmentCount)
public Node AddPrimitiveTorus(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float torusRadius, float tubeRadius, float startAngleDegree, float endAngleDegree, Vector3D move, UInt16 segmentCount)
Primitive Torus 생성
Parameters
| Name | Type | Description |
|---|---|---|
| node | Node | Primitive 부모 노드 |
| nodeName | string | 노드 이름 |
| IsCreateAssembly | bool | Assembly 노드 생성 여부(선택된 노드가 Assembly 일 경우 생성 또는 미생성, Part 인 경우에는 Assembly 생성 안됨) |
| axisAnchor | AxisAnchor | 상자 생성 기준점 지정 |
| color | Color | 색상 |
| torusRadius | float | 고리 반지름 |
| tubeRadius | float | 관 반지름 |
| startAngleDegree | float | 시작 각도 (360 > value >= 0) |
| endAngleDegree | float | 종료 각도 (360 >= value > startAngleDegree) |
| move | Vector3D | 이동값 |
| segmentCount | UInt16 | 원형 품질 개수(8 ~ 128) |
Returns
| Type | Description |
|---|---|
| Node | 생성된 Node 정보 |
Examples
// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;
private void Example()
{
List<string> strings = new List<string>();
strings.Add("PIPE");
List<Data.Node> nodes = vizcore3dx.Object3D.Find.QuickSearch(strings, false, true, true, false, false);
if (nodes.Count <= 0) return;
Data.Node node = vizcore3dx.Object3D.Primitive.AddPrimitiveTorus(nodes[0], "Primitive Torus", true, Data.AxisAnchor.Min, Color.Yellow, 600, 100, 10, 120, new Data.Vector3D(207699.75f, -60.75f, 6758.44), 64);
vizcore3dx.StatusbarInfo.Text = string.Format("'{0}' 노드 생성", node.NodeName);
}
AddPrimitiveTorus(Node parentNode, string nodeName, List<PrimitiveTorus> primitives, bool IsCreateAssembly)
public Node AddPrimitiveTorus(Node parentNode, string nodeName, List<PrimitiveTorus> primitives, bool IsCreateAssembly)
Primitive Torus 생성
Parameters
| Name | Type | Description |
|---|---|---|
| parentNode | Node | Primitive 부모 노드 |
| nodeName | string | 노드 이름 |
| primitives | List<PrimitiveTorus> | Primitive 정보 리스트 |
| IsCreateAssembly | bool | Assembly 노드 생성 여부(선택된 노드가 Assembly 일 경우 생성 또는 미생성, Part 인 경우에는 Assembly 생성 안됨) |
Returns
| Type | Description |
|---|---|
| Node | 생성된 Node 정보 |
Examples
// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;
private void Example()
{
List<Data.Node> nodes = vizcore3dx.Object3D.FromFilter(Object3dFilter.SELECTED_TOP);
if (nodes.Count <= 0) return;
// 파트 Torus 생성
List<Data.PrimitiveTorus> Torus = new List<Data.PrimitiveTorus>();
Torus.Add(new Data.PrimitiveTorus(
"Black_Part",
Data.AxisAnchor.Min,
Color.Black,
1000,
500,
new Data.Vector3D(6000.0f, 1000.0f, 1000.0f)
));
Data.Node part = vizcore3dx.Object3D.Primitive.AddPrimitiveTorus(nodes[0], "Part_Torus", Torus, false);
// 파트 Torus 하위에 바디 Torus 생성
List<Data.PrimitiveTorus> bodyTorus = new List<Data.PrimitiveTorus>();
bodyTorus.Add(new Data.PrimitiveTorus(
"Blue_Body1",
Data.AxisAnchor.Min,
Color.Blue,
1000,
500,
new Data.Vector3D(0.0f, 1000.0f, 1000.0f)
));
bodyTorus.Add(new Data.PrimitiveTorus(
"Blue_Body2",
Data.AxisAnchor.Min,
Color.Blue,
1000,
500,
new Data.Vector3D(3000.0f, 1000.0f, 1000.0f)
));
bodyTorus.Add(new Data.PrimitiveTorus(
"Blue_Body3",
Data.AxisAnchor.Min,
Color.Blue,
1000,
500,
new Data.Vector3D(9000.0f, 1000.0f, 1000.0f)
));
bodyTorus.Add(new Data.PrimitiveTorus(
"Blue_Body4",
Data.AxisAnchor.Min,
Color.Blue,
1000,
500,
new Data.Vector3D(12000.0f, 1000.0f, 1000.0f)
));
vizcore3dx.Object3D.Primitive.AddPrimitiveTorus(part, "Node", bodyTorus);
}