public void TwoSurfaceMorphTestKeepOn() { var activeModel = _powerShape.ActiveModel; activeModel.Import(new File(TestFiles.TWO_SURFACE_MORPH)); var surfacesToMorph = new List <PSSurface>(); surfacesToMorph.Add(activeModel.Surfaces.GetByName("1")); surfacesToMorph.Add(activeModel.Surfaces.GetByName("2")); var referenceSurface = activeModel.Surfaces.GetByName("3"); var controlSurface = activeModel.Surfaces.GetByName("4"); PSEntityMorpher.MorphSurfacesBetweenTwoSurfaces(surfacesToMorph, referenceSurface, controlSurface, DecayDefinitionOptions.None, DecayDefinitionBlend.Quartic, true); Assert.IsTrue(referenceSurface.Exists); Assert.IsTrue(controlSurface.Exists); Assert.AreEqual((MM)14.588907, surfacesToMorph[0].BoundingBox.ZSize); }
public void TwoSurfaceMorphTestCurve() { var activeModel = _powerShape.ActiveModel; activeModel.Import(new File(TestFiles.TWO_SURFACE_MORPH)); var surfacesToMorph = new List <PSSurface>(); surfacesToMorph.Add(activeModel.Surfaces.GetByName("1")); surfacesToMorph.Add(activeModel.Surfaces.GetByName("2")); var referenceSurface = activeModel.Surfaces.GetByName("3"); var controlSurface = activeModel.Surfaces.GetByName("4"); var decayCurve = activeModel.CompCurves.GetByName("1"); PSEntityMorpher.MorphSurfacesBetweenTwoSurfaces(surfacesToMorph, referenceSurface, controlSurface, DecayDefinitionOptions.Curve, DecayDefinitionBlend.Cubic, false, false, null, decayCurve); Assert.IsFalse(referenceSurface.Exists); Assert.IsFalse(controlSurface.Exists); Assert.AreEqual((MM)14.588753, surfacesToMorph[0].BoundingBox.ZSize); }