| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 6,182
» Latest member: oscour
» Forum threads: 6,614
» Forum posts: 54,394
Full Statistics
|
| Online Users |
There are currently 8 online users. » 1 Member(s) | 1 Guest(s) Applebot, Baidu, Bing, Facebook, Google, Twitter, Takeshi Takahashi
|
| Latest Threads |
What colour for cardboard...
Forum: Official File Specifications/Standards
Last Post: N. W. Perry
1 hour ago
» Replies: 0
» Views: 18
|
ModelScope XR - VR model ...
Forum: LDraw Editors and Viewers
Last Post: Wyatt Stone
6 hours ago
» Replies: 4
» Views: 2,833
|
New parts added manually,...
Forum: Help
Last Post: von_Erics
Yesterday, 22:45
» Replies: 4
» Views: 180
|
Aquazone 1995-1996
Forum: Official Models
Last Post: Takeshi Takahashi
Yesterday, 18:12
» Replies: 4
» Views: 1,479
|
Building with virtual bri...
Forum: LDraw Editors and Viewers
Last Post: huangke
Yesterday, 17:53
» Replies: 0
» Views: 86
|
partial torus prims
Forum: Official File Specifications/Standards
Last Post: Willy Tschager
Yesterday, 11:47
» Replies: 21
» Views: 22,508
|
93249 needs some work
Forum: Part Requests
Last Post: Sylvain Sauvage
2026-10-30, 22:09
» Replies: 9
» Views: 736
|
Meta Quest 3 block buildi...
Forum: All Other Programs.
Last Post: Seth Michel
2026-10-28, 23:21
» Replies: 0
» Views: 196
|
Eyes from set 21371 (Wall...
Forum: Part Requests
Last Post: Alfred Schmitz
2026-10-28, 8:42
» Replies: 0
» Views: 218
|
LDraw.org 2026-10 Parts U...
Forum: LDraw.org Announcements
Last Post: Magnus Forsberg
2026-10-27, 16:01
» Replies: 4
» Views: 739
|
|
|
| LDraw Torus Generator |
|
Posted by: Kevin Williams - 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
|
|
|
|