# 3D-model-visualization **Repository Path**: feng-haobin/3-d-model-visualization ## Basic Information - **Project Name**: 3D-model-visualization - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-11 - **Last Updated**: 2026-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SolidWorks Cookie Mold Generator (Python) This script automates SolidWorks to create a basic "Combined Style" Cookie Mold with the text "佛大". ## Requirements 1. **SolidWorks**: Must be installed and running on your computer. 2. **Python**: Installed on your system. 3. **pywin32**: Python library to communicate with SolidWorks. ## Installation Open your terminal or command prompt and run: ```bash pip install pywin32 ``` ## Usage 1. **Open SolidWorks**. 2. Run the script: ```bash python create_cookie_mold.py ``` 3. The script will: * Create a new Part. * Draw a circular base (70mm diameter). * Extrude it to 5mm thickness. * Add the text "佛大" on top. * Extrude the text to 2.5mm relief height. ## Customizing the Style (Important!) Since this script uses standard system fonts, to achieve the "Rounded Calligraphy" (圆润书法字体) look: 1. **Edit Sketch2** in the Feature Tree. 2. Double-click the text "佛大". 3. Uncheck **"Use document font"**. 4. Click **"Font..."** and select a rounded font like **"Microsoft YaHei" (微软雅黑)**, **"YouYuan" (幼圆)**, or **"SimHei" (黑体)**. 5. Adjust the width and spacing to make it "combined" or tighter. 6. Exit the sketch to see the updated 3D model. ## Refining the Design * **Fillets (Rounding)**: Select the top edge of the base and add a 1-2mm Fillet feature manually for smooth edges. ## Troubleshooting * **`ModuleNotFoundError: No module named 'win32com'`**: Run the following command as Administrator to register the library: ```bash python Scripts/pywin32_postinstall.py -install ``` * **"Invalid Class String" or Connection Error**: Ensure SolidWorks is already running before executing the script.