Click or drag to resize

ClashManagerOnClashTestFinishedEvent Event

간섭검사 완료 이벤트

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public event ClashFinishedEventHandler OnClashTestFinishedEvent

Value

Type: ClashFinishedEventHandler
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;
private VIZCore3D.NET.Data.ClashTest clash;

private void Example()
{
    clash = new VIZCore3D.NET.Data.ClashTest();

    clash.Name = "CLASH TEST #1";
    clash.TestKind = VIZCore3D.NET.Data.ClashTest.ClashTestKind.GROUP_VS_GROUP;

    clash.UseRangeValue = false;
    clash.RangeValue = 2.0f;
    clash.UsePenetrationTolerance = true;
    clash.PenetrationTolerance = 1.0f;

    clash.VisibleOnly = false;
    clash.BottomLevel = 2;

    List<VIZCore3D.NET.Data.Node> groupA =
        vizcore3d.Object3D.Find.QuickSearch(
            new List<string>() { "EQUIPMENT" }
            , false
            , true
            , false
            , false
            , true
            , false
            );

    clash.GroupA = groupA;

    List<VIZCore3D.NET.Data.Node> groupB =
        vizcore3d.Object3D.Find.QuickSearch(
            new List<string>() { "HULL" }
            , false
            , true
            , false
            , false
            , true
            , false
            );

    clash.GroupB = groupB;

    if (clash.ID == -1)
    {
        bool result = vizcore3d.Clash.Add(clash);

        MessageBox.Show(
            string.Format("ClashTest : {0} / {1}", result == true ? "OK" : "NG", clash.ID)
            , "VIZCore3D.NET.ClashTest"
            , MessageBoxButtons.OK
            , result == true ? MessageBoxIcon.Information : MessageBoxIcon.Error
            );
    }
    else
    {
        vizcore3d.Clash.Update(clash);
    }

    vizcore3d.Clash.OnClashTestFinishedEvent += Clash_OnClashTestFinishedEvent;

    // 간섭검사 수행
    vizcore3d.Clash.PerformInterferenceCheck(clash.ID);
}

private void Clash_OnClashTestFinishedEvent(object sender, VIZCore3D.NET.Event.EventManager.ClashEventArgs e)
{
    MessageBox.Show(
        string.Format("Clash Test Completed. : {0} / {1}"
        , e.ID
        , clash.ElapsedTimeString)
        , "VIZCore3D.NET.ClashTest"
        , MessageBoxButtons.OK, MessageBoxIcon.Information
        );

    bool resultDataKind = true; // True : Assembly, False : Part

    List<VIZCore3D.NET.Data.ClashTestResultItem> items = null;

    if (clash.TestKind != VIZCore3D.NET.Data.ClashTest.ClashTestKind.GROUP_VS_MOVING_GROUP)
    {
        items = vizcore3d.Clash.GetResultItem(
            clash
            , resultDataKind == true
            ? VIZCore3D.NET.Manager.ClashManager.ResultGroupingOptions.ASSEMBLY
            : VIZCore3D.NET.Manager.ClashManager.ResultGroupingOptions.PART
            );
    }
    else
    {
        //items = vizcore3d.Clash.GetResultItem(clash, 0, ckResultAssembly.Checked == true ? VIZCore3D.NET.Manager.ClashManager.ResultGroupingOptions.ASSEMBLY : VIZCore3D.NET.Manager.ClashManager.ResultGroupingOptions.PART);
        items = vizcore3d.Clash.GetResultAllSubItem(
            clash
            , resultDataKind == true
            ? VIZCore3D.NET.Manager.ClashManager.ResultGroupingOptions.ASSEMBLY
            : VIZCore3D.NET.Manager.ClashManager.ResultGroupingOptions.PART
            );
    }
}
See Also