npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sohale/implisolid

v0.0.1

Published

A Solid Modelling Kernel in Javascript based on Implicit Surfaces, for MP5 file format

Downloads

12

Readme

ImpliSolid

ImpliSolid is a Solid Modelling library/engine based on Implicit Surfaces modelling (aka F-REP).

ImpliSolid uses academic research such as the polygonization algorithm published by Ohtake & Belyaev.

ImpliSolid uses very efficient vectorised calculations to provide instant polygonisation of Implicit Surfaces on your browser.

Currently two open-source projects that use this library:

Architecture

The Library has three levels, each with a separate API. The final version will have 5 levels. Levels 1 and 2 are independent of ThreeJS, hence can be used in NodeJS or as a WebWorker. Only the Highest level API (level 3) uses Three.JS (For example see: mcc2_3js_r79.js ).

Implemenation

ImpliSolid is implemented for JavaSCript, C++, Python.

JavaScript

The JS part can run on Browser, or NodeJS, or as a Web Worker.

Implisolid was originally intended for use in Browsers without need to any serverside.

ImpliSolid will soon be available in WebAssembly (tutorial comming soon).

The npm is available from here (will be moved).

C++

ImpliSolid is written in C++.

The C++ implementation can be used standalone for modern C++ compilers such as g++. It is compiled into JavaScript using Emscripten.

Python

Two Python implementations are already available:

  1. As a native Python implementation
  2. As a Python binding.

##Available targets List of platforms with scripts (to install and compile):

  • JavaScript (asm.js, on browser)
  • JavaScript npm.
  • JavaScript, WebWorker version
  • WebAssembly (comming soon)
  • JavaScript (browser) using Docker
  • Python binding (recommended)
  • Python native (installs dependencies such as VTK)
  • Clang/LLVM
  • Native C++: g++

#Tutorials:

Deployment on web server:

This document describes how to set up your installation so that you can work on the solid modeler projects.

Specifically, instructions for installing MP5/WeDesign Solid Modeler on web server:

Table of Contents


Prerequisites

Basic requirements:

  • A Linux distribution of your choice (everything can work on an other os but these tutorials will focus on linux)
  • Git
  • Bash
  • NodeJS
  • A text editor
  • C++ compiler (g++ is a good choice and is often preinstalled)

Installation and proper configuration of those software is out of the scope of this document. Please refer to their documentation.


File organisation

As of today there are three main folders to this project :

  • Clean_code contains a for now frozen implementation of the Dual/Primal Mesh Optimization algorithme for Polygonized Implicit Surfaces. You can learn more about this algorithme here : http://www.hyperfun.org/SM02ob.pdf. It is the main output of the solid modeler project.
  • implicit contains still worked on python scripts related to the project. A big part of this file has been transfered to clean_code.
  • js_iteration_1 contains the c++ implementation of the projet, as well as its transcription to javascript and html.

Python

In order to work on and execute the python scripts you may need to install the following libraries :

  • apdb : the debugging process is made easier
  • vtk : It is mainly used to compute a marching cube mesh, the first step of the main algorithm described above. You may want to follow this tutorial to install vtk : http://www.vtk.org/Wiki/VTK/Building/Linux.
  • numpy : mathematical functions
  • traits
  • mayavi : display. This tutorial can help you install mayavi and traits and check wether your installation was succesfull : http://docs.enthought.com/mayavi/mayavi/installation.html

For most of those libraries, a simple sudo apt-get install python-LibraryName will do the trick. If not you may want to try the easy_install command or the use of pip.


C++ to javascript

In this part of the project, Emscripten is used to convert c++ code into javascript code that is later used in html.

Boost

For the c++ code, we use the Boost library. It does not need to be built but still need to be installed. You can follow this tutorial to do so : http://www.boost.org/doc/libs/1_57_0/more/getting_started/unix-variants.html.

Emscripten

The installation of Emscripten often proves a little trickier than the other installations. Here are two tutorials you should follow in the order proposed : https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#platform-notes-installation-instructions-portable-sdk http://kripken.github.io/emscripten-site/docs/building_from_source/building_fastcomp_manually_from_source.html#building-fastcomp-from-source.

How to compile

The combined use of the Boost library and Emscripten makes compiling a little bit different. For this, we have created the mc_name.sh files. For exemple, I use the mc_marc.sh file to compile a c++ file into a js file (that is later called in the html file you will simply need to launch in your browser). In this mc_name.sh file you'll only find on uncommented line : it is used to compile your c++ file and goes like this : ~/FolderComtainingYourEmsdk_PortableFolder/emsdk_portable/emscripten/master/em++ -I /LocationOfYourBoostInstalation/boost_1_57_0/ -s EXPORTED_FUNCTIONS="['_make_object', '_main']" -s NO_EXIT_RUNTIME=1 -s ASSERTIONS=1 -pedantic -std=c++14 mc2_sol.cpp -o mc2_sol.cpp.js. In this exemple you'll compile the file mc2_sol.cpp into mc2_sol.cpp.js exporting its important functions (make_object and main).


Compiling C++ to javascript using Docker

You can use a pre installed docker container to compile implisolid: docker run -v /Users/Tiger/Documents/mp5-private/implisolid:/src -t mp51/solidmodel /bin/bash /src/js_iteration_1/build_mcc2_docker.sh -o