Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 504 online users. » 2 Member(s) | 497 Guest(s) Applebot, Baidu, Bing, Google, Yandex, Jeff Jones
|
Latest Threads |
71613/30346c01 too high?!
Forum: Part Requests
Last Post: Jeff Jones
Yesterday, 16:43
» Replies: 14
» Views: 4,475
|
Same set, different sheet...
Forum: Parts Tracker Discussion
Last Post: Gerald Lasser
Yesterday, 13:19
» Replies: 2
» Views: 135
|
5724pr0001 Bubble Canopy ...
Forum: Part Requests
Last Post: SNIPE
2025-07-12, 21:08
» Replies: 2
» Views: 180
|
Modulex parts
Forum: Parts Authoring
Last Post: Philippe Hurbain
2025-07-12, 11:38
» Replies: 26
» Views: 4,045
|
Parts we are Working on -...
Forum: Part Requests
Last Post: Jeff Jones
2025-07-12, 11:23
» Replies: 157
» Views: 149,961
|
Friends 2014
Forum: Official Models
Last Post: Takeshi Takahashi
2025-07-11, 16:20
» Replies: 18
» Views: 16,742
|
LDCAD about Add custom p...
Forum: LDraw Editors and Viewers
Last Post: Nate87
2025-07-11, 8:13
» Replies: 5
» Views: 3,192
|
Hi-res logo primitives
Forum: Official File Specifications/Standards
Last Post: Jens Brühl
2025-07-10, 20:40
» Replies: 16
» Views: 1,184
|
Part 5561, Door 1 x 4 x 1...
Forum: Part Requests
Last Post: Gerald Lasser
2025-07-10, 9:55
» Replies: 1
» Views: 328
|
LDConfig Update: More dis...
Forum: Official File Specifications/Standards
Last Post: Jeff Jones
2025-07-09, 20:46
» Replies: 7
» Views: 571
|
|
|
LDraw Torus Generator |
Posted by: Kevin - 2017-06-06, 9:04 - Forum: Parts Author Tools
- Replies (37)
|
 |
UPDATE: To save scrolling all the way through this thread, here is the latest version of my LDraw Torus Generator, converted to a web page and hosted on the Google Cloud Platform: http://ldtorgen.appspot.com/
-----
I've been using 3D arrows for a while in the instructions I create, assembling the components from LDraw primitives. Recently I've wanted to create curved arrows, but I've found there aren't enough existing LDraw torus primitives to give me the fine control over the major and minor radii that I need. And there are even fewer high-definition torus primitives--necessary to create smoothly-curved arrows when rendering with POV-Ray.
I built a simple spreadsheet to generate the specific torus sections I needed, then generalized it to make it more useful. I've uploaded the spreadsheet to Google Docs so that anyone can use it. It generates the quadrilaterals and all conditional lines for each section.
LDraw Torus Generator
Simply enter the number of sections in a full torus (LDraw uses 16 for low-def and 48 for high-def), the major radius (the radius of the full torus), and the minor radius (radius of a cross-section) in the green cells. The spreadsheet generates a complete .dat file with a file name consistent with the LDraw torus naming standard. Then copy the blue cells to a file in your LDraw directory or a new model in your MPD file.
The torus segments are generated with 16-sided cross sections aligned for compatibility with existing disc and edge primitives. This has provided sufficient resolution for my purposes, even with POV-Ray rendering. I may expand to include 48-sided cross sections in the next iteration.
To generate a complete arrow, you will need to copy and rotate the torus segment to build the desired arc, then add a cone, two discs, and three circles of edges.
I'd appreciate any feedback or recommendations for improvements.
Thank you.
Kevin
|
|
|
|