-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples throw error, don't seem to import in Three.js #119
Comments
Did you install the Modia package as well? Please see installation guide. Which Julia version do you use? Visualization with Three.js: Since the example fails with an error you don't get a reasonable visualization. |
At the moment animation export is broken because the object names in three.js have been changed (e.g. "SphereBufferGeometry" -> "SphereGeometry"). A fix is implemented but not yet published. |
Thanks for the help! Indeed I needed Modia to drop the error when simulating, I had poorly assumed Modia3D would bring Modia with it. I searched for "Buffer" in my .json file for the animation. I found only one instance of a CylinderBufferGeometry. Changing that to CylinderGeometry and importing the .json file to Three.js worked great. "geometries": [ |
I recently tried to run the examples in Modia3D. I only installed the package and tried to run each of the examples in the tutorial such as:
include("$(Modia3D.path)/test/Tutorial/Pendulum1.jl")
This throws the following error:
julia> include("$(Modia3D.path)/test/Tutorial/Pendulum1.jl")
Instantiating model Pendulum
in module: Main.Pendulum1
in file: C:\Users\jonda.julia\packages\Modia3D\il61O\test\Tutorial\Pendulum1.jl:11
ERROR:
solution = simulate!(Pendulum, ...) failed with solution.retcode = :Success at time = 3.0.
Stacktrace:
[1] error(::String, ::String, ::String)
@ Base .\error.jl:44
[2] macro expansion
@ C:\Users\jonda.julia\packages\Modia\TXKQS\src\SimulateAndPlot.jl:246 [inlined]
[3] macro expansion
@ C:\Users\jonda.julia\packages\TimerOutputs\LHjFw\src\TimerOutput.jl:237 [inlined]
[4] simulate!(m::Modia.SimulationModel{Float64, Float64}, algorithm::Missing; merge::Nothing, kwargs::Base.Pairs{Symbol, Float64, Tuple{Symbol},
NamedTuple{(:stopTime,), Tuple{Float64}}})
@ Modia C:\Users\jonda.julia\packages\Modia\TXKQS\src\SimulateAndPlot.jl:235
[5] top-level scope
@ C:\Users\jonda.julia\packages\Modia3D\il61O\test\Tutorial\Pendulum1.jl:12
Same error for each of the examples in the tutorial. It does produce the .json files and there appears to be data inside of them. However, if I try to import them into Three.js, nothing happens. The rendered scene just stays empty.
The text was updated successfully, but these errors were encountered: