View Full Version : Sweep not sweeping properly...?!

08-22-2014, 08:18 PM
Am struggling a bit with the sweep tool, as it doesn't seem to sweep the 2d vector properly. Two issues really. (See attached MPC.) The first is that as the spiral tightens, for both the Lower Bezier and Upper Bezier, the 2d vector being swept seems to be clipped. (Hide each alternately, and this first issue is more apparent.) Secondly, despite the Lower Bezier having the 0 depth and 1/8" depth 2d swept vectors being 0.192" wide, they are clearly not equal in width, as they are in the Upper Bezier which shows an equal width to the 0 depth and 1/8" depth 2d swept vectors (until, of course, the spiral tightens). Am using 1.187. Anyone else seen this behavior? If so, is there a trick to resolve?

08-23-2014, 08:07 AM
It would have probably also helped if I included screen snapshots, in the event that the sweep is working fine for others...

08-23-2014, 11:29 AM
This seems to me to be a bug. Strange things happen whenever the path gets too close to itself. Look at the attached mpc for simpler examples.

08-23-2014, 01:14 PM
So is that a recent bug find, or has that been lingering for some time? (Ie, is there hope of it being fixed soon?)

08-23-2014, 01:43 PM
I think you have discovered the bug. I do not remember seeing it before. I have reported it. 3D tools bugs usually get some priority; so I hope it will get fixed soon.

08-23-2014, 02:45 PM
All i see is a mishmash of green numbers and splines. lol


08-23-2014, 07:14 PM
Thanks for reporting the bug. And yes, you might have to break out the jeweler's loupe! ; -)

09-18-2014, 08:50 PM
After looking closer at Dan's samples, it appears that the general sweep algorithm is suspect, and will probably take some time to correct...

Actually found the problem of sweeping a curve an interesting challenge, and spent a few hours here and there over the past three weekends brewing up an algorithm that generates desired sweep paths quickly. I'm actually quite pleased with the algorithm, as I think it's an elegant solution, which reduces anomalies. It also uses vector math, thus avoiding the more compute intensive trigonometry functions, and handles sweeps of intersecting segments cleanly. (See attached frame of an ionic capital with a line segment tossed in cutting through the spiral.) The algorithm is not 100% complete, as it's shy of bounds checks, does not currently handle curved corners, nor closed figures, but these are easily incorporated into the framework. I post the critical code excerpt here (with a simplified BSD license) to make the code open source (it's written in VB6 and should be an easy port to C++), and in the event that LHR is interested...