본문으로 건너뛰기

AddPrimitivePolyhedral

Overloads

NameDescription
AddPrimitivePolyhedral(int bodyIndex, PolyhedralModel data, bool rebuildData)Body 노드에 Polyhedral Primitive 생성
AddPrimitivePolyhedral(int bodyIndex, List<Point> point, float height, Color color, bool rebuildData)Body 노드에 Polyhedral Primitive 생성
AddPrimitivePolyhedral(int bodyIndex, List<Point> point, float baseZ, float height, Color color, bool rebuildData)Body 노드에 Polyhedral Primitive 생성
AddPrimitivePolyhedral(int bodyIndex, List<Point> point, Color color, bool rebuildData)Body 노드에 Polyhedral Primitive 생성

AddPrimitivePolyhedral(int bodyIndex, PolyhedralModel data, bool rebuildData)

public int AddPrimitivePolyhedral(int bodyIndex, PolyhedralModel data, bool rebuildData)

Body 노드에 Polyhedral Primitive 생성

Parameters

NameTypeDescription
bodyIndexint바디(Body) 노드 인덱스
dataPolyhedralModelPolyhedral Primitive Data
rebuildDatabool데이터 재구성 여부

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 */
);

string bodyName = "BODY";
int bodyId =
vizcore3d.Structure.CreateBody(
partNode.Index /* Parent Node Index */
, bodyName /* Node Name */
);

int bodyIndex = vizcore3d.Object3D.GetBodyIndex(bodyId);

{
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.Vertex3D(-0.81781, -0.40693, 0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5395.88545, 2245.88546), new VIZCore3D.NET.Data.Vertex3D(-0.81781, -0.40693, 0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5387.40017, 2254.37074), new VIZCore3D.NET.Data.Vertex3D(-0.81781, -0.40693, 0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.75403, -5386.82035, 2253.81806), new VIZCore3D.NET.Data.Vertex3D(-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.Vertex3D(0.81781, 0.40693, -0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5209.08212, 2076.05269), new VIZCore3D.NET.Data.Vertex3D(0.81781, 0.40693, -0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5217.56740, 2067.56741), new VIZCore3D.NET.Data.Vertex3D(0.81781, 0.40693, -0.40693));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34231.84897, -5216.70927, 2066.74943), new VIZCore3D.NET.Data.Vertex3D(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.Vertex3D(-0.57505, 0.60553, -0.55014));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.11946, -5208.50230, 2075.50000), new VIZCore3D.NET.Data.Vertex3D(-0.57505, 0.60553, -0.55014));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34231.84897, -5216.70927, 2066.74943), new VIZCore3D.NET.Data.Vertex3D(-0.57505, 0.60553, -0.55014));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.48354, -5395.02732, 2245.06749), new VIZCore3D.NET.Data.Vertex3D(-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.Vertex3D(-0.02254, -0.68391, -0.72921));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34231.84897, -5216.70927, 2066.74943), new VIZCore3D.NET.Data.Vertex3D(-0.02254, -0.68391, -0.72921));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5217.56740, 2067.56741), new VIZCore3D.NET.Data.Vertex3D(0.00000, -0.70711, -0.70711));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5395.88545, 2245.88546), new VIZCore3D.NET.Data.Vertex3D(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.Vertex3D(0.57549, -0.57828, 0.57828));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5217.56740, 2067.56741), new VIZCore3D.NET.Data.Vertex3D(0.57549, -0.57828, 0.57828));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5209.08212, 2076.05269), new VIZCore3D.NET.Data.Vertex3D(0.57549, -0.57828, 0.57828));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33874.31755, -5387.40017, 2254.37074), new VIZCore3D.NET.Data.Vertex3D(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.Vertex3D(0.00000, 0.70711, 0.70711));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.68297, -5209.08212, 2076.05269), new VIZCore3D.NET.Data.Vertex3D(0.00000, 0.70711, 0.70711));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(34232.11946, -5208.50230, 2075.50000), new VIZCore3D.NET.Data.Vertex3D(0.02254, 0.68391, 0.72921));
contour.Add(new VIZCore3D.NET.Data.Vertex3D(33873.75403, -5386.82035, 2253.81806), new VIZCore3D.NET.Data.Vertex3D(0.02254, 0.68391, 0.72921));

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

