Script Upload and Deployment
Learn how to package, upload, and deploy your Grasshopper models to the InForm platform for interactive exploration by end users.
Overview​
The script upload process transforms your local Grasshopper definition into a web-accessible parametric model that users can explore through the InForm interface.
Deployment Pipeline​
- Model Preparation: Finalize and validate your Grasshopper definition
- Configuration: Set up parameters, outputs, and project settings
- Upload: Deploy the model to InForm servers
- Testing: Validate deployment in the InForm environment
- Release: Make the model available to end users
Prerequisites​
- Completed Grasshopper model with InForm components
- InForm developer account with upload permissions
- Project configuration defined and tested
- Validation passing all compatibility checks
Pre-Upload Preparation​
Model Validation​
InForm Compatibility Check​
Before uploading, run the InForm validator to ensure compatibility:
- Add InForm Validator component to your definition
- Connect all parameters and outputs to the validator
- Run validation and review the report
- Fix any issues identified by the validator
Common validation issues:
- Parameters without proper type definitions
- Geometry with invalid normals or open meshes
- Execution time exceeding limits (>30 seconds)
- Missing required metadata
Performance Optimization​
Ensure your model performs well in the cloud environment:
Execution Time:
- Target: <5 seconds for typical parameter changes
- Maximum: 30 seconds for complex calculations
- Use caching strategies for expensive operations
Memory Usage:
- Keep geometry complexity reasonable
- Avoid excessive data duplication
- Clean up temporary objects
Network Efficiency:
- Minimize data transfer size
- Use appropriate geometry formats
- Compress large datasets where possible
Documentation Preparation​
Parameter Documentation​
Create clear documentation for each parameter:
# Example parameter documentation
parameters:
building_height:
name: "Building Height"
description: "Overall height of the building in meters"
type: "number"
range: [10, 200]
default: 50
units: "meters"
category: "Geometry"
structural_system:
name: "Structural System"
description: "Primary structural system for the building"
type: "list"
options: ["Steel Frame", "Concrete", "Timber", "Composite"]
default: "Steel Frame"
category: "Structure"
User Guide​
Prepare guidance for end users:
- Getting started: Basic exploration workflow
- Parameter descriptions: What each parameter controls
- Interpretation guide: Understanding results and outputs
- Common use cases: Typical exploration scenarios
Upload Process​
Using the InForm CLI​
Installation​
Install the InForm command-line interface:
# Install via npm (requires Node.js)
npm install -g inform-cli
# Verify installation
inform --version
# Login to InForm
inform login
Basic Upload Command​
# Navigate to your project directory
cd /path/to/your/project
# Upload model
inform upload --model grasshopper/main_model.gh --config deployment/config.json
Configuration File​
Create a config.json file with project settings:
{
"project": {
"name": "Office Building Optimization",
"description": "Parametric office building with performance analysis",
"version": "1.0.0",
"category": "Architecture"
},
"parameters": {
"building_height": {
"display_name": "Building Height",
"description": "Overall building height in meters",
"type": "slider",
"min": 10,
"max": 200,
"default": 50,
"step": 1,
"units": "m"
}
},
"outputs": {
"geometry": {
"building_model": {
"type": "mesh",
"description": "3D building geometry"
}
},
"metrics": {
"floor_area": {
"type": "number",
"description": "Total floor area",
"units": "m²"
},
"cost_estimate": {
"type": "number",
"description": "Construction cost estimate",
"units": "USD"
}
}
},
"visualization": {
"default_view": "perspective",
"color_scheme": "performance_based",
"show_wireframe": false
},
"access": {
"visibility": "team",
"editors": ["engineering-team"],
"viewers": ["design-team", "client-reviewers"]
}
}
Using the Web Interface​
Step-by-Step Upload​
-
Login to InForm developer portal
-
Navigate to "New Project"
-
Upload Grasshopper file:
- Drag and drop your .gh file
- Wait for initial validation
- Review any warnings or errors
-
Configure parameters:
- Review auto-detected parameters
- Adjust display names and descriptions
- Set appropriate ranges and defaults
- Organize into logical groups
-
Configure outputs:
- Define geometry outputs for visualization
- Set up performance metrics
- Configure analysis results display
-
Set access permissions:
- Define who can access the project
- Set user roles and permissions
- Configure sharing options
-
Deploy and test:
- Click "Deploy" to upload to servers
- Run initial tests in staging environment
- Validate all functionality works correctly
Deployment Configuration​
Parameter Configuration​
Parameter Types​
Configure each parameter with appropriate UI controls:
Sliders (continuous numeric):
{
"type": "slider",
"min": 0,
"max": 100,
"step": 0.1,
"default": 50
}
Integer Inputs (discrete numeric):
{
"type": "integer",
"min": 1,
"max": 20,
"default": 5
}
Dropdowns (selection lists):
{
"type": "dropdown",
"options": ["Option A", "Option B", "Option C"],
"default": "Option A"
}
Checkboxes (boolean):
{
"type": "checkbox",
"default": true
}
Parameter Groups​
Organize parameters into logical groups:
{
"parameter_groups": [
{
"name": "Geometry",
"description": "Basic building geometry parameters",
"parameters": ["building_height", "floor_count", "footprint_area"]
},
{
"name": "Structure",
"description": "Structural system configuration",
"parameters": ["structural_system", "span_length", "column_spacing"]
},
{
"name": "Performance",
"description": "Performance analysis settings",
"parameters": ["load_factors", "design_codes", "safety_factors"]
}
]
}
Output Configuration​
Geometry Outputs​
Define what 3D geometry will be displayed:
{
"geometry_outputs": {
"building_envelope": {
"type": "mesh",
"description": "Building exterior surfaces",
"color_source": "material_type",
"transparency": false
},
"structural_elements": {
"type": "mesh",
"description": "Structural framework",
"color_source": "stress_analysis",
"transparency": true
},
"floor_plates": {
"type": "surface",
"description": "Floor levels",
"color_source": "solid_color",
"transparency": false
}
}
}
Data Outputs​
Configure performance metrics and analysis results:
{
"data_outputs": {
"performance_metrics": {
"floor_area": {
"type": "scalar",
"units": "m²",
"format": ",.0f"
},
"structural_weight": {
"type": "scalar",
"units": "kg",
"format": ",.1f"
}
},
"analysis_results": {
"displacement_max": {
"type": "scalar",
"units": "mm",
"format": ".2f"
},
"stress_distribution": {
"type": "field",
"visualization": "color_map"
}
}
}
}
Testing and Validation​
Staging Environment Testing​
Automated Tests​
Run automated validation after deployment:
# Run full test suite
inform test --project project-id --suite full
# Run specific test categories
inform test --project project-id --suite parameters
inform test --project project-id --suite performance
inform test --project project-id --suite visualization
Manual Testing Checklist​
- Parameter functionality: All parameters update the model correctly
- Range validation: Min/max values are enforced properly
- Performance: Response times are acceptable
- Visualization: 3D model displays correctly
- Data outputs: Metrics are calculated and displayed properly
- Error handling: Invalid inputs are handled gracefully
User Acceptance Testing​
Test Scenarios​
Create realistic test scenarios for end users:
- New user exploration: Someone using the model for the first time
- Systematic exploration: Methodical parameter space investigation
- Comparison workflows: Creating and comparing multiple variants
- Collaborative use: Multiple users exploring simultaneously
Performance Benchmarks​
Set and validate performance targets:
- Initial load time: <10 seconds
- Parameter update: <3 seconds for typical changes
- Complex analysis: <15 seconds for heavy calculations
- Concurrent users: Support expected simultaneous usage
Deployment Management​
Version Control​
Model Versioning​
Implement systematic version control:
# Tag releases in Git
git tag -a v1.0.0 -m "Initial release"
git tag -a v1.1.0 -m "Performance improvements"
# Deploy specific versions
inform deploy --version v1.1.0 --environment production
Rollback Procedures​
Prepare for rollback scenarios:
# List available versions
inform versions --project project-id
# Rollback to previous version
inform rollback --project project-id --version v1.0.0
# Monitor rollback status
inform status --project project-id
Environment Management​
Development → Staging → Production​
Use a staged deployment approach:
- Development: Local testing and iteration
- Staging: Integration testing and validation
- Production: Live user access
# Deploy to staging
inform deploy --environment staging
# Validate in staging
inform test --environment staging
# Promote to production
inform promote --from staging --to production
Configuration Management​
Maintain environment-specific configurations:
config/
├── development.json
├── staging.json
└── production.json
Monitoring and Maintenance​
Performance Monitoring​
Key Metrics​
Monitor these critical performance indicators:
- Response times: Parameter update and analysis execution
- Error rates: Failed calculations or invalid inputs
- User activity: Usage patterns and popular parameter ranges
- Resource usage: Server CPU, memory, and storage
Alerting​
Set up alerts for important issues:
- Model execution failures
- Performance degradation
- High error rates
- Resource exhaustion
Updates and Maintenance​
Regular Updates​
Plan for ongoing model maintenance:
- Bug fixes: Address issues identified in production
- Performance improvements: Optimize slow operations
- Feature enhancements: Add new parameters or analysis
- User feedback integration: Respond to user requests
Maintenance Windows​
Schedule regular maintenance:
- Weekly: Performance monitoring review
- Monthly: User feedback analysis
- Quarterly: Major updates and improvements
- Annually: Technology stack updates
Troubleshooting​
Common Upload Issues​
File Size Limits​
Problem: Model file too large for upload
Solutions:
- Remove unnecessary geometry from Grasshopper file
- Externalize large datasets
- Use references instead of embedded geometry
- Compress complex components
Validation Failures​
Problem: Model fails InForm validation
Solutions:
- Review validator output for specific issues
- Test parameter ranges thoroughly
- Check geometry validity (closed meshes, proper normals)
- Verify all required components are present
Performance Issues​
Problem: Model runs too slowly in cloud environment
Solutions:
- Profile model execution to identify bottlenecks
- Optimize expensive operations
- Implement caching for repeated calculations
- Reduce geometry complexity
Deployment Problems​
Access Issues​
Problem: Users cannot access deployed model
Solutions:
- Verify user permissions and access controls
- Check authentication and authorization settings
- Confirm project visibility settings
- Test with different user accounts
Functionality Problems​
Problem: Model behaves differently in InForm than in Grasshopper
Solutions:
- Compare execution environments and versions
- Check for plugin dependencies not available in cloud
- Validate data types and formats
- Test with identical parameter values
Next Steps​
After successful deployment:
- Configure project settings: Fine-tune user experience
- Monitor and optimize performance: Ensure optimal user experience
- Gather user feedback: Continuously improve the model
- Plan updates and enhancements: Evolve the model based on usage
Additional Resources​
- Project Configuration Guide: Advanced project setup
- Performance Optimization: Speed and efficiency tips
- API Documentation: Technical reference for advanced integration
- Troubleshooting Guide: Solutions to common problems