Does three.js support any geomatric format like STEP or IGES?

Does three.js support any geomatric format like STEP or IGES? How do I render change in model parameter values(like length, height etc ) in realtime using three.js?

Duplicate: Is there any way to load STEP file using three.js

Sorry, this question is unclear and does not show any kind of research effort. Such low effort questions are normally deleted.

I need to render a step file generated from server side to client side. if step file doesnt suported directly i can convert it into ‘.stl’ or other format. which format is effective? Then how can i render that in client side. Pls help…

Using STL is of course a valid approach. The following example demonstrates how you can use THREE.STLLoader to load the file:


I need to convert .step/.iges file to .stl format which is supported by threejs…Is there any way?

One possibility to perform this conversion is with FreeCAD.


Thanks for your response. I already tried by installing FreeCAD software but it is a manual process. I want to do dynamic conversion. Is there any api available for the same?

@gg150190 If you read the FreeCAD docs carefully you can see that a Python API interface is available, it can be tricky to import.

#Import sys to append path
import sys
# Append local FreeCAD Instance to path
# This has to be the path to your local FreeCAD install, 
# it will be a different path for you,  
# the important thing is to link the 'bin' folder.
sys.path.append("C:/Users/UserName/AppData/Local/FreeCAD 0.18/bin")  

# Import Local Dependencies
import FreeCAD, Part, Mesh
# It is important to note that Part and Mesh are optional dependencies,
# FreeCAD is the main library.

For more information, please check the FreeCAD docs, they are explained extensively.

I’ve tried FreeCAD before, it worked ok but you need server in the back to run it - and I want something on the client side if possible… so I come across this GitHub - MrStronger/webGL-IGES: IGES File Viewer Based on WebGL. This is my graduation project. repo, and used as initial starting point to implement as an iges loader in three.js…

@gg150190 I’ve started working on iges loader for three.js - three.js/webgl_loader_iges.html at 090a92c934e6503442afaafcb20226cdcde15cb9 · alex-marinov/three.js · GitHub

So far I’ve been playing around to understand how all it could work… so far lines, points are ok but needs some tiding up and some more work to make it all nice and efficient code.

I’m relatively new to programming and JavaScript in particular… but I’ll give my best shot to try to make it work :slight_smile:

2 Likes can handle step/iges as well as parameter recalc, constraints and modelling features. but we’re still struggling with wasm. the package itself is fully functional but we need to get it running without relying on a server. it’s almost done and we will publish soon.