Exemplo n.º 1
0
        //--------------------------------------------------------------------------------------------------

        public static double Volume(this TopoDS_Shape shape)
        {
            GProp_GProps massProps = new GProp_GProps();

            BRepGProp.VolumeProperties(shape, massProps);
            return(massProps.Mass());
        }
Exemplo n.º 2
0
        //--------------------------------------------------------------------------------------------------

        static bool _CompareVolumeProperties(TopoDS_Shape shape1, TopoDS_Shape shape2, out string message)
        {
            var gprops1 = new GProp_GProps();
            var gprops2 = new GProp_GProps();

            BRepGProp.VolumeProperties(shape1, gprops1);
            BRepGProp.VolumeProperties(shape2, gprops2);
            message = _CompareProperties(gprops1, gprops2, "Volume");
            return(message != null);
        }