본문으로 건너뛰기

AddPrimitiveSphere

Overloads

NameDescription
AddPrimitiveSphere(Node node, string nodeName, bool IsCreateAssembly, AxisAnchor axisAnchor, Color color, float radius, Vector3D move, UInt16 segmentCount)Primitive Sphere 생성
AddPrimitiveSphere(Node parentNode, string nodeName, List<PrimitiveSphere> primitives, bool IsCreateAssembly)Primitive Sphere 생성

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

NameTypeDescription
nodeNodePrimitive 부모 노드
nodeNamestring노드 이름
IsCreateAssemblyboolAssembly 노드 생성 여부(선택된 노드가 Assembly 일 경우 생성 또는 미생성, Part 인 경우에는 Assembly 생성 안됨)
axisAnchorAxisAnchor상자 생성 기준점 지정
colorColor색상
radiusfloat반지름
moveVector3D이동값
segmentCountUInt16원형 품질 개수(8 ~ 128)

Returns

TypeDescription
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&lt;PrimitiveSphere&gt; primitives, bool IsCreateAssembly)

Primitive Sphere 생성

Parameters

NameTypeDescription
parentNodeNodePrimitive 부모 노드
nodeNamestring노드 이름
primitivesList<PrimitiveSphere>Primitive 정보 리스트
IsCreateAssemblyboolAssembly 노드 생성 여부(선택된 노드가 Assembly 일 경우 생성 또는 미생성, Part 인 경우에는 Assembly 생성 안됨)

Returns

TypeDescription
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);
}