Shell from 3D Polygon Points

Hello,

I have point values of "3d polygons" (3d contacted rectangles). The polygons came from a simple extrusion: a line with linear segments with constant height was extruded with a 3d vector. I have tried to make a wire from the values. thats no problem but I need a shell. Do I have to make all face manually? Or is there function, I can insert points like this P1(300,600,0) P2(700,600,0) P3(1000,800,0) P4(1000,300,100) P5(700,200,100) P6(300,200,100). These points will be like to lines with different height and same dX, dY...

Thanks Simon

Bearloga's picture

Hi Simon,
In your set not all points have the same dx, dy. If we change the point P3 as (1000, 700, 0) then it will be true. In this case you do not need to make the points P4, P5, P6. You can build the wire with the first 3 points and then sweep the wire with the vector (0,-400,100) using the OCCT class BRepPrimAPI_MakePrism. The result will be a shell. The following simple draw script does the thing.

polyline w 300 600 0 700 600 0 1000 700 0
prism s w 0 -400 100

samscore's picture

Hi
I had the same idea. But because I working with other libraries I have to make sure that the surface is build in both libraries the same way. so I decided to produce triangles and convert them manually to a shape.

Thanks for your advise
Regards Simon