Setup
The examples have been tested to run on Python 3.11.4 but other recent releases should function similarly. Now create an environment variable to locate the nTop Core library file.requirements.txt.
Install them using your package manager of choice.
Running the examples
You are now ready to run any of the examples using pattern similar to the following:Example Scripts
- Bounding Box — loads an implicit body and prints the minimum/maximum corners of its axis-aligned bounding box.
- Mesh — samples the body’s field on a voxel grid via
ntop_core_query_field_arrayand reconstructs a surface mesh using scikit-image’s marching cubes. - Mesh by Dual Contouring — meshes the body directly using the library’s native
ntop_core_generate_mesh_by_DCdual contouring function. - Slice — slices the body at 11 heights via
ntop_core_query_contoursand plots each resulting contour stack. - Transform and Scale — applies a scale and a rigid transform to an implicit body and exports the results to new
.implicitfiles.

