2022 Class
Changes 0
C

Transform

Description:
A transformation of the affine 3-space.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.APIObject
    Autodesk.Revit.DB.Transform
public class Transform : APIObject
public static XYZ TransformPoint(XYZ point, Transform transform)
{
    double x = point.X;
    double y = point.Y;
    double z = point.Z;

    //transform basis of the old coordinate system in the new coordinate // system
    XYZ b0 = transform.get_Basis(0);
    XYZ b1 = transform.get_Basis(1);
    XYZ b2 = transform.get_Basis(2);
    XYZ origin = transform.Origin;

    //transform the origin of the old coordinate system in the new 
    //coordinate system
    double xTemp = x * b0.X + y * b1.X + z * b2.X + origin.X;
    double yTemp = x * b0.Y + y * b1.Y + z * b2.Y + origin.Y;
    double zTemp = x * b0.Z + y * b1.Z + z * b2.Z + origin.Z;

    return new XYZ(xTemp, yTemp, zTemp);
}
Name Return Type Description Inherited From
C Transform(Transform) None The copy constructor.
Name Return Type Description Inherited From
M AlmostEqual(Transform) bool Determines whether this transformation and the specified transformation are the same within the tolerance (1.0e-09).
M CreateReflection(Plane) The new transform. Creates a transform that represents a reflection across the given plane.
M CreateRotationAtPoint(XYZ, Double, XYZ) The new transform. Creates a transform that represents a rotation about the given axis at the specified point.
M CreateRotation(XYZ, Double) The new transform. Creates a transform that represents a rotation about the given axis at (0, 0, 0).
M CreateTranslation(XYZ) The new transform. Creates a transform that represents a translation via the specified vector.
M Multiply(Transform) Transform Multiplies this transformation by the specified transformation and returns the result.
M op_Multiply(Transform, Transform) Transform Multiplies the two specified transforms.
M OfPoint(XYZ) The transformed point. Applies the transformation to the point and returns the result.
M OfVector(XYZ) XYZ Applies the transform to the vector
M ScaleBasisAndOrigin(Double) Transform Scales the basis vectors and the origin of this transformation and returns the result.
M ScaleBasis(Double) Transform Scales the basis vectors of this transformation and returns the result.
M Dispose() None Causes the object to release immediately any resources it may be utilizing. APIObject
Name Return Type Description Inherited From
P Basis XYZ Defines the basis of the old coordinate system in the new coordinate system.
P BasisX XYZ The basis of the X axis of this transformation.
P BasisY XYZ The basis of the Y axis of this transformation.
P BasisZ XYZ The basis of the Z axis of this transformation.
P Determinant double The determinant of this transformation.
P HasReflection bool The boolean value that indicates whether this transformation produces reflection.
P Identity Transform The identity transformation.
P Inverse Transform The inverse transformation of this transformation.
P IsConformal bool The boolean value that indicates whether this transformation is conformal.
P IsIdentity bool The boolean value that indicates whether this transformation is an identity.
P IsTranslation bool The boolean value that indicates whether this transformation is a translation.
P Origin XYZ Defines the origin of the old coordinate system in the new coordinate system.
P Scale double The real number that represents the scale of the transformation.
P IsReadOnly bool Identifies if the object is read-only or modifiable. APIObject