Skip to content

Volume is not calculated #32

@tjasa-karas

Description

@tjasa-karas

Hello,
i have noticed that the get_info function returns a null value. i believe that there is a problem with one of the libraries.
this is the code i've used to try and acess the volume and other info using the get_model_info() method.

<title>Viewstl Javascript Plugin - Simple Example</title>
<body>
    <div id="stl_cont" style="width:500px;height:500px;margin:0 auto;"></div>

    <script src="stl_viewer.min.js"></script> 
    <script src="parser.min.js"></script>
    <script src="three.min.js"></script>
    <script src="CanvasRenderer.js"></script>
    <script src="OrbitControls.js"></script>
    <script src="Projector.js"></script> 
    <script src="webgl_detector.js"></script>
    <script src="TrackballControls.js"></script>

    <script>
        var stl_viewer=new StlViewer
        (
            document.getElementById("stl_cont"),
        );
        stl_viewer.add_model({id:0, filename:"mystl.stl"});
        
        alert( JSON.stringify(stl_viewer.get_model_info(0)) );
        
    </script>

</body>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions