Wrap Curve To Cylinder, Pitch Blend Helices
All  1-5  6-10

Previous
Next
 From:  bemfarmer
8357.6 
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:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8357.8 In reply to 8357.7 
Thank you Michael.
That code should work well.
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8357.9 In reply to 8357.7 
.

EDITED: 18 Apr 2017 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  bemfarmer
8357.10 
Here is version 5 of UnwrapCylCurve, which works well, and required quite a bit more work.
Michaels angle script was used to calculate arclength, with better accuracy.
Processing each segment of a joined curve was done by using Michaels forum posted code.
Unwrapped segments have not been rejoined.
Unwrapped location depends upon curve start point. Incorporating bounding box center may improve this.
Comments are in the .js.
Test curves included joined helices of different pitch and handedness, as well as cylinder projected, circle and pentagon and small curve.

FLOW may be used to unwrap cylinder curves that are less than a single turn, using base profile circle and unwrap circle.
Such a Flow unwrap is slightly larger than an UnwrapCylCurve version, but the two unwrapped curves agree very well to a few decimal places and zoom_in's.

- Brian

The curve needs to be on the cylinder, a planar curve will probably yield no results...
A test ellipse in the top view, rotated in the front view, did yield a "boat hull cross section-like curve."
The script is a bit slow. It takes about 1 second per 100 numpoints, per segment.

EDITED: 21 Apr 2017 by BEMFARMER

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-5  6-10