PaintSolid() public method

Paint a solid in a new named view
public PaintSolid ( Solid s, String viewName ) : void
s Solid solid
viewName String Given the name of view
return void
Example #1
0
        /// <summary>
        /// Create a constructive solid geometry - CSG tree
        /// http://en.wikipedia.org/wiki/Constructive_solid_geometry
        /// http://en.wikipedia.org/wiki/File:Csg_tree.png
        /// </summary>
        /// <param name="geometrycreation">The object that is responsible for creating the solids</param>
        /// <param name="avf">The object that is responsible for displaying the solids</param>
        private void CSGTree(GeometryCreation geometrycreation, AnalysisVisualizationFramework avf)
        {
            List <Solid> materialSolids = prepareSolids(geometrycreation);

            // Operation 1 : Intersect
            Solid CSGTree_solid1 = BooleanOperation.BooleanOperation_Intersect(materialSolids[0], materialSolids[1]);

            // Operation 2 : Union
            Solid CSGTree_solid2 = BooleanOperation.BooleanOperation_Union(materialSolids[2], materialSolids[3]);

            // Operation 3 : Union
            BooleanOperation.BooleanOperation_Union(ref CSGTree_solid2, materialSolids[4]);

            // Operation 4 : Difference
            BooleanOperation.BooleanOperation_Difference(ref CSGTree_solid1, CSGTree_solid2);

            avf.PaintSolid(CSGTree_solid1, "CSGTree");
        }
Example #2
0
        /// <summary>
        /// Create a constructive solid geometry - CSG tree
        /// http://en.wikipedia.org/wiki/Constructive_solid_geometry
        /// http://en.wikipedia.org/wiki/File:Csg_tree.png
        /// </summary>
        /// <param name="geometrycreation">The object that is responsible for creating the solids</param>
        /// <param name="avf">The object that is responsible for displaying the solids</param>
        private void CSGTree(GeometryCreation geometrycreation, AnalysisVisualizationFramework avf)
        {
            List<Solid> materialSolids = prepareSolids(geometrycreation);

               // Operation 1 : Intersect
               Solid CSGTree_solid1 = BooleanOperation.BooleanOperation_Intersect(materialSolids[0], materialSolids[1]);

               // Operation 2 : Union
               Solid CSGTree_solid2 = BooleanOperation.BooleanOperation_Union(materialSolids[2], materialSolids[3]);
               // Operation 3 : Union
               BooleanOperation.BooleanOperation_Union(ref CSGTree_solid2, materialSolids[4]);

               // Operation 4 : Difference
               BooleanOperation.BooleanOperation_Difference(ref CSGTree_solid1, CSGTree_solid2);

               avf.PaintSolid(CSGTree_solid1, "CSGTree");
        }