Click or drag to resize

ClashManagerAdd Method

간섭검사 추가

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public bool Add(
	ClashTest item
)

Parameters

item
Type: VIZCore3D.NET.DataClashTest
간섭검사 항목

Return Value

Type: Boolean
추가 결과
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

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

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


    clash.UseClearanceValue = false;
    clash.ClearanceValue = 3.0f;
    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);
    }
}
See Also