/// <summary>
        /// Data constructor: Creates External Linear Axis Goo instance from another External Linear Axis Goo instance.
        /// This creates a shallow copy of the passed External Linear Axis Goo instance.
        /// </summary>
        /// <param name="externalLinearAxisGoo"> External Linear Axis Goo instance to copy. </param>
        public GH_ExternalLinearAxis(GH_ExternalLinearAxis externalLinearAxisGoo)
        {
            if (externalLinearAxisGoo == null)
            {
                externalLinearAxisGoo = new GH_ExternalLinearAxis();
            }

            this.Value = externalLinearAxisGoo.Value;
        }
        /// <summary>
        /// Attempt a cast from generic object.
        /// </summary>
        /// <param name="source"> Reference to source of cast. </param>
        /// <returns> True on success, false on failure. </returns>
        public override bool CastFrom(object source)
        {
            if (source == null)
            {
                return(false);
            }

            //Cast from External Axis
            if (typeof(ExternalAxis).IsAssignableFrom(source.GetType()))
            {
                Value = source as ExternalAxis;
                return(true);
            }

            //Cast from External Axis Goo
            if (typeof(GH_ExternalAxis).IsAssignableFrom(source.GetType()))
            {
                GH_ExternalAxis externalAxisGoo = source as GH_ExternalAxis;
                Value = externalAxisGoo.Value as ExternalAxis;
                return(true);
            }

            //Cast from External Linear Axis
            if (typeof(ExternalLinearAxis).IsAssignableFrom(source.GetType()))
            {
                Value = source as ExternalAxis;
                return(true);
            }

            //Cast from External Linear Axis Goo
            if (typeof(GH_ExternalLinearAxis).IsAssignableFrom(source.GetType()))
            {
                GH_ExternalLinearAxis externalLinearAxisGoo = source as GH_ExternalLinearAxis;
                Value = externalLinearAxisGoo.Value as ExternalAxis;
                return(true);
            }

            //Cast from External Rotatioanl Axis
            if (typeof(ExternalRotationalAxis).IsAssignableFrom(source.GetType()))
            {
                Value = source as ExternalAxis;
                return(true);
            }

            //Cast from External Rotational Axis Goo
            if (typeof(GH_ExternalRotationalAxis).IsAssignableFrom(source.GetType()))
            {
                GH_ExternalRotationalAxis externalRotationalAxisGoo = source as GH_ExternalRotationalAxis;
                Value = externalRotationalAxisGoo.Value as ExternalAxis;
                return(true);
            }

            return(false);
        }
        /// <summary>
        /// Transforms the object or a deformable representation of the object.
        /// </summary>
        /// <param name="xform"> Transformation matrix. </param>
        /// <returns> Transformed geometry. If the local geometry can be transformed accurately,
        /// then the returned instance equals this instance. Not all geometry types can be accurately
        /// transformed under all circumstances though, if this is the case, this function will
        /// return an instance of another IGH_GeometricGoo derived type which can be transformed.</returns>
        public override IGH_GeometricGoo Transform(Transform xform)
        {
            if (Value == null)
            {
                return(null);
            }

            else if (Value.IsValid == false)
            {
                return(null);
            }

            else
            {
                // Duplicate value
                ExternalLinearAxis externalLinearAxis = Value.Duplicate();
                // Transform
                externalLinearAxis.Transform(xform);
                // Make new Goo instance
                GH_ExternalLinearAxis externalLinearAxisGoo = new GH_ExternalLinearAxis(externalLinearAxis);
                // Return
                return(externalLinearAxisGoo);
            }
        }