Sweeping a cylinder along a line
Mostrar comentarios más antiguos
Hello everyone,
I am trying to create an algorithm that automatically builds support structure for Selective Laser Melting produced parts. I am able to extract the points that need supports by a thermal-mechanical analysis which gives me results about the deformations of the part.
Anyway, I am able to define the supported points and define a tree-shaped support structure. Attached is a very simplified version of the script that you can run so to understand the situation I am in.
startPoint = 10*rand(1,3);
normalVector = [0.5, 0.5, -0.5].*rand(1,3);
normalizedVector = normalVector / norm(normalVector);
middlePoint = [startPoint(1), startPoint(2), startPoint(3)] + (startPoint(3)*0.3)* normalizedVector;
plot3([startPoint(1), middlePoint(1)], [startPoint(2), middlePoint(2)], [startPoint(3), middlePoint(3)], 'b');
hold on;
plot3([middlePoint(1), middlePoint(1)], [middlePoint(2), middlePoint(2)], [middlePoint(3), 0], 'r');
Now, I would like to sweep a cylinder of 1 mm diameter along this line, and if possible, connect the two lines with a spline to reduce to avoi the sharp edge. Is there a way to perform what I need?
I have been looking around but couldn't find anything unfortunately.
Thanks in advance for your kind availability and for the time,
LP
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

