본문으로 건너뛰기

GetBoundBoxByPlaneVertex

Overloads

NameDescription
GetBoundBoxByPlaneVertex(List<int> index, Vector3D normal)[바운드 박스] Vertex 좌표 반환
GetBoundBoxByPlaneVertex(List<Node> node, Vector3D normal)[바운드 박스] Vertex 좌표 반환

GetBoundBoxByPlaneVertex(List<int> index, Vector3D normal)

public BoundBoxParameter GetBoundBoxByPlaneVertex(List&lt;int&gt; index, Vector3D normal)

[바운드 박스] Vertex 좌표 반환

Parameters

NameTypeDescription
indexList<int>노드 인덱스
normalVector3D면 방향(Normal)

Returns

TypeDescription
BoundBoxParameterBoundBox Parameter

Examples

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

private void Example()
{
List<Data.Node> nodes = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.SELECTED_TOP);

List<int> nodesIdx = new List<int>();
foreach (Data.Node item in nodes)
nodesIdx.Add(item.Index);

Data.BoundBoxParameter param = vizcore3d.Review.Measure.GetBoundBoxByPlaneVertex(
nodesIdx /* Node Index List */
, new Data.Vector3D(0, 0, 1) /* Normal */
);

// Show Result
vizcore3d.ShapeDrawing.AddVertex(
param.VertexItems /* Vertex List */
, 0 /* Group Id */
, Color.Red /* Color */
, 3.0f /* Radius */
, 3.0f /* Size */
, true /* Visible */
);
}

private void Example_DrawBox()
{
List<Data.Node> nodes = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.SELECTED_TOP);

List<int> nodesIdx = new List<int>();
foreach (Data.Node item in nodes)
nodesIdx.Add(item.Index);

Data.BoundBoxParameter param = vizcore3d.Review.Measure.GetBoundBoxByPlaneVertex(
nodesIdx /* Node Index List */
, new Data.Vertex3D(0, 0, 1) /* Normal */
);

vizcore3d.BeginUpdate();

// Draw Custom Line
int shapeId = vizcore3d.ShapeDrawing.AddLine(
param.GetShapeDrawingLineParameter()
, 0
, Color.Black
, 5.0f
, true
);

// Use DepthTest
vizcore3d.ShapeDrawing.DepthTest = true;

// Draw Point
for (int i = 0; i < 8; i++)
{
int noteId = vizcore3d.Review.Note.AddNote3D(i.ToString(), param.VertexItems[i]);

// Set DepthTest
vizcore3d.Review.Note.EnableDepthTest(noteId, true);
}

vizcore3d.EndUpdate();
}

GetBoundBoxByPlaneVertex(List<Node> node, Vector3D normal)

public BoundBoxParameter GetBoundBoxByPlaneVertex(List&lt;Node&gt; node, Vector3D normal)

[바운드 박스] Vertex 좌표 반환

Parameters

NameTypeDescription
nodeList<Node>노드
normalVector3D면 방향(Normal)

Returns

TypeDescription
BoundBoxParameterBoundBox Parameter

Examples

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

private void Example()
{
List<Data.Node> nodes = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.SELECTED_TOP);

Data.BoundBoxParameter param = vizcore3d.Review.Measure.GetBoundBoxByPlaneVertex(
nodes /* Node */
, new Data.Vector3D(0, 0, 1) /* Normal */
);

// Show Result
vizcore3d.ShapeDrawing.AddVertex(
param.VertexItems /* Vertex List */
, 0 /* Group Id */
, Color.Red /* Color */
, 3.0f /* Radius */
, 3.0f /* Size */
, true /* Visible */
);
}

private void Example_DrawBox()
{
List<Data.Node> nodes = vizcore3d.Object3D.FromFilter(Data.Object3dFilter.SELECTED_TOP);

Data.BoundBoxParameter param = vizcore3d.Review.Measure.GetBoundBoxByPlaneVertex(
nodes /* Node */
, new Data.Vertex3D(0, 0, 1) /* Normal */
);

vizcore3d.BeginUpdate();

// Draw Custom Line
int shapeId = vizcore3d.ShapeDrawing.AddLine(
param.GetShapeDrawingLineParameter()
, 0
, Color.Black
, 5.0f
, true
);

// Use DepthTest
vizcore3d.ShapeDrawing.DepthTest = true;

// Draw Point
for (int i = 0; i < 8; i++)
{
int noteId = vizcore3d.Review.Note.AddNote3D(i.ToString(), param.VertexItems[i]);

// Set DepthTest
vizcore3d.Review.Note.EnableDepthTest(noteId, true);
}

vizcore3d.EndUpdate();
}