Click or drag to resize

ModelManagerGetModelStructure Method

VIZ 파일의 Structure 반환

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public static StructureManager GetModelStructure(
	string path,
	bool includeBody = false
)

Parameters

path
Type: SystemString
VIZ 파일
includeBody (Optional)
Type: SystemBoolean
Body 노드 포함 여부

Return Value

Type: StructureManager
Structure
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void StructureFromFile()
{
    string path = "C:\\Model\\BLOCK.viz";

    VIZCore3D.NET.ShdCore.StructureManager stru = 
        VIZCore3D.NET.Manager.ModelManager.GetModelStructure(path);

    List<VIZCore3D.NET.ShdCore.ModelTreeNode> roots = stru.Roots;

    // Structure
    foreach (VIZCore3D.NET.ShdCore.ModelTreeNode root in roots)
    {
        string name = root.NodeName;

        if(root.Nodes.Count != 0)
        {
            NavigateNodes(root);
        }
    }

    // Node List
    foreach (VIZCore3D.NET.ShdCore.ModelTreeNode item in stru.GetStructureNodeList())
    {
        // Some code here...
    }
}

private void NavigateNodes(VIZCore3D.NET.ShdCore.ModelTreeNode parent)
{
    foreach (VIZCore3D.NET.ShdCore.ModelTreeNode item in parent.Nodes)
    {
        string name = item.NodeName;

        if(item.Nodes.Count != 0)
        {
            NavigateNodes(item);
        }
    }
}
See Also