Fry3DX 0.4: an easy 3D modeller

Shapes with live settings, shape editing, knife and hole tools, drawing
shapes onto other objects, combining objects (add / subtract / overlap),
copies, thickness, painting with stickers and layers, a Layout tab, a
Print tab with checks, packed .fry files with autosave, export to GLB,
glTF, FBX, OBJ, 3MF, STL and PLY, folders in Layers, its own crash
screen, and a website for GitHub Pages in docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
This commit is contained in:
Nexoniarz 2026-10-19 21:18:35 +02:00
commit f3e8eca87b
135 changed files with 23423 additions and 0 deletions

33
engine/core/log.cpp Normal file
View file

@ -0,0 +1,33 @@
#include "core/log.h"
#include <cstdio>
#include <mutex>
#include <string>
#if defined(__ANDROID__)
#include <android/log.h>
#endif
namespace keel::log {
namespace {
constexpr size_t kMaxLines = 4096;
std::mutex g_mutex;
std::vector<Line> g_lines;
} // namespace
void write(Level level, std::string_view text) {
static const char* const prefix[] = {"", "WARN: ", "ERROR: "};
std::lock_guard lock(g_mutex);
std::fprintf(level == Level::Info ? stdout : stderr, "%s%.*s\n", prefix[int(level)], int(text.size()), text.data());
std::fflush(level == Level::Info ? stdout : stderr);
#if defined(__ANDROID__) // (a phone has no console: adb logcat -s Fry3DX shows it)
static const int priority[] = {ANDROID_LOG_INFO, ANDROID_LOG_WARN, ANDROID_LOG_ERROR};
__android_log_print(priority[int(level)], "Fry3DX", "%.*s", int(text.size()), text.data());
#endif
if (g_lines.size() >= kMaxLines) g_lines.erase(g_lines.begin(), g_lines.begin() + kMaxLines / 4);
g_lines.push_back({level, std::string(text)});
}
const std::vector<Line>& history() { return g_lines; }
void clearHistory() { g_lines.clear(); }
} // namespace keel::log