본문으로 건너뛰기

CreateBodyPrimitivePolyhedral

Overloads

NameDescription
CreateBodyPrimitivePolyhedral(int nodeIndex, string name, PolyhedralModel data)Body 노드 생성 - Primitive Polyhedral
CreateBodyPrimitivePolyhedral(int nodeIndex, string name, List<Point> point, float height, Color color)Body 노드 생성 - Primitive Polyhedral
CreateBodyPrimitivePolyhedral(int nodeIndex, string name, List<Point> point, float baseZ, float height, Color color)Body 노드 생성 - Primitive Polyhedral

CreateBodyPrimitivePolyhedral(int nodeIndex, string name, PolyhedralModel data)

public int CreateBodyPrimitivePolyhedral(int nodeIndex, string name, PolyhedralModel data)

Body 노드 생성 - Primitive Polyhedral

Parameters

NameTypeDescription
nodeIndexint부모 노드 인덱스
namestring생성할 노드의 이름
dataPolyhedralModelPolyhedral Primitive Data

Returns

TypeDescription
int생성된 노드(BODY) 아이디

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
// New Empty Model
int index = vizcore3d.Model.NewEmptyModel("MODEL");

string assemblyName = "ASSEMBLY";
VIZCore3D.NET.Data.Node assemblyNode =
vizcore3d.Structure.CreateNode(
index /* Parent Node Index */
, VIZCore3D.NET.Data.NodeKind.ASSEMBLY /* Node Kind */
, assemblyName /* Node Name */
);

string partName = "PART";
VIZCore3D.NET.Data.Node partNode =
vizcore3d.Structure.CreateNode(
assemblyNode.Index /* Parent Node Index */
, VIZCore3D.NET.Data.NodeKind.PART /* Node Kind */
, partName /* Node Name */
);


{
VIZCore3D.NET.Data.PolyhedralModel polyhedral = new VIZCore3D.NET.Data.PolyhedralModel();
polyhedral.ModelColor = Color.Green;

{
VIZCore3D.NET.Data.PolyhedralContour contour = new VIZCore3D.NET.Data.PolyhedralContour();
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.48354, -5395.02732, 2245.06749), new VIZCore3D.NET.Data.Vector3D(-0.81781, -0.40693, 0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5395.88545, 2245.88546), new VIZCore3D.NET.Data.Vector3D(-0.81781, -0.40693, 0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5387.40017, 2254.37074), new VIZCore3D.NET.Data.Vector3D(-0.81781, -0.40693, 0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.75403, -5386.82035, 2253.81806), new VIZCore3D.NET.Data.Vector3D(-0.81781, -0.40693, 0.40693));

VIZCore3D.NET.Data.PolyhedralFace face = new VIZCore3D.NET.Data.PolyhedralFace(contour);
polyhedral.Face.Add(face);
}

{
VIZCore3D.NET.Data.PolyhedralContour contour = new VIZCore3D.NET.Data.PolyhedralContour();
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.11946, -5208.50230, 2075.50000), new VIZCore3D.NET.Data.Vector3D(0.81781, 0.40693, -0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5209.08212, 2076.05269), new VIZCore3D.NET.Data.Vector3D(0.81781, 0.40693, -0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5217.56740, 2067.56741), new VIZCore3D.NET.Data.Vector3D(0.81781, 0.40693, -0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34231.84897, -5216.70927, 2066.74943), new VIZCore3D.NET.Data.Vector3D(0.81781, 0.40693, -0.40693));

VIZCore3D.NET.Data.PolyhedralFace face = new VIZCore3D.NET.Data.PolyhedralFace(contour);
polyhedral.Face.Add(face);
}

{
VIZCore3D.NET.Data.PolyhedralContour contour = new VIZCore3D.NET.Data.PolyhedralContour();
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.75403, -5386.82035, 2253.81806), new VIZCore3D.NET.Data.Vector3D(-0.57505, 0.60553, -0.55014));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.11946, -5208.50230, 2075.50000), new VIZCore3D.NET.Data.Vector3D(-0.57505, 0.60553, -0.55014));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34231.84897, -5216.70927, 2066.74943), new VIZCore3D.NET.Data.Vector3D(-0.57505, 0.60553, -0.55014));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.48354, -5395.02732, 2245.06749), new VIZCore3D.NET.Data.Vector3D(-0.57505, 0.60553, -0.55014));

VIZCore3D.NET.Data.PolyhedralFace face = new VIZCore3D.NET.Data.PolyhedralFace(contour);
polyhedral.Face.Add(face);
}

{
VIZCore3D.NET.Data.PolyhedralContour contour = new VIZCore3D.NET.Data.PolyhedralContour();
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.48354, -5395.02732, 2245.06749), new VIZCore3D.NET.Data.Vector3D(-0.02254, -0.68391, -0.72921));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34231.84897, -5216.70927, 2066.74943), new VIZCore3D.NET.Data.Vector3D(-0.02254, -0.68391, -0.72921));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5217.56740, 2067.56741), new VIZCore3D.NET.Data.Vector3D(0.00000, -0.70711, -0.70711));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5395.88545, 2245.88546), new VIZCore3D.NET.Data.Vector3D(0.00000, -0.70711, -0.70711));

VIZCore3D.NET.Data.PolyhedralFace face = new VIZCore3D.NET.Data.PolyhedralFace(contour);
polyhedral.Face.Add(face);
}

{
VIZCore3D.NET.Data.PolyhedralContour contour = new VIZCore3D.NET.Data.PolyhedralContour();
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5395.88545, 2245.88546), new VIZCore3D.NET.Data.Vector3D(0.57549, -0.57828, 0.57828));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5217.56740, 2067.56741), new VIZCore3D.NET.Data.Vector3D(0.57549, -0.57828, 0.57828));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5209.08212, 2076.05269), new VIZCore3D.NET.Data.Vector3D(0.57549, -0.57828, 0.57828));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5387.40017, 2254.37074), new VIZCore3D.NET.Data.Vector3D(0.57549, -0.57828, 0.57828));

VIZCore3D.NET.Data.PolyhedralFace face = new VIZCore3D.NET.Data.PolyhedralFace(contour);
polyhedral.Face.Add(face);
}

{
VIZCore3D.NET.Data.PolyhedralContour contour = new VIZCore3D.NET.Data.PolyhedralContour();
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5387.40017, 2254.37074), new VIZCore3D.NET.Data.Vector3D(0.00000, 0.70711, 0.70711));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5209.08212, 2076.05269), new VIZCore3D.NET.Data.Vector3D(0.00000, 0.70711, 0.70711));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.11946, -5208.50230, 2075.50000), new VIZCore3D.NET.Data.Vector3D(0.02254, 0.68391, 0.72921));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.75403, -5386.82035, 2253.81806), new VIZCore3D.NET.Data.Vector3D(0.02254, 0.68391, 0.72921));

VIZCore3D.NET.Data.PolyhedralFace face = new VIZCore3D.NET.Data.PolyhedralFace(contour);
polyhedral.Face.Add(face);
}

vizcore3d.MeshEdit.CreateBodyPrimitivePolyhedral(
partNode.Index /* Node Index */
, polyhedral /* Polyhedral Model */
, false /* Rebuild Data */
);
}

vizcore3d.Structure.RebuildData();
}

CreateBodyPrimitivePolyhedral(int nodeIndex, string name, List<Point> point, float height, Color color)

public int CreateBodyPrimitivePolyhedral(int nodeIndex, string name, List&lt;Point&gt; point, float height, Color color)

Body 노드 생성 - Primitive Polyhedral

Parameters

NameTypeDescription
nodeIndexint부모 노드 인덱스
namestring생성할 노드의 이름
pointList<Point>2D Point List
heightfloatHeight
colorColorColor

Returns

TypeDescription
int노드(BODY) 아이디

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
// New Empty Model
int index = vizcore3d.Model.NewEmptyModel("MODEL");

string assemblyName = "ASSEMBLY";
VIZCore3D.NET.Data.Node assemblyNode =
vizcore3d.Structure.CreateNode(
index /* Parent Node Index */
, VIZCore3D.NET.Data.NodeKind.ASSEMBLY /* Node Kind */
, assemblyName /* Node Name */
);

string partName = "PART";
VIZCore3D.NET.Data.Node partNode =
vizcore3d.Structure.CreateNode(
assemblyNode.Index /* Parent Node Index */
, VIZCore3D.NET.Data.NodeKind.PART /* Node Kind */
, partName /* Node Name */
);

{
List<Point> point = new List<Point>();

point.Add(new Point(100, 0));
point.Add(new Point(600, 0));
point.Add(new Point(600, -600));
point.Add(new Point(0, -600));
point.Add(new Point(0, -100));
point.Add(new Point(100, -100));

vizcore3d.MeshEdit.CreateBodyPrimitivePolyhedral(
partNode.Index /* Parent Node Index */
, point /* Point */
, 300.0f /* Height */
, Color.Orange /* Color */
);
}
}

CreateBodyPrimitivePolyhedral(int nodeIndex, string name, List<Point> point, float baseZ, float height, Color color)

public int CreateBodyPrimitivePolyhedral(int nodeIndex, string name, List&lt;Point&gt; point, float baseZ, float height, Color color)

Body 노드 생성 - Primitive Polyhedral

Parameters

NameTypeDescription
nodeIndexint부모 노드 인덱스
namestring생성할 노드의 이름
pointList<Point>2D Point List
baseZfloat기준면 위치
heightfloatHeight(Depth)
colorColorColor

Returns

TypeDescription
int노드(BODY) 아이디

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
// New Empty Model
int index = vizcore3d.Model.NewEmptyModel("MODEL");

string assemblyName = "ASSEMBLY";
VIZCore3D.NET.Data.Node assemblyNode =
vizcore3d.Structure.CreateNode(
index /* Parent Node Index */
, VIZCore3D.NET.Data.NodeKind.ASSEMBLY /* Node Kind */
, assemblyName /* Node Name */
);

string partName = "PART";
VIZCore3D.NET.Data.Node partNode =
vizcore3d.Structure.CreateNode(
assemblyNode.Index /* Parent Node Index */
, VIZCore3D.NET.Data.NodeKind.PART /* Node Kind */
, partName /* Node Name */
);

{
List<Point> point = new List<Point>();

point.Add(new Point(100, 0));
point.Add(new Point(600, 0));
point.Add(new Point(600, -600));
point.Add(new Point(0, -600));
point.Add(new Point(0, -100));
point.Add(new Point(100, -100));

vizcore3d.MeshEdit.CreateBodyPrimitivePolyhedral(
partNode.Index /* Parent Node Index */
, point /* Point */
, 200.0f /* Base Z (Depth) */
, 300.0f /* Height */
, Color.Orange /* Color */
);
}
}