How to make a cuboid tube between two points

When I use Segment Editor, I can make a tube through Draw tube, but what should I do if I need to make a cuboid tube between two points?

Can you draw a sketch of what exactly you would like to achieve?

Like this tube,I need a cuboid,replace it

There are many options how to achieve this. For example, using Markups to model module:

Would you prefer to draw a segmentation or just display a tool trajectory?

I’m just curious, Why do you need rectangular cross-section? All the drills, catheters, etc. have circular cross section.

All the tools for creating such tool guides fully automatically (using a small Python scripted module) is already available in Slicer.

To create a model, probably the easiest is to create the stick first, for example by running this command:


then apply a transform to position it, and import it into the segmentation.

You can find examples for most operations in the script repository.

Thank you very much ,you have helped me solve the problem. :blush: