CC(nged)

create a new constraint object in the database

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… CC(nged) β€” create a new constraint object, bestie ✨

okay so this is the cc command from BRL-CAD User Commands (the nged family πŸŽ€), and honestly? she's a tiny little queen with a very specific job. let's get into it πŸ¦‹


🌸 NAME 🌸

cc β€” creates a brand-new constraint object in the database. that's it, that's the whole vibe πŸ’–


✨ SYNOPSIS ✨

cc name constraint_expression

like, both args. both. no skipping πŸ™ˆ


πŸ’œ DESCRIPTION πŸ’œ

so the cc command (short for create constraint, iykyk) creates a new constraint object named name in the database, and it stores constraint_expression as that object's parametric expression. constraint objects are non-geometry database objects of type ID_CONSTRAINT. not geometry, just vibes and math 🧚

Exactly two arguments are required, fr fr: the name for the new constraint object, and the constraint expression string. that's a hard two, not a "two-ish."

the command fails if either name or constraint_expression already exists as an object name in the database β€” both get checked against existing object names before creation even proceeds. so like, no duplicates, the database said no πŸ’€

on success, the message Constraint saved is printed. slay ✨

the constraint expression is stored within the new object, and you can later retrieve or evaluate it using the constraint command πŸ‘‘

🫢 Note: cc requires a writable (non-read-only) database, and it requires the database to be open. no open database, no constraint, sorry bestie 😭
🫢 Note: cc is a low-level object creator. if you want the full constraint management interface β€” including setting attributes on existing constraint objects, querying, displaying, and evaluating β€” use the constraint command instead. she's the main character, cc is just the intern πŸ’…

πŸŽ€ EXAMPLES πŸŽ€

Example 1. Create a constraint object with a formula expression

mged> cc p0 "formula ell.R[0]=10.0"

this creates a new constraint object named p0 storing the expression formula ell.R[0]=10.0. it fails if either p0 or formula ell.R[0]=10.0 already exists as an object name. both checks, every time, no cap πŸ”₯

Example 2. Create a geometric constraint

mged> cc c1 "coincident ell.V arb8.P[4]"

this creates a new constraint object c1 with a coincident point constraint expression. geometry constraint era 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

  • constraint(nged) β€” the full-featured one, go hang out with her too πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” icons only, literally ⭐


πŸ’€ BUG REPORTS πŸ’€

reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. tell them everything, they wanna know 🫢


and that's the whole page, bestie!! 🌸 this was CC(nged) from the BRL-CAD User Commands manual, BRL-CAD version vibes, dated the BRL-CAD way β€” mwah, go make some constraints, ily πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from