AddPrimitiveSphere
Overloads
AddPrimitiveSphere(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float radius, Vector3D move, UInt16 segmentCount)
public Node AddPrimitiveSphere(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float radius, Vector3D move, UInt16 segmentCount)
Primitive Sphere 생성
Parameters
| Name | Type | Description |
|---|---|---|
| node | Node | Primitive 부모 노드 |
| nodeName | string | 노드 이름 |
| IsCreateAssembly | bool | Assembly 노드 생성 여부(선택된 노드가 Assembly 일 경우 생성 또는 미생성, Part 인 경우에는 Assembly 생성 안됨) |
| axisAnchor | AxisAnchor | 상자 생성 기준점 지정 |
| color | Color | 색상 |
| radius | 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.AddPrimitiveSphere(nodes[0], "Primitive Sphere", true, Data.AxisAnchor.Min, Color.Yellow, 600, new Data.Vector3D(207699.75f, -60.75f, 6758.44), 64);
vizcore3dx.StatusbarInfo.Text = string.Format("'{0}' 노드 생성", node.NodeName);
}
AddPrimitiveSphere(Node parentNode, string nodeName, List<PrimitiveSphere> primitives, bool IsCreateAssembly)
public Node AddPrimitiveSphere(Node parentNode, string nodeName, List<PrimitiveSphere> primitives, bool IsCreateAssembly)
Primitive Sphere 생성
Parameters
| Name | Type | Description |
|---|---|---|
| parentNode | Node | Primitive 부모 노드 |
| nodeName | string | 노드 이름 |
| primitives | List<PrimitiveSphere> | 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;
// 파트 Sphere 생성
List<Data.PrimitiveSphere> Sphere = new List<Data.PrimitiveSphere>();
Sphere.Add(new Data.PrimitiveSphere(
"Black_Part",
Data.AxisAnchor.Min,
Color.Black,
1000,
new Data.Vector3D(6000.0f, 1000.0f, 1000.0f)
));
Data.Node part = vizcore3dx.Object3D.Primitive.AddPrimitiveSphere(nodes[0], "Part_Sphere", Sphere, false);
// 파트 Sphere 하위에 바디 Sphere 생성
List<Data.PrimitiveSphere> bodySphere = new List<Data.PrimitiveSphere>();
bodySphere.Add(new Data.PrimitiveSphere(
"Blue_Body1",
Data.AxisAnchor.Min,
Color.Blue,
1000,
new Data.Vector3D(0.0f, 1000.0f, 1000.0f)
));
bodySphere.Add(new Data.PrimitiveSphere(
"Blue_Body2",
Data.AxisAnchor.Min,
Color.Blue,
1000,
new Data.Vector3D(3000.0f, 1000.0f, 1000.0f)
));
bodySphere.Add(new Data.PrimitiveSphere(
"Blue_Body3",
Data.AxisAnchor.Min,
Color.Blue,
1000,
new Data.Vector3D(9000.0f, 1000.0f, 1000.0f)
));
bodySphere.Add(new Data.PrimitiveSphere(
"Blue_Body4",
Data.AxisAnchor.Min,
Color.Blue,
1000,
new Data.Vector3D(12000.0f, 1000.0f, 1000.0f)
));
vizcore3dx.Object3D.Primitive.AddPrimitiveSphere(part, "Node", bodySphere);
}