PHP Library for AutoCAD DXF Files Reading & Writing
OpenCascade.js library is used in many industries and has been widely adopted for its accuracy, stability, and performance. Another key feature of OpenCascade.js is its ability to work with a wide range of file formats, including STL, IGES, and STEP. This allows developers to easily import 3D objects from other CAD programs or data sources and manipulate them within the library. The library also provides a variety of tools for creating and editing 3D objects, including the ability to create complex shapes, curves, and surfaces, as well as perform geometric transformations, such as scaling, rotating, and translating.
OpenCascade.js library supports visualizing 3D objects in real-time and provides a rich set of features for 3D object rendering, lighting, and shading, making it possible to create highly realistic and interactive 3D environments. The library is very well-documented, enabling software professionals to get started and quickly build complex and sophisticated 3D applications. Overall, the library provides a comprehensive set of tools and functions to design, build, and visualize 3D objects, making it an ideal choice for a wide range of applications, including product design, manufacturing, architecture, and construction.
At A Glance
An overview of OpenCascade.js features.
- Export GLB file
- Read GLB file
- Create GLB file
- Rotate Image
- Add colors
- Triangulate document
OpenCascade.js only requires Java runtime.
- JDK 1.6 & higher
Getting Started with OpenCascade.js
The recommended way to install is using npm. Please use the following command a smooth installation.
Install OpenCascade.js via npm
npm install opencascade.js@beta
You can also install it manually; download the latest release files directly from GitHub repository.
const wire = new BRepBuilderAPI_MakeWire(); wire.Add(new BRepBuilderAPI_MakeEdge(new gp_Pnt(0, 0, 0), new gp_Pnt(1, 0, 0))); wire.Add(new BRepBuilderAPI_MakeEdge(new gp_Pnt(1, 0, 0), new gp_Pnt(1, 1, 0))); wire.Add(new BRepBuilderAPI_MakeEdge(new gp_Pnt(1, 1, 0), new gp_Pnt(0, 1, 0))); wire.Add(new BRepBuilderAPI_MakeEdge(new gp_Pnt(0, 1, 0), new gp_Pnt(0, 0, 0))); create 3D shape: onst face = new BRepBuilderAPI_MakeFace(wire.Wire()); // Offset the 2D shape: const offset = new BRepOffsetAPI_MakeOffset(face.Face(), 1, 1e-6); offset.Build(); // Offset the 3D shape: const solid = new BRepBuilderAPI_MakeSolid(offset.Shape()); solid.Build();