Surface Capping an Array of Surfaces

Hey

Is it possible to make solids by using surface capping in an array of surfaces?

It seems to me that I can only do this one surface at a time. I need a more effective way to do this if possible.

/OutOfTime007

Parents
  • The input only accepts one solid. One way around it is using by function and a simple for loop to go through the list of solids.

  • Hi All,

    I know this is an old discussion,

    Being a novice at GC how would I go about using a function to loop through a list of surfaces to cap as solids?
    or if there are some good tutorials on writing function happy to learn

    thanks

    Wayne

  • Hey.

    Surface capping multiple solids is a feature that really needs to be implemented in GC. Especially since the function is so simple.

    You need to use the solids node and change it to byFunction.

    Then in the function you need to write a function that looks something like this:

    function (ISurface[] srf)
                                        {
                                        
                                        
                                            for (int i = 0; i < srf.Count - 1; i++)
                                            {
                                           
                                            Solid sld = new Solid(this).BySurfaceCapping(srf[i],true,1,0);
                                             
                                            }
                                        };

    ... and then in your function argument you can just plug in your surface. You should put {} around the name of your surface in the functionargument field.

    All it does is look at each solid individually, caps them and puts them in the same node.

    Hope it makes sense. It took a long time for me to figure out this simple thing back when I was starting out. Slight smile

    Michael

Reply
  • Hey.

    Surface capping multiple solids is a feature that really needs to be implemented in GC. Especially since the function is so simple.

    You need to use the solids node and change it to byFunction.

    Then in the function you need to write a function that looks something like this:

    function (ISurface[] srf)
                                        {
                                        
                                        
                                            for (int i = 0; i < srf.Count - 1; i++)
                                            {
                                           
                                            Solid sld = new Solid(this).BySurfaceCapping(srf[i],true,1,0);
                                             
                                            }
                                        };

    ... and then in your function argument you can just plug in your surface. You should put {} around the name of your surface in the functionargument field.

    All it does is look at each solid individually, caps them and puts them in the same node.

    Hope it makes sense. It took a long time for me to figure out this simple thing back when I was starting out. Slight smile

    Michael

Children