Click or drag to resize

PublishManagerExportSimplifiedModel Method (String, String, Boolean, Int32, Int32, Int32, Int32, Int32, Int32, Boolean, Int32, SimplifiedUnit, Boolean, Boolean)

간소화 형상 내보내기

Namespace:  VIZPub.NET
Assembly:  VIZPub.NET (in VIZPub.NET.dll) Version: 1.3.21.508 (1.3.21.508)
Syntax
C#
public bool ExportSimplifiedModel(
	string input,
	string output,
	bool limitBoundBox,
	int minX,
	int minY,
	int minZ,
	int maxX,
	int maxY,
	int maxZ,
	bool limitTriangleCount,
	int triangleCount,
	SimplifiedUnit unit,
	bool preserveStructure,
	bool newOpenGlWnd
)

Parameters

input
Type: SystemString
VIZ 파일 경로
output
Type: SystemString
간소화 VIZ 파일 경로
limitBoundBox
Type: SystemBoolean
BoundBox 제한 여부
minX
Type: SystemInt32
BoundBox - Min. X
minY
Type: SystemInt32
BoundBox - Min. Y
minZ
Type: SystemInt32
BoundBox - Min. Z
maxX
Type: SystemInt32
BoundBox - Max. X
maxY
Type: SystemInt32
BoundBox - Max. Y
maxZ
Type: SystemInt32
BoundBox - Max. Z
limitTriangleCount
Type: SystemBoolean
Triangle 개수 제한 여부
triangleCount
Type: SystemInt32
최대 Triangle 개수
unit
Type: VIZPub.NETSimplifiedUnit
간소화 단위
preserveStructure
Type: SystemBoolean
트리 구조 보존 유무
newOpenGlWnd
Type: SystemBoolean
새로운 OpenGL Window를 활용한 변환 기능 사용 유무

Return Value

Type: Boolean
내보내기 결과
Examples
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Examples
{
    public class VIZPubExample
    {
        public void Example()
        {
            // Initialize VIZPub.NET
            VIZPub.NET.ModuleInitializer.Run();

            // Construction
            VIZPub.NET.PublishManager manager = new VIZPub.NET.PublishManager();

            // License
            VIZPub.NET.LicenseManager.LicenseResults authResult 
                = manager.License.LicenseFile("C:\\License\\VIZPub.NET.lic");

            if (authResult != VIZPub.NET.LicenseManager.LicenseResults.SUCCESS)
            {
                System.Diagnostics.Debug.WriteLine(authResult.ToString());
                return;
            }

            // Event :: Progress
            manager.OnProgressChangedEvent += VIZPub_OnProgressChangedEvent;

            string input = "C:\\MODEL\\BLOCK.viz";
            string output = "C:\\MODEL\\BLOCK_SIMPLIFY.viz";

            bool result = manager.ExportSimplifiedModel(
                input                                       /* INPUT : VIZ */
                , output                                    /* OUTPUT : VIZ */
                , false                                     /* LIMIT BOUNDBOX */
                , 0, 0, 0                                   /* MINIMUM VERTEX */
                , 0, 0, 0                                   /* MAXIMUM VERTEX */
                , false                                     /* LIMIT TRIANGLE-MESH COUNT */
                , 0                                         /* TRIANGLE-MESH COUNT */
                , VIZPub.NET.SimplifiedUnit.TRIANGLE_MESH   /* SIMPLIFY UNIT */
                , false                                     /* KEEP STRUCTURE */
                , true                                      /* USE NEW OPENGL HIDDEN WINDOW */
                );

            System.Diagnostics.Debug.WriteLine(
                string.Format("Elapsed Milliseconds = {0:#,0}", manager.ElapsedMilliseconds)
                );
        }

        private void VIZPub_OnProgressChangedEvent(object sender, VIZPub.NET.ProgressEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine(
                string.Format("{0} : {1}", e.Mode, e.Progress)
                );
        }
    }
}
See Also