Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cartesian-theatrics committed Jan 3, 2025
1 parent 45b5ae2 commit 98002fd
Show file tree
Hide file tree
Showing 23 changed files with 76 additions and 18 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@

# clj-manifold3d

This library provides a Clojure(Script) wrapper over Emmett Lalish's incredible Manifold 3D geometry library. The CLJ implementation is based on JNI bindings to c++ produced via. javacpp: see https://github.com/SovereignShop/manifold. The CLJS implementation is based on emscripten build of Manifold for wasm.
This library provides a Clojure(Script) wrapper over Emmett Lalish's incredible Manifold 3D geometry library. The CLJ implementation is based on JNI bindings to c++ produced via. javacpp: see https://github.com/SovereignShop/manifold.

It implements most of the library functionality, plus extends it to support polyhedrons and lofts. It provides nearly a full superset of OpenSCAD functionality.

Manifold represents a dramatic advance in the state-of-the-art of open-source programmatic CAD. It has been adopted by most major CAD kernels.


# Install

You need include the native [Manifold Bindings](https://github.com/SovereignShop/manifold) for your platform separately. For example:
Expand Down Expand Up @@ -117,12 +114,12 @@ Cross Sections are (roughly) isomorphic to a set of polygons for which vertex or
(require '[clj-manifold3d.core :as m])

(def mesh-material (m/material :roughness 0.0 :metalness 0.0 :color [0.0 0.7 0.7 1]))

(-> (m/hull
(m/circle 5)
(-> (m/square 10 10 true)
(m/translate [30 0])))
(m/extrude 80 70 180 [0.7 0.7])
(m/extrude 10)
(m/get-mesh)
(m/export-mesh "hull2D.glb" :material mesh-material))
```
Expand All @@ -136,7 +133,7 @@ Cross Sections are (roughly) isomorphic to a set of polygons for which vertex or
(-> (m/sphere 4 120)
(m/translate [0 0 20])))
(m/get-mesh)
(m/export-mesh "hull3D.glb"))
(m/export-mesh "hull3D.glb" :material mesh-material))
```

![3D hull](resources/images/3D-hull.png)
Expand Down
4 changes: 2 additions & 2 deletions examples/examples.clj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
(m/circle 5)
(-> (m/square 10 10 true)
(m/translate [30 0])))
(m/extrude 80 70 180 [0.7 0.7])
(m/extrude 10)
(m/get-mesh)
(m/export-mesh "hull2D.glb" :material mesh-material))

Expand All @@ -58,7 +58,7 @@
(-> (m/sphere 4 120)
(m/translate [0 0 20])))
(m/get-mesh)
(m/export-mesh "hull3D.glb"))
(m/export-mesh "hull3D.glb" :material mesh-material))

;; Revolution

Expand Down
79 changes: 70 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">




<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>



<license>



<name>The Apache Software License, Version 2.0</name>



<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>



<distribution>repo</distribution>



<comments>A business-friendly OSS license</comments>



</license>



</licenses>




<modelVersion>4.0.0</modelVersion>



<groupId>org.clojars.cartesiantheatrics</groupId>



<artifactId>clj-manifold3d</artifactId>



<scm>



<url>https://github.com/SovereignShop/clj-manifold3d.git</url>



<connection>scm:git:git://github.com/SovereignShop/clj-manifold3d</connection>



<developerConnection>scm:git:ssh://[email protected]/SovereignShop/clj-manifold3d</developerConnection>



<tag>0.0.8</tag>



</scm>
<version>0.0.16</version>



<version>1.1.1</version>



<dependencies/>



<repositories>
<repository>
<id>clojars</id>
<url>https://repo.clojars.org/</url>
</repository>
</repositories>



</project>
Binary file modified resources/images/colored-manifold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/compose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/cross-section-with-hole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/cross-section.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/extrude.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/get-halfedges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/get-vertices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/hull3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/manifolds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/monomorphic-loft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/polyhedron-cube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/simple-loft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/sine-wave-surface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/single-arity-loft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/slice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/slices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/three-point-arc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/three-point-circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/transform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 98002fd

Please sign in to comment.