feat: add candidate FreeCAD naming SDK and attachment oracles
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

Build and verify the candidate-only FreeCAD naming bridge and OCCT worker path, including three-stage StringHasher restoration. Add Datum, ShapeBinder, attachment-mode, and PartDesign structure oracles plus offline SDK build plans and CI boundary checks.
This commit is contained in:
2026-08-13 17:16:07 -04:00
parent 58c0807219
commit f97eae4153
79 changed files with 7936 additions and 77 deletions

View File

@@ -1,3 +1,22 @@
#pragma once
#include <Base/Exception.h>
struct FreeCadNamingProbeLogInstance
{
bool isEnabled(int) const
{
return false;
}
};
inline FreeCadNamingProbeLogInstance freecad_naming_probe_log_instance;
#define FC_LOGLEVEL_LOG 3
#define FC_LOGLEVEL_TRACE 4
#define FC_LOG_INSTANCE freecad_naming_probe_log_instance
#define FC_LOG_LEVEL_INIT(...)
#define FC_WARN(message) ((void)0)
#define FC_ERR(message) ((void)0)
#define FC_LOG(message) ((void)0)
#define FC_TRACE(message) ((void)0)

View File

@@ -0,0 +1,35 @@
#pragma once
#include <sstream>
#include <stdexcept>
namespace Base {
class Exception : public std::runtime_error
{
public:
using std::runtime_error::runtime_error;
void reportException() const {}
};
class RuntimeError : public Exception
{
public:
using Exception::Exception;
};
class ValueError : public Exception
{
public:
using Exception::Exception;
};
} // namespace Base
#define FC_THROWM(type, message) \
do { \
std::ostringstream freecad_naming_probe_exception_stream; \
freecad_naming_probe_exception_stream << message; \
throw type(freecad_naming_probe_exception_stream.str()); \
} while (false)

View File

@@ -0,0 +1,38 @@
#pragma once
#include <CXX/Objects.hxx>
namespace Base {
class Reader;
class Writer;
class XMLReader;
class BaseClass
{
public:
virtual ~BaseClass() = default;
virtual PyObject* getPyObject()
{
return nullptr;
}
};
class Persistence : public BaseClass
{
public:
~Persistence() override = default;
virtual unsigned int getMemSize() const = 0;
virtual void Save(Writer&) const = 0;
virtual void Restore(XMLReader&) = 0;
virtual void SaveDocFile(Writer&) const = 0;
virtual void RestoreDocFile(Reader&) = 0;
};
} // namespace Base
#define TYPESYSTEM_HEADER()
#define TYPESYSTEM_HEADER_WITH_OVERRIDE()
#define TYPESYSTEM_SOURCE(...)
#define TYPESYSTEM_SOURCE_ABSTRACT(...)

View File

@@ -0,0 +1,3 @@
#pragma once
#include <CXX/Objects.hxx>

View File

@@ -0,0 +1,45 @@
#pragma once
#include <istream>
#include <sstream>
namespace Base {
class Reader : public std::istream
{
public:
Reader()
: std::istream(nullptr)
{}
};
class XMLReader
{
public:
template<typename T>
T getAttribute(const char*) const
{
return T {};
}
bool hasAttribute(const char*) const
{
return false;
}
void readElement(const char*) {}
void readEndElement(const char*) {}
void addFile(const char*, void*) {}
std::istream& beginCharStream()
{
return stream;
}
int FileVersion = 1;
private:
std::istringstream stream;
};
} // namespace Base

View File

@@ -0,0 +1,43 @@
#pragma once
#include <istream>
#include <ostream>
#include <string>
namespace Base {
class TextOutputStream
{
public:
explicit TextOutputStream(std::ostream& stream)
: output(stream)
{}
TextOutputStream& operator<<(const char* value)
{
output << value;
return *this;
}
private:
std::ostream& output;
};
class TextInputStream
{
public:
explicit TextInputStream(std::istream& stream)
: input(stream)
{}
TextInputStream& operator>>(std::string& value)
{
input >> value;
return *this;
}
private:
std::istream& input;
};
} // namespace Base

View File

@@ -0,0 +1,40 @@
#pragma once
#include <ostream>
#include <sstream>
namespace Base {
class Writer
{
public:
std::ostream& Stream()
{
return stream;
}
const char* ind() const
{
return "";
}
const char* addFile(const char* name, const void*)
{
return name;
}
std::ostream& beginCharStream()
{
return stream;
}
std::ostream& endCharStream()
{
return stream;
}
private:
std::ostringstream stream;
};
} // namespace Base