Exemplo n.º 1
0
        private static double GetMeshVolume(IOnMesh mesh)
        {
            double volume = 0.0;

            if (null != mesh)
            {
                OnMassProperties mp = new OnMassProperties();
                if (mesh.VolumeMassProperties(ref mp, true))
                {
                    volume = Math.Abs(mp.Volume());
                }
            }
            return(volume);
        }
Exemplo n.º 2
0
        private static double GetBrepVolume(IOnBrep brep)
        {
            double volume = 0.0;

            if (null != brep)
            {
                OnMassProperties mp = new OnMassProperties();
                if (brep.VolumeMassProperties(ref mp, true))
                {
                    volume = Math.Abs(mp.Volume());
                }
            }
            return(volume);
        }
Exemplo n.º 3
0
        private static double GetSurfaceVolume(IOnSurface srf)
        {
            double volume = 0.0;

            if (null != srf)
            {
                OnMassProperties mp = new OnMassProperties();
                if (srf.VolumeMassProperties(ref mp, true))
                {
                    volume = Math.Abs(mp.Volume());
                }
            }
            return(volume);
        }
 private static double GetSurfaceVolume(IOnSurface srf)
 {
     double volume = 0.0;
       if (null != srf)
       {
     OnMassProperties mp = new OnMassProperties();
     if (srf.VolumeMassProperties(ref mp, true))
       volume = Math.Abs(mp.Volume());
       }
       return volume;
 }
 private static double GetMeshVolume(IOnMesh mesh)
 {
     double volume = 0.0;
       if (null != mesh)
       {
     OnMassProperties mp = new OnMassProperties();
     if (mesh.VolumeMassProperties(ref mp, true))
       volume = Math.Abs(mp.Volume());
       }
       return volume;
 }
 private static double GetBrepVolume(IOnBrep brep)
 {
     double volume = 0.0;
       if (null != brep)
       {
     OnMassProperties mp = new OnMassProperties();
     if (brep.VolumeMassProperties(ref mp, true))
       volume = Math.Abs(mp.Volume());
       }
       return volume;
 }