Example #1
0
        public static void basic_test()
        {
            DMesh3 target = TestUtil.LoadTestInputMesh("twocylinder_orig.obj");
            DMesh3 mesh   = TestUtil.LoadTestInputMesh("twocylinder_approx.obj");

            DMeshAABBTree3 targetSpatial = new DMeshAABBTree3(target, true);

            ConstantMeshSourceOp sourceOp = new ConstantMeshSourceOp(mesh, true, true);
            ConstantMeshSourceOp targetOp = new ConstantMeshSourceOp(target, true, true);

            RemesherPro remesher = new RemesherPro(mesh);

            remesher.SetTargetEdgeLength(0.5f);
            //remesher.MinEdgeLength = 0.25;
            remesher.SmoothSpeedT = 0.5f;
            var ProjTarget = new MeshProjectionTarget(target, targetSpatial);

            remesher.SetProjectionTarget(ProjTarget);

            remesher.SharpEdgeReprojectionRemesh(20, 40);

            TestUtil.WriteTestOutputMesh(mesh, "reproject_cylinder.obj");
        }