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); }
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 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 GetMeshArea(IOnMesh mesh) { double area = 0.0; if (null != mesh) { OnMassProperties mp = new OnMassProperties(); if (mesh.AreaMassProperties(ref mp, true)) { area = Math.Abs(mp.Area()); } } return(area); }
private static double GetBrepArea(IOnBrep brep) { double area = 0.0; if (null != brep) { OnMassProperties mp = new OnMassProperties(); if (brep.AreaMassProperties(ref mp, true)) { area = Math.Abs(mp.Area()); } } return(area); }
private static double GetSurfaceArea(IOnSurface srf) { double area = 0.0; if (null != srf) { OnMassProperties mp = new OnMassProperties(); if (srf.AreaMassProperties(ref mp, true)) { area = Math.Abs(mp.Area()); } } return(area); }
private static double GetCurveArea(IOnCurve crv, double tol) { double area = 0.0; if (null != crv && crv.IsClosed()) { OnPlane plane = new OnPlane(); if (crv.IsPlanar(plane, tol)) { OnBoundingBox bbox = crv.BoundingBox(); On3dPoint point = plane.ClosestPointTo(bbox.Center()); OnMassProperties mp = new OnMassProperties(); if (crv.AreaMassProperties(point, plane.Normal(), ref mp)) { area = Math.Abs(mp.Area()); } } } return(area); }
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 GetSurfaceArea(IOnSurface srf) { double area = 0.0; if (null != srf) { OnMassProperties mp = new OnMassProperties(); if (srf.AreaMassProperties(ref mp, true)) area = Math.Abs(mp.Area()); } return area; }
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 GetMeshArea(IOnMesh mesh) { double area = 0.0; if (null != mesh) { OnMassProperties mp = new OnMassProperties(); if (mesh.AreaMassProperties(ref mp, true)) area = Math.Abs(mp.Area()); } return area; }
private static double GetCurveArea(IOnCurve crv, double tol) { double area = 0.0; if (null != crv && crv.IsClosed()) { OnPlane plane = new OnPlane(); if (crv.IsPlanar(plane, tol)) { OnBoundingBox bbox = crv.BoundingBox(); On3dPoint point = plane.ClosestPointTo(bbox.Center()); OnMassProperties mp = new OnMassProperties(); if (crv.AreaMassProperties(point, plane.Normal(), ref mp)) area = Math.Abs(mp.Area()); } } return area; }
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; }
private static double GetBrepArea(IOnBrep brep) { double area = 0.0; if (null != brep) { OnMassProperties mp = new OnMassProperties(); if (brep.AreaMassProperties(ref mp, true)) area = Math.Abs(mp.Area()); } return area; }