freecad를 재시작하거나 처음 시작하면 workbench에 FreeCAD MCP 라는게 생겨난다.
메뉴에서 FreeCAD MCP - Show FreeCAD MCP Panel 누르면 Tasks에 창이 열리는데 Start Server 눌러준다.
freecad 에서 start RPC server 하면 9876 포트로 생성된다.
$ netstat -tnlp (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:9876 0.0.0.0:* LISTEN 3295252/freecad
To add C:\Users\user\.local\bin to your PATH, either restart your shell or run:
set Path=C:\Users\user\.local\bin;%Path% (cmd) $env:Path = "C:\Users\user\.local\bin;$env:Path" (powershell)
PS C:\Users\user> $env:Path = "C:\Users\user\.local\bin;$env:Path" PS C:\Users\user> uv An extremely fast Python package manager.
Usage: uv.exe [OPTIONS] <COMMAND>
Commands: run Run a command or script init Create a new project add Add dependencies to the project remove Remove dependencies from the project version Read or update the project's version sync Update the project's environment lock Update the project's lockfile export Export the project's lockfile to an alternate format tree Display the project's dependency tree format Format Python code in the project tool Run and install commands provided by Python packages python Manage Python versions and installations pip Manage Python packages with a pip-compatible interface venv Create a virtual environment build Build Python packages into source distributions and wheels publish Upload distributions to an index cache Manage uv's cache self Manage the uv executable help Display documentation for a command
Cache options: -n, --no-cache Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation [env: UV_NO_CACHE=] --cache-dir <CACHE_DIR> Path to the cache directory [env: UV_CACHE_DIR=]
Python options: --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] --no-python-downloads Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"]
Global options: -q, --quiet... Use quiet output -v, --verbose... Use verbose output --color <COLOR_CHOICE> Control the use of color in output [possible values: auto, always, never] --native-tls Whether to load TLS certificates from the platform's native certificate store [env: UV_NATIVE_TLS=] --offline Disable network access [env: UV_OFFLINE=] --allow-insecure-host <ALLOW_INSECURE_HOST> Allow insecure connections to a host [env: UV_INSECURE_HOST=] --no-progress Hide all progress outputs [env: UV_NO_PROGRESS=] --directory <DIRECTORY> Change to the given directory prior to running the command --project <PROJECT> Run the command within the given project directory [env: UV_PROJECT=] --config-file <CONFIG_FILE> The path to a `uv.toml` file to use for configuration [env: UV_CONFIG_FILE=] --no-config Avoid discovering configuration files (`pyproject.toml`, `uv.toml`) [env: UV_NO_CONFIG=] -h, --help Display the concise help for this command -V, --version Display the uv version
일부는 설정용도로 쓸 수 있고, 일부는 상태정보를 폴링(polling)으로 읽어갈 수 있다.
$ gst-inspect-1.0 autovideosink Factory Details: Rank none (0) Long-name Auto video sink Klass Sink/Video Description Wrapper video sink for automatically detected video sink Author Jan Schmidt <thaytan@noraisin.net>
Plugin Details: Name autodetect Description Plugin contains auto-detection plugins for video/audio in- and outputs Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstautodetect.so Version 1.20.3 License LGPL Source module gst-plugins-good Source release date 2022-06-15 Binary package GStreamer Good Plugins (Ubuntu) Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0
Pad Templates: SINK template: 'sink' Availability: Always Capabilities: ANY
Element has no clocking capabilities. Element has no URI handling capabilities.
Pads: SINK: 'sink'
Element Properties: async-handling : The bin will handle Asynchronous state changes flags: readable, writable Boolean. Default: false filter-caps : Filter sink candidates using these caps. flags: readable, writable, 0x2000 video/x-raw
message-forward : Forwards all children messages flags: readable, writable Boolean. Default: false name : The name of the object flags: readable, writable, 0x2000 String. Default: "autovideosink0" parent : The parent of the object flags: readable, writable, 0x2000 Object of type "GstObject" sync : Sync on the clock flags: readable, writable Boolean. Default: true ts-offset : Timestamp offset in nanoseconds flags: readable, writable Integer64. Range: -9223372036854775808 - 9223372036854775807 Default: 0
Properties and values Properties are used to describe extra information for capabilities. A property consists of a key (a string) and a value.
주기적으로 읽는게 싫다면 signal을 제공하는 엘리먼트를 통해 이벤트 발생시 값을 수신할 수 있다.
$ gst-inspect-1.0 fpsdisplaysink Factory Details: Rank none (0) Long-name Measure and show framerate on videosink Klass Sink/Video Description Shows the current frame-rate and drop-rate of the videosink as overlay or text on stdout Author Zeeshan Ali <zeeshan.ali@nokia.com>, Stefan Kost <stefan.kost@nokia.com>
Plugin Details: Name debugutilsbad Description Collection of elements that may or may not be useful for debugging Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdebugutilsbad.so Version 1.20.3 License LGPL Source module gst-plugins-bad Source release date 2022-06-15 Binary package GStreamer Bad Plugins (Ubuntu) Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0
Pad Templates: SINK template: 'sink' Availability: Always Capabilities: ANY
Element has no clocking capabilities. Element has no URI handling capabilities.
Pads: SINK: 'sink'
Element Properties: async-handling : The bin will handle Asynchronous state changes flags: readable, writable Boolean. Default: false fps-update-interval : Time between consecutive frames per second measures and update (in ms). Should be set on NULL state flags: readable, writable Integer. Range: 1 - 2147483647 Default: 500 frames-dropped : Number of frames dropped by the sink flags: readable Unsigned Integer. Range: 0 - 4294967295 Default: 0 frames-rendered : Number of frames rendered flags: readable Unsigned Integer. Range: 0 - 4294967295 Default: 0 last-message : The message describing current status flags: readable String. Default: null max-fps : Maximum fps rate measured. Reset when going from NULL to READY.-1 means no measurement has yet been done flags: readable Double. Range: -1 - 1.797693e+308 Default: -1 message-forward : Forwards all children messages flags: readable, writable Boolean. Default: false min-fps : Minimum fps rate measured. Reset when going from NULL to READY.-1 means no measurement has yet been done flags: readable Double. Range: -1 - 1.797693e+308 Default: -1 name : The name of the object flags: readable, writable, 0x2000 String. Default: "fpsdisplaysink0" parent : The parent of the object flags: readable, writable, 0x2000 Object of type "GstObject" signal-fps-measurements: If the fps-measurements signal should be emitted. flags: readable, writable Boolean. Default: false silent : Don't produce last_message events flags: readable, writable Boolean. Default: false sync : Sync on the clock (if the internally used sink doesn't have this property it will be ignored flags: readable, writable Boolean. Default: true text-overlay : Whether to use text-overlay flags: readable, writable Boolean. Default: true video-sink : Video sink to use (Must only be called on NULL state) flags: readable, writable Object of type "GstElement"
Signals GObject signals can be used to notify applications of events specific to this object. Note, however, that the application needs to be aware of signals and their meaning, so if you're looking for a generic way for application-element interaction, signals are probably not what you're looking for. In many cases, however, signals can be very useful. See the GObject documentation for all internals about signals.
"capsfilter caps=" 생략하고 쓰면 알아서 capsfilter로 인식하는 건가?
Example launch line gst-launch-1.0 videotestsrc ! capsfiltercaps=video/x-raw,format=GRAY8 ! videoconvert ! autovideosink
Limits acceptable video from videotestsrc to be grayscale. Equivalent to gst-launch-1.0 videotestsrc ! video/x-raw,format=GRAY8 ! videoconvert ! autovideosink