예제 #1
0
        //--------------------------------------------------------------------------------------------------

        public static void UpdateSolidOrientation(TopoDS_Shape solid)
        {
            var classifier = new BRepClass3d_SolidClassifier(solid);

            classifier.PerformInfinitePoint(Precision.Confusion());
            if (classifier.State() == TopAbs_State.TopAbs_IN)
            {
                solid.Reverse();
            }
        }
예제 #2
0
        //--------------------------------------------------------------------------------------------------

        public static TopoDS_Solid MakeSolid(TopoDS_Shell shell, bool correctOrientation)
        {
            var builder = new BRep_Builder();
            var solid   = new TopoDS_Solid();

            builder.MakeSolid(solid);
            builder.Add(solid, shell);

            if (correctOrientation)
            {
                var classifier = new BRepClass3d_SolidClassifier(solid);
                classifier.PerformInfinitePoint(Precision.Confusion());
                if (classifier.State() == TopAbs_State.TopAbs_IN)
                {
                    solid = new TopoDS_Solid();
                    builder.MakeSolid(solid);
                    builder.Add(solid, shell.Reversed());
                }
            }

            return(solid);
        }
 public void Substitute(int theIndex, TopoDS_Shape theKey1, BRepClass3d_SolidClassifier theItem)
 {
     throw new NotImplementedException();
 }
 public int Add(TopoDS_Shape theKey1, BRepClass3d_SolidClassifier theItem)
 {
     throw new NotImplementedException();
 }
 public bool FindFromKey(TopoDS_Shape theKey1, BRepClass3d_SolidClassifier theValue)
 {
     throw new NotImplementedException();
 }