Skip to content

ibuilder/revit-to-ifc-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Revit to IFC/JSON Converter with 3D Viewer

A web-based application for converting Revit models to IFC/JSON format, visualizing them in 3D, and exporting to Blender.

Application Screenshot

🚀 Features

  • File Upload: Drag-and-drop or browse for Revit files (.rvt, .rfa)
  • Conversion: Transform Revit models to IFC format and JSON structure
  • 3D Visualization: Interactive viewer for exploring the converted model
  • Export Options: Download as JSON or export to Blender (.blend)
  • User-Friendly Interface: Step-by-step workflow with progress indicators

📋 Requirements

  • Modern web browser with WebGL support (Chrome, Firefox, Edge, Safari)
  • For full functionality:
    • Node.js (v14+) and npm for development and server components
    • Server with Python and Revit API access for conversion operations

🔧 Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/revit-to-ifc-converter.git
    cd revit-to-ifc-converter
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm start
    
  4. Open your browser and navigate to:

    http://localhost:3000
    

📂 Project Structure

revit-to-ifc-converter/
├── index.html              # Main application HTML
├── assets/
│   ├── css/
│   │   └── styles.css      # Custom CSS styles
│   ├── js/
│   │   ├── main.js         # Core application logic
│   │   ├── viewer.js       # 3D viewer implementation
│   │   ├── converter.js    # IFC conversion utilities
│   │   └── exporter.js     # Export functionality
│   └── images/             # Application images and icons
├── lib/                    # External libraries and dependencies
├── server/                 # Server-side conversion components
│   ├── app.js              # Express server setup
│   ├── routes/             # API endpoints
│   └── conversion/         # Conversion logic
├── examples/               # Example files and demos
├── package.json            # Project dependencies
├── .gitignore              # Git ignore configuration
└── README.md               # Project documentation

🖥️ Usage

Basic Usage

  1. Open the application in your web browser.
  2. Upload a Revit model using drag-and-drop or the file browser.
  3. Click "Convert to IFC/JSON" to process the model.
  4. Once converted, explore the 3D model in the viewer.
  5. Download the model as JSON or export to Blender format.

Advanced Options

  • Custom Conversion Settings: Configure conversion parameters in the settings panel.
  • Layer Management: Toggle visibility of different building elements.
  • Measurement Tools: Measure distances and areas within the 3D model.
  • Cross-Section View: Create section cuts to view the internal structure.

🔄 Conversion Process

The conversion process involves several steps:

  1. Upload: The Revit file is uploaded to the server.
  2. Conversion: The server uses the Revit API to extract the model data.
  3. IFC Generation: The model is converted to IFC format.
  4. JSON Transformation: The IFC data is transformed into a JSON structure.
  5. Visualization: The JSON data is used to render the 3D model.

🔌 API Reference

Client-Side API

The application provides a JavaScript API for integration with other web applications:

// Initialize the converter
const converter = new RevitConverter({
  container: '#viewer-container',
  options: {
    allowExport: true,
    showGrid: true
  }
});

// Load a model
converter.loadModel(fileObject);

// Export to JSON
converter.exportJSON();

// Export to Blender
converter.exportBlender();

Server-Side API

RESTful endpoints for model conversion:

  • POST /api/convert: Convert a Revit file to IFC/JSON
  • GET /api/models/:id: Retrieve a converted model
  • GET /api/models: List all available models

🛠️ Development

Building from Source

npm run build

Running Tests

npm test

Development Mode

npm run dev

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📞 Support

If you have any questions or need support, please open an issue on the GitHub repository or contact the maintainers directly.

🙏 Acknowledgements

About

A web-based application for converting Revit models to IFC/JSON format, visualizing them in 3D, and exporting to Blender.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors