// macro.hpp — generate a SolidWorks VBA macro that rebuilds the part parametrically. #pragma once #include #include "builder.hpp" namespace macrogen { // Returns VBA source text. `stepOut` is a Windows path the macro will export STEP to // (may be empty to skip export). std::string generateVBA(const builder::BuildParams& p, const std::string& stepOutWinPath); // Returns VBA that recreates the mounting-hole INTERFACE (not a part): a coordinate // system at the frame origin, a reference point at each hole centre, and the bolt // pattern (centre-to-centre spacings) noted — for designing a bracket against. std::string generateInterfaceVBA(const std::vector& holes, const builder::RefFrame& fr); // Returns VBA that imports the generated interface STEP and scan STL as native // parts, then fixes both at the origin in a new assembly. std::string generateAssemblyVBA(const std::string& winDir); } // namespace macrogen