Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:sdksamples:nonuniformscale [2015/09/14] (current)
Line 1: Line 1:
 +====== Applying Non-Uniform Transformations to Objects ======
 +> **Summary:​** //Discusses similarity transformations and how to use them on objects.//
 +
 +=====Question=====
 +I am trying to apply a non-uniform scale to cylinder, and it does not work. If the same scale operation is applied to another object, it works fine. Why?
 +
 +=====Answer=====
 +Not all **ON_Geometry** derived classes can be can be accurately modified with "​squishy"​ transformations like projections,​ shears, an non-uniform scaling. For example, if you were to apply a non-uniform scale to a circle, which is represented by an **ON_ArcCurve** curve, the resulting geometry is no longer a circle.
 +
 +Before transforming your object, you will want to first test to see if the the transformation is a similarity transformation. This can be done by using **ON_XForm::​IsSimilarity()**. See opennurbs_xform.h for more information.
 +
 +If the transformation is not a similarity, then you should convert the geometry into a form that can be accurately modified. This can be done by using the **ON_Geometry::​MakeDeformable()** override on the geometric object.
 +
 +{{tag>​Developer cplusplus dotnet}}
  
developer/sdksamples/nonuniformscale.txt ยท Last modified: 2015/09/14 (external edit)