[vtkusers] Why are ther extra panels

Jim Peterson jimcp at cox.net
Sun Nov 7 18:46:45 EST 2010


I started to think maybe the OpenGL capping has a problem with the 
concave shape of the I beam. I changed the profile model to have three 
rectangular cells, meaning from:

    
ShapeArray.InsertNextCell(12);                                                                              
//set the size of data to hold

         ShapeArray.InsertCellPoint( 0);
         ShapeArray.InsertCellPoint( 1);
        ShapeArray.InsertCellPoint( 2);
        ShapeArray.InsertCellPoint( 3);
        ShapeArray.InsertCellPoint( 4);
        ShapeArray.InsertCellPoint( 5);
        ShapeArray.InsertCellPoint( 6);
        ShapeArray.InsertCellPoint( 7);
        ShapeArray.InsertCellPoint( 8);
        ShapeArray.InsertCellPoint( 9);
        ShapeArray.InsertCellPoint(10);
        ShapeArray.InsertCellPoint(11);

to:

    ShapeArray.InsertNextCell(4);
     ShapeArray.InsertCellPoint( 0);
     ShapeArray.InsertCellPoint( 1);
      ShapeArray.InsertCellPoint( 2);
      ShapeArray.InsertCellPoint( 11);
      
     ShapeArray.InsertNextCell(4);
     ShapeArray.InsertCellPoint( 3);
     ShapeArray.InsertCellPoint( 4);
     ShapeArray.InsertCellPoint( 9);
     ShapeArray.InsertCellPoint( 10);

     ShapeArray.InsertNextCell(4);
     ShapeArray.InsertCellPoint( 5);
     ShapeArray.InsertCellPoint( 6);
     ShapeArray.InsertCellPoint( 7);
     ShapeArray.InsertCellPoint( 8);

By defining the beam as three convex rectangles, the capping problem 
disappears. I cannot see that this is any significant increase in 
storage to define the shape.

Hope that helps,
Jim

Jim Peterson wrote:
> All,
> Somewhere along the line we managed to take this offline, The net 
> result was it appears there are OpenGL artifacts generted when 
> cappingon is set from the extrusion.
>
> If anyone else on the list has any insight on this problem , I am sure 
> there input would be appreciated.
>
> Jim
>
> Marc Jaspar wrote:
>> You are absolutely correct.  I implicitly forced capping off ( 
>> Extrusion->SetCapping(false); )  and the panels have disappeared.
>> Good work.  It pays to ask sometimes.  Have a good weekend (at least 
>> what's left of it).
>>
>> Marc
>>
>> On Sun, Nov 7, 2010 at 1:36 PM, Jim Peterson <jimcp at cox.net 
>> <mailto:jimcp at cox.net>> wrote:
>>
>>     Marc,
>>     I generated the beam with CappingOff() and there are no extra end
>>     panels, the interesting thing is the capping logic does not appear
>>     to use triangles, that is when I have capping on, I cannot see any
>>     triangle edges at the ends of the I Beam. the wireframe looks the
>>     same for both the capped and uncapped versions.
>>
>>     Hope that helps,
>>     Jim
>>
>>     Marc Jaspar wrote:
>>
>>         Thanks Jim.
>>
>>         Yes there are triangular panels and in some cases they are
>>         rectangular closing the beam.  When you close in on the
>>         geometry, the extra panels disappear (very strange).  I have
>>         capped the geometry and no joy either.  I have generated the
>>         shape clock wise, counter clock wise and it makes no
>>         difference.  I have started the points in different order and
>>         still no luck.
>>         Very strange phenomenon.
>>
>>         Thanks for the help.  Maybe you could try just a rectangular
>>         section (hollowed out of course) and see if it happens as well.
>>
>>         On Sun, Nov 7, 2010 at 12:50 PM, Jim Peterson <jimcp at cox.net
>>         <mailto:jimcp at cox.net> <mailto:jimcp at cox.net
>>         <mailto:jimcp at cox.net>>> wrote:
>>
>>            Marc Jaspar wrote:
>>
>>                Hi again Jim.
>>
>>                just for accuracy sakes, I have provided the extrusion 
>> code
>>                (that you asked for)
>>
>>                //create the holding structure for the profile
>>                vtkPolyData *Profile = vtkPolyData::New();
>>                Profile->SetPoints(W21x101);
>>                Profile->SetPolys(ShapeArray);
>>
>>                //createthe extrusion mechanism to extrute the profile
>>                vtkLinearExtrusionFilter *Extrusion =
>>                vtkLinearExtrusionFilter::New();
>>
>>                Extrusion->SetExtrusionTypeToVectorExtrusion();
>>                Extrusion->SetVector(0.0, 0.0, 120.0);
>>                Extrusion->SetCapping(true);
>>                Extrusion->SetInput(Profile);
>>
>>
>>                vtkPolyDataNormals *Norms = vtkPolyDataNormals::New();
>>                Norms->SetInput(Extrusion->GetOutput());
>>
>>
>>                as you can see, I used the Linear Extrusion to a vector
>>         since
>>                this is the way the structure is defined in my program.
>>                It is a bit annoying since, all the calculations are
>>         basically
>>                done (very accurate) and I am now working on the 
>> display of
>>                the model.
>>
>>
>>                Thanks for your time.
>>
>>                Marc
>>                On Sun, Nov 7, 2010 at 11:45 AM, Jim Peterson
>>         <jimcp at cox.net <mailto:jimcp at cox.net>
>>                <mailto:jimcp at cox.net <mailto:jimcp at cox.net>>
>>         <mailto:jimcp at cox.net <mailto:jimcp at cox.net>
>>
>>                <mailto:jimcp at cox.net <mailto:jimcp at cox.net>>>> wrote:
>>
>>                   Marc Jaspar wrote:
>>
>>                       I am extruding a structural shape (a W21x101 as
>>         an example)
>>                       and, there are extra triangular end panels
>>         displayed.
>>                       I have capping on and off (as well) and they
>>         still show up.
>>                       If I zoom in, the extra panels disappear.  Why?
>>                       Other than that, it works fine.
>>
>>                   Marc,
>>                   excuse my ignorance, but what kind of algorithm are 
>> you
>>                using to
>>                   "extrude a structural shape"? and where would I find
>>                W21x101 as an
>>                   example of such a shape? Also, what version of vtk
>>         are you
>>                using,
>>                   on what platform using what language?
>>
>>                   Thanks,
>>                   Jim
>>
>>
>>
>>
>>                --         Marc Jaspar
>>
>>                (905) 838-5978 (HOME)
>>                (647) 982-5978 (CELL)
>>
>>                jaspar.marc at gmail.com <mailto:jaspar.marc at gmail.com>
>>         <mailto:jaspar.marc at gmail.com <mailto:jaspar.marc at gmail.com>>
>>                <mailto:jaspar.marc at gmail.com
>>         <mailto:jaspar.marc at gmail.com> <mailto:jaspar.marc at gmail.com
>>         <mailto:jaspar.marc at gmail.com>>>
>>
>>
>>            Mark,
>>            Thanks,
>>            I am going to recreate this a piece at a time in Java on
>>         windows
>>            to see if I can find a bug (or feature as the case may be...)
>>
>>            The bitmap actually looks like the far ends of the i-beam are
>>            closed with rectangles with one last triangle from the front
>>            bottom to the far top corner. and they appear to be at both
>>         ends.
>>            I am going to start with 14 points for the h-beam, I am
>>         also going
>>            to create the points then the cell for the extrusion input
>>         shape.
>>            Thanks for the logic. Let me see what I get...
>>
>>            Jim
>>
>>
>>
>>
>>         --         Marc Jaspar
>>
>>         (905) 838-5978 (HOME)
>>         (647) 982-5978 (CELL)
>>
>>         jaspar.marc at gmail.com <mailto:jaspar.marc at gmail.com>
>>         <mailto:jaspar.marc at gmail.com <mailto:jaspar.marc at gmail.com>>
>>
>>
>>
>>
>>
>> -- 
>> Marc Jaspar
>>
>> (905) 838-5978 (HOME)
>> (647) 982-5978 (CELL)
>>
>> jaspar.marc at gmail.com <mailto:jaspar.marc at gmail.com>
>>




More information about the vtkusers mailing list