vizcore3d.MeshEdit.AddPrimitivePolyhedral(
bodyIndex /* Body Node Index */
, polyhedral /* Polyhedral Model */
, false /* Rebuild Data */
);
}

vizcore3d.Structure.RebuildData();
}

AddPrimitivePolyhedral(int bodyIndex, List<Point> point, float height, Color color, bool rebuildData)

public int AddPrimitivePolyhedral(int bodyIndex, List&lt;Point&gt; point, float height, Color color, bool rebuildData)

Body 노드에 Polyhedral Primitive 생성

Parameters

NameTypeDescription
bodyIndexint바디(Body) 노드 인덱스
pointList<Point>2D Point List
heightfloatHeight
colorColorColor
rebuildDatabool데이터 재구성 여부

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 */
);

string bodyName = "BODY";
int bodyId =
vizcore3d.Structure.CreateBody(
partNode.Index /* Parent Node Index */
, bodyName /* Node Name */
);

int bodyIndex = vizcore3d.Object3D.GetBodyIndex(bodyId);

{
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.AddPrimitivePolyhedral(
bodyIndex /* Body Node Index */
, point /* Point */
, 300.0f /* Height */
, Color.Orange /* Color */
, false /* Rebuild Data */
);
}

vizcore3d.Structure.RebuildData();
}

AddPrimitivePolyhedral(int bodyIndex, List<Point> point, float baseZ, float height, Color color, bool rebuildData)

public int AddPrimitivePolyhedral(int bodyIndex, List&lt;Point&gt; point, float baseZ, float height, Color color, bool rebuildData)

Body 노드에 Polyhedral Primitive 생성

Parameters

NameTypeDescription
bodyIndexint바디(Body) 노드 인덱스
pointList<Point>2D Point List
baseZfloatBase Z Position (Depth)
heightfloatHeight
colorColorColor
rebuildDatabool데이터 재구성 여부

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 */
);

string bodyName = "BODY";
int bodyId =
vizcore3d.Structure.CreateBody(
partNode.Index /* Parent Node Index */
, bodyName /* Node Name */
);

int bodyIndex = vizcore3d.Object3D.GetBodyIndex(bodyId);

{
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.AddPrimitivePolyhedral(
bodyIndex /* Body Node Index */
, point /* Point */
, 0.0f /* Base Z Position (Depth) */
, 300.0f /* Height */
, Color.Orange /* Color */
, false /* Rebuild Data */
);
}

vizcore3d.Structure.RebuildData();
}

AddPrimitivePolyhedral(int bodyIndex, List<Point> point, Color color, bool rebuildData)

public int AddPrimitivePolyhedral(int bodyIndex, List&lt;Point&gt; point, Color color, bool rebuildData)

Body 노드에 Polyhedral Primitive 생성

Parameters

NameTypeDescription
bodyIndexint바디(Body) 노드 인덱스
pointList<Point>2D Point List
colorColorColor
rebuildDatabool데이터 재구성 여부

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 */
);

string bodyName = "BODY";
int bodyId =
vizcore3d.Structure.CreateBody(
partNode.Index /* Parent Node Index */
, bodyName /* Node Name */
);

int bodyIndex = vizcore3d.Object3D.GetBodyIndex(bodyId);

{
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.AddPrimitivePolyhedral(
bodyIndex /* Body Node Index */
, point /* Point */
, Color.Orange /* Color */
, false /* Rebuild Data */
);
}

vizcore3d.Structure.RebuildData();
}