Пример #1
0
 public virtual double GetVolume(bool accurate = false)
 {
     if (accurate)
     {
         Rhino.Geometry.VolumeMassProperties vmp = VolumeMassProperties.Compute(ToBrep());
         return(vmp.Volume);
     }
     return(Centreline.GetLength() * Width * Height);
 }
Пример #2
0
        /// <summary>
        /// Sum mass properties together to get an aggregate mass.
        /// </summary>
        /// <param name="summand">mass properties to add.</param>
        /// <returns>true if successful.</returns>
        public bool Sum(VolumeMassProperties summand)
        {
            IntPtr pSum = summand.ConstPointer();

            return(UnsafeNativeMethods.ON_MassProperties_Sum(m_ptr, pSum));
        }
Пример #3
0
 /// <summary>
 /// Sum mass properties together to get an aggregate mass.
 /// </summary>
 /// <param name="summand">mass properties to add.</param>
 /// <returns>true if successful.</returns>
 public bool Sum(VolumeMassProperties summand)
 {
   IntPtr pSum = summand.ConstPointer();
   return UnsafeNativeMethods.ON_MassProperties_Sum(m_ptr, pSum);
 }