Wrap Curve To Cylinder, Pitch Blend Helices

 From: bemfarmer 26 Mar 2017  (1 of 10)

 From: bemfarmer 27 Mar 2017  (2 of 10)
 8357.2 In reply to 8357.1 For quadrant (I = one) unwrapped blended pre-helix-wrap curve, default wrap is a Left Handed helix beginning at (0, -r, 0). So to match pre-unwrapped helix, Reverse Twist checkbox may be used, and a rotation to match the actual start point of the initial helix may be needed. Adding an initial selection of the start point of the initial helix could be added to the script, to determine needed matching rotation. Missing semicolon located. radius = 0, division by zero possibility does not seem to hurt(?) - Brian EDITED: 27 Mar 2017 by BEMFARMER

 From: bemfarmer 12 Apr 2017  (4 of 10)
 I rediscovered the arclength of a circular segment of a circle, created by a chord! arclength = radius * Theta = radius * 2 * arcsin((sqrt(dx*dx + dy*dy))/(2*radius)) This should be very useful. The equation is here, with delta_x and delta_y substituting for the chord length, by pythagorus: https://en.wikipedia.org/wiki/Circular_segment - Brian EDITED: 12 Apr 2017 by BEMFARMER Attachments:

 From: bemfarmer 13 Apr 2017  (5 of 10)
 The UnwrapCylCurve script is now working well, using the formula in the previous post, but with a few problems. Corner points, i.e. angles, between two joined curves cause wiggles, even with high point count. 2000 points is less wiggly than 500 points. (Tight bends would probably also have wiggles.) Is there some way to identify corner points? Separate seems to do it. Using separate and getStartPoints and getEndPoints may be a work around, with each segment arrayed separately. The cylinder axis must be parallel with the z_axis. Only one curve, which can be joined, is done at a time. - Brian

 From: bemfarmer 13 Apr 2017  (6 of 10)
 A curve on a cylinder may be unwrapped, or unwound, with the _UnwrapCylCurve script. Documentation and description is contained in the script .js and in the .txt files. Three test files are in the Test3dmFiles zip, including "un" FLOW of intersecting cylinder, which is very close to the unwrapped intersection. - Brian Script deleted 4/14/2017 It works well for certain curves, but needs more work for non-helical, doubling back direction curves... I may post it again after some changes. (Only 3 downloads.) EDITED: 14 Apr 2017 by BEMFARMER Attachments:

 From: Michael Gibson 13 Apr 2017  (7 of 10)
 8357.7 In reply to 8357.5 Hi Brian, aside from using separate another way to gather corner points would be to get the list of segments of the curve, that's available by calling the .getSubObjects() method on a curve. Then on a segment there are also getStartPt() and getEndPt() methods same as there is on the parent curve. So something like this: var segs = crv.getSubObjects(); for ( var i = 0; i < segs.length; ++i ) { var seg = segs.item(i); var pt = seg.getStartPt(); } - Michael