I’m attempting to distribute the points along curves that I generate in a script to my own custom segment distance. For example, the 140mm long curve that I have has around 1400 points. I’d like to be able to change the points to be distributed every 1mm along the curve. After digging into the curve functions, I tried a few that didn’t quite have the desired effect.
I thought that I could maybe use “trimatic.filter_curve”, set the sharp_angle_threshold = 0, and the small_edge_threshold = 1.0. While this did decrease the number of points along the curve, it didn’t distribute them evenly according to arc length.
The “fit_centerline_curve” function seemed to have promise because you can input the desired segment length, but no matter what I try, it raises a runtime error and fails to fit a centerline curve to the part that contains the curve. Will this function not work if the trimatic.Part input is only a curve? Is there just a trick to the segment_length and detail inputs to get the function to actually work?
If you have any other solutions to my problem that I didn’t mention here, please let me know.
Thank you in advance for your assistance,
Ian