Source and output

Project Files

(Right-click on projects to save)
How to Compile and Run

Make Plate Geometry with Cutouts

The PLATE sample program creates a polygonal plate with some circular or polygonal cutouts. It creates the data in two phases. First it creates the plate by sweeping a 2D polygon by a certain thickness in the -Z direction. Second, it adds some holes by calling functions that make a circular cutout or a polygonal cutout.

The program defines some general functions, so you experiment with different shapes for the slabs and cutouts. The geometry is attached to a STEP product with some boilerplate name and version information.

This program creates the data set and saves it as a STEP Part 21 file called "output_file.stp". This is a text file, so you can look at it with a text editor or the STEP Part 21 file browser to see how the information is represented.

The plate.cxx file contains the main function, which assembles the plate and holes using functions defined in make_polyshell.cxx.

The make_point() function creates the points to describe the outline of the slab, then make_polygon_shell() transforms the points into a Brep solid of a given thickness. The make_circular_hole() and make_polygon_hole() functions modify the solid to have holes of different shape. The sample program creates two round holes and a rectangular one.