跳到正文
McNeel Forum · 插件动态· Kenny Vo·· 27 天前精选AI 评分82

HL 开源插件为 Rhino 8 提供 Make2D 替代方案

HL: a free, open-source Make2D alternative for Rhino 8 (Mac and Windows)

AI 导读

Kenny Vo 发布免费开源的 HiddenLines(HL)插件,为 Rhino 8 Mac 和 Windows 绘制按线型与距离加权的可见线,并可导出 SVG、DXF 和 Illustrator 文件。插件还能处理剖切轮廓、对象交界线、隐藏线和模型断线检查,但不修复开放实体或重叠对象,也不绘制文字、标注和填充。大型模型导出可能需要较长时间。

推荐理由

HL将可见线分类、加权和模型问题检查整合进Rhino出图流程,并支持多种曲线文件导出。

正文 · 原文

HL is a free, open-source plug-in for Rhino 8 on Mac and Windows that draws a model’s visible lines as Make2D does, then weights each line by what it is. A building’s outline is heaviest, the steps and creases inside it are lighter, and every line gets lighter again with distance. It adds the drawing to your model as curves on layers and can also save it as SVG, DXF and Illustrator files. To try it, install HiddenLines from the Package Manager, restart Rhino, and type HL.

Make2D and HL on the same view of a model's roofs

Make2D (left) and HL (right) on the same view of a model’s roofs. Make2D breaks and doubles the tile lines where the roofs meet; HL draws them whole, lighter than the skylights’ outlines.

Beyond the weights, it does a few things Make2D doesn’t:

  • A section from one of your clipping planes comes out with its cut closed into outlines, ready to hatch.
  • It draws the lines where separate objects meet, such as a wall standing on the ground or a chimney coming through a roof.
  • Each layer draws in a role (building, detail, furniture, context, ground, trees that hide nothing behind them, and others), guessed from the layer’s name and saved in the model.
  • After each drawing it lists the faults in the model that break lines (open solids, faces that cross themselves, solids running into each other), and clicking a row selects those objects.
  • Every curve it adds carries its source layer and object id as user text, so SelUserText picks out the lines from one layer.

If you’d rather set the weights yourself, it can start from your layers’ print widths or draw one weight per role, as Make2D does. It can also draw hidden lines, dashed on their own layer.

Make2D and HL on a house whose chimney, walls and tree meet other objects

Make2D runs the chimney’s edges down through the roof and leaves out where the walls and the tree’s trunk meet the ground; HL stops the chimney at the roof and draws those lines.

It takes the exact visible and cut curves from RhinoCommon’s HiddenLineDrawing, the engine behind Make2D, along with a mesh of every object. A second step, on its own Python, rasterizes those meshes into a buffer of the nearest triangle at 4 pixels per printed point and tests each line against it every 0.25 pt on paper. It then joins the curves where they meet and sorts each line into a class: an outline, where something meets the ground, an edge in front of a drop, a step, a crease or a seam. A line’s weight follows from its class and its distance.

Some limits to know before installing:

  • It draws what the model holds, so open solids and overlapping objects come out as broken, doubled or missing lines; HL names those objects but doesn’t fix them.
  • Large models are slow to export: about 3,300 objects and 6.8 million triangles take 15 to 20 minutes the first time and about a minute to draw, while small models take seconds.
  • The first run downloads Python 3.12 and the packages it draws with, about 120 MB (up to 700 MB on disk), once.
  • It draws no text, dimensions or hatches, and its default weights are my own drawing standard for architecture.
  • It runs on Rhino 8 for Mac and Windows and on the Rhino 9 beta for Mac, though Rhino 9 on Windows hasn’t been tried and Intel Macs have only been run under Rosetta.

HL's results window listing a model's faults

The results window after a plan: the drawing’s own check first, then the model’s faults by kind and layer.

A disclaimer, I’m an architecture student, not a programmer. Claude orchestrated most of the code, codex models built some parts, and models from both reviewed it and wrote tests to break it. My part was the drawing rules and the checking: before the first release I marked up every round by hand on my own studio models, about 180 notes over six rounds, and each note became a fix and a test.

When I shared HL on r/rhino last month, someone there suggested I post it here too. Since then, a bug report led to a fix for Rhino 8 before 8.6, and Laurenzooo’s pull request got it running on the Rhino 9 beta. The most useful feedback is a model it draws wrong, posted here or as a GitHub issue with the log attached; the Report a problem link at the bottom of HL’s dialog fills in your versions. If you know RhinoCommon or computational geometry better than I do, pull requests would teach me a lot.

https://www.food4rhino.com/en/app/hl-hidden-lines

来源:McNeel Forum · 插件动态 · discourse.mcneel.com