Логотип Curves And Text

Curves And Text

Сообщество
TMHSDigital
curves-and-text

Build legacy Curve and TextCurve datablocks from Python: bpy.data.curves.new(type='CURVE' or 'FONT'), splines.new('BEZIER'), bezier_points.add, handle types, bevel_depth, bevel_resolution, resolution_u, use_fill_caps, extrude, TextCurve.body, align_x/align_y, the built-in Bfont, and reading the tessellated result through evaluated_get(...).to_mesh() / to_mesh_clear(). Use when the user scripts beveled tubes, wires, logos or 3D text, reads obj.data.vertices on a curve or text object and finds nothing, gets an uncapped hollow pipe, mis-predicts text or tube dimensions, or hits ReferenceError after to_mesh_clear(). Targets 5.2 LTS with 4.5 LTS fallback.

Обзор

ИздательTMHSDigital
РепозиторийBlender-Developer-Tools
Название навыкаcurves-and-text
Звёзды
20
Форки
5
Файлы в комплекте
Только инструкции
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Издатель навыка на GitHub — TMHSDigital. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Curves And Text в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/curves-and-text
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/skills/curves-and-text .claude/skills/curves-and-text
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Curves And Text в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Curves And Text, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Curves And Text не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

Curves and Text

Trigger

Use this skill when the user:

  • Creates a curve or 3D text object from a script (bpy.data.curves.new, type='CURVE' or type='FONT')
  • Mentions splines, bezier_points, bevel_depth, bevel_resolution, use_fill_caps, extrude, TextCurve, body, align_x, or Bfont
  • Needs the vertex positions, bounds or face count of a beveled curve or extruded text
  • Reports that a tube renders as a hollow pipe, or that text dimensions do not match the numbers they set
  • Hits ReferenceError reading a mesh after to_mesh_clear()

High-level shape

A curve or text object is a Curve datablock, not a mesh. Author it on the data API, link an object to a collection, and read geometry only through the depsgraph:

python
import bpy

curve = bpy.data.curves.new("Tube", 'CURVE')   # 'FONT' returns a TextCurve
curve.dimensions = '3D'
curve.bevel_depth = 0.15
curve.use_fill_caps = True

spline = curve.splines.new('BEZIER')
spline.bezier_points.add(3)                     # one point exists already -> 4
for i, bp in enumerate(spline.bezier_points):
    bp.co = (i, 0.0, 0.15)
    bp.handle_left_type = 'AUTO'
    bp.handle_right_type = 'AUTO'

obj = bpy.data.objects.new("Tube", curve)
bpy.context.collection.objects.link(obj)

No operator, no mesh conversion: the tube renders from the curve settings. The curve and text APIs taught here do not diverge between 4.5 LTS and 5.x; the examples run the same code on 4.5 LTS, 5.1 and 5.2 LTS, and the curve tessellation counts are identical across them. The one version split nearby is bpy.app.version_string (see Text below).

Curves: splines, points, bevel

  • splines.new('BEZIER') creates a spline that already holds one point. bezier_points.add(n - 1) gives n points; add(n) gives n + 1.
  • bp.co is the point; handle_left_type / handle_right_type = 'AUTO' lets Blender place smooth handles. For exact shapes (a straight leg, a quarter-circle bend), set both types to 'FREE' first, then write bp.co, bp.handle_left, bp.handle_right.
  • bevel_depth is the tube radius. bevel_resolution and resolution_u set the cross-section and along-curve sampling.
  • use_fill_caps = True closes the ends of an open spline with faces. Without it the ends are hollow; the caps exist only in the evaluated mesh, so check them there.

Measured closed forms (curve-bevel-arc, a semicircle of radius 1.5, centerline at z = bevel_depth):

QuantityValue
Evaluated Z span[0, 2 * bevel_depth] (the tube rests on the floor)
Evaluated X span2 * radius + 2 * bevel_depth
Verts / faces (8 points, bevel_resolution 4, resolution_u 12, caps on)1044 / 1028 — measured, no closed form

Tessellation counts have no simple formula. Treat them as a regression pin, never derive them.

python
import bpy, math

BEVEL, RADIUS, N = 0.15, 1.5, 8
cu = bpy.data.curves.new("Arc", 'CURVE')
cu.dimensions = '3D'
cu.bevel_depth = BEVEL
cu.bevel_resolution = 4
cu.resolution_u = 12
cu.use_fill_caps = True
sp = cu.splines.new('BEZIER')
sp.bezier_points.add(N - 1)
for i, bp in enumerate(sp.bezier_points):
    a = i / (N - 1) * math.pi
    bp.co = (RADIUS * math.cos(a), RADIUS * math.sin(a), BEVEL)
    bp.handle_left_type = 'AUTO'
    bp.handle_right_type = 'AUTO'
obj = bpy.data.objects.new("Arc", cu)
bpy.context.collection.objects.link(obj)

bpy.context.view_layer.update()
ev = obj.evaluated_get(bpy.context.evaluated_depsgraph_get())
me = ev.to_mesh()
try:
    zs = [v.co.z for v in me.vertices]
    xs = [v.co.x for v in me.vertices]
    n_faces = len(me.polygons)
finally:
    ev.to_mesh_clear()

assert len(cu.splines[0].bezier_points) == N
assert n_faces > 0
assert abs(min(zs)) < 1e-4 and abs(max(zs) - 2 * BEVEL) < 1e-4
assert abs((max(xs) - min(xs)) - (2 * RADIUS + 2 * BEVEL)) < 0.05

Text: TextCurve, body, alignment, Bfont

bpy.data.curves.new(name, type='FONT') returns a bpy.types.TextCurve, which is also a bpy.types.Curve; the object's type is 'FONT'. The built-in font (font.name contains "Bfont", "Bfont Regular") is assigned and loaded even under --background, so no font file is needed.

  • body is plain assignable text. Editing it regenerates the geometry: more characters give a strictly wider evaluated mesh.
  • align_x = 'CENTER', align_y = 'CENTER' center the text on the object origin.
  • Flat text (no extrude, no bevel_depth) is already filled: the evaluated mesh has faces, and its Z extent is 0.
  • extrude and bevel_depth give exact solids: evaluated Z extent = 2 * (extrude + bevel_depth), and a round bevel pushes an upright glyph's outline out by exactly bevel_depth.
  • A curved glyph overshoots: a body ending in "e" grew 0.0208 on the right for a 0.02 bevel (#505). Assert outline growth exactly only on a straight-sided edge, and give curved edges a band.
  • Other fonts load with bpy.data.fonts.load(path, check_existing=True). Blender ships fonts under bpy.utils.system_resource('DATAFILES') + fonts/ (Inter.woff2, DejaVuSansMono.woff2 on 4.5 LTS and 5.x). On 4.5 LTS, Inter's variable-font outlines are built with broken counters, so use DejaVuSansMono.woff2 there. Bfont's "1" is a bare stem that reads as a capital I.

Version split: bpy.app.version_string is "5.1.2" on 5.x but "4.5.11 LTS" on 4.5. Use it as display text in body if you like, but branch on the bpy.app.version tuple, never on the string.

python
import bpy

EXTRUDE, BEVEL = 0.06, 0.02
txt = bpy.data.curves.new("Stamp", type='FONT')
txt.body = bpy.app.version_string
txt.align_x = 'CENTER'
txt.align_y = 'CENTER'
txt.extrude = EXTRUDE
txt.bevel_depth = BEVEL
txt.bevel_resolution = 3
obj = bpy.data.objects.new("Stamp", txt)
bpy.context.collection.objects.link(obj)

deps = bpy.context.evaluated_depsgraph_get()
deps.update()
ev = obj.evaluated_get(deps)
me = ev.to_mesh()
try:
    zs = [v.co.z for v in me.vertices]
    n_faces = len(me.polygons)
finally:
    ev.to_mesh_clear()

assert isinstance(txt, bpy.types.TextCurve) and isinstance(txt, bpy.types.Curve)
assert obj.type == 'FONT' and "Bfont" in txt.font.name
assert n_faces > 0
assert abs((max(zs) - min(zs)) - 2 * (EXTRUDE + BEVEL)) < 1e-4

Reading the evaluated mesh

obj.data on a curve or text object is the Curve, so it has no vertices. The tessellated mesh (bevel, caps, extrude, glyph fill) exists only after evaluation: obj.evaluated_get(depsgraph).to_mesh(), then to_mesh_clear() in a finally. After to_mesh_clear() the returned Mesh is dead and any access raises ReferenceError; copy out the numbers you need first. The full lifetime contract is in depsgraph-and-evaluated-data § The lifetime rule.

After changing curve settings or body in the same script, call bpy.context.view_layer.update() or depsgraph.update() before evaluating again, as both examples do.

Common AI mistakes

  1. Reading obj.data.vertices on a curve or text object. The Curve has no vertices. Evaluate and use to_mesh().

  2. bezier_points.add(n) for n points. The spline starts with one point; this yields n + 1.

  3. Forgetting use_fill_caps. An open beveled spline renders as a hollow pipe. The caps are faces in the evaluated mesh, not a flag to re-read.

  4. Treating bevel_depth as a diameter. It is the radius: a tube spans 2 * bevel_depth, and text Z extent is 2 * (extrude + bevel_depth).

  5. Exact bevel growth on every glyph edge. Straight sides grow by exactly bevel_depth; curved glyphs overshoot (#505). Use a band.

  6. Converting to a mesh or calling curve operators to get a tube. Bevel, caps and extrude render straight from the Curve datablock.

  7. Deriving tessellation counts. Vert/face counts are measured regression pins (1044 / 1028 for the arc above), not closed forms.

  8. Shipping a font file for headless text. Bfont is built in and loaded under --background.

  9. Parsing version_string as semver. "4.5.11 LTS" breaks it. Compare bpy.app.version tuples.

  10. Using the mesh after to_mesh_clear(). ReferenceError. Read first, clear in finally.

See also

  • Example examples/curve-bevel-arc/ — Bezier semicircle with bevel_depth, use_fill_caps, measured tessellation and closed-form spans; falsifier --no-caps (exit 7).
  • Example examples/text-version-stamp/ — TextCurve with body, Bfont, extrude/bevel closed forms, the #505 trailing-glyph band, and the dead-mesh ReferenceError; falsifier --wrong-body (exit 4).
  • Skill depsgraph-and-evaluated-data — evaluated_get / to_mesh / to_mesh_clear lifetimes.

Runnable examples

Each example runs headless, asserts the contract, and exits non-zero when it breaks. Run one with blender --background --python <script> --; pass a falsifier flag to watch the check fail.

  • curve-bevel-arc: A beveled Bezier semicircle authored on bpy.types.Curve — splines.new('BEZIER'), bezier_points, bevel_depth, use_fill_caps — so the curve renders as a solid tube without a prior mesh conversion. Falsify: --no-caps (exit 7).
  • text-version-stamp: The TextCurve data API — curves.new(type='FONT'), live body text from bpy.app.version_string, extrude and bevel_depth solids, and evaluated-mesh conversion. Falsify: --wrong-body (exit 4).

References

Часто задаваемые вопросы

Что делает навык ИИ Curves And Text?

Build legacy Curve and TextCurve datablocks from Python: bpy.data.curves.new(type='CURVE' or 'FONT'), splines.new('BEZIER'), bezier_points.add, handle types, bevel_depth, bevel_resolution, resolution_u, use_fill_caps, extrude, TextCurve.body, align_x/align_y, the built-in Bfont, and reading the tessellated result through evaluated_get(...).to_mesh() / to_mesh_clear(). Use when the user scripts beveled tubes, wires, logos or 3D text, reads obj.data.vertices on a curve or text object and finds nothing, gets an uncapped hollow pipe, mis-predicts text or tube dimensions, or hits ReferenceError...

Зачем использовать Curves And Text в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Curves And Text — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Curves And Text в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/curves-and-text. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Curves And Text?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Curves And Text?

С любым количеством. В TypingMind вы можете использовать Curves And Text с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Curves And Text?

Навык опубликован на GitHub. Издатель — TMHSDigital. Условия лицензии можно найти в репозитории. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