this post was submitted on 19 Jul 2023
13 points (100.0% liked)

3DPrinting

15237 readers
87 users here now

3DPrinting is a place where makers of all skill levels and walks of life can learn about and discuss 3D printing and development of 3D printed parts and devices.

The r/functionalprint community is now located at: [email protected] or [email protected]

There are CAD communities available at: [email protected] or [email protected]

Rules

If you need an easy way to host pictures, https://catbox.moe may be an option. Be ethical about what you post and donate if you are able or use this a lot. It is just an individual hosting content, not a company. The image embedding syntax for Lemmy is ![](URL)

Moderation policy: Light, mostly invisible

founded 1 year ago
MODERATORS
13
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/3dprinting
 

I wrote a library for creating 3D models in PHP, it uses OpenScad in the background.

Why? From the README:

  1. PHP is full-blown general-purpose language with a lot of documentation around the internet
  2. There are full-blown IDEs that help with code completion
  3. PHP supports more paradigms, like object oriented programming
  4. Saner parameter names - for example the cylinder signature is cylinder(h, r, r1, r2, d, d1, d2, center) compared to PhpScad version - new Cylinder(height, radius, bottomRadius, topRadius, diameter, bottomDiameter, topDiameter)
    • note that in both OpenSCAD and PhpScad version many of the parameters are optional
  5. Created an interesting parametric shape? Cool, share it via composer because PHP has a package manager!

And here are links to two tutorials I wrote:

This might not be to everyone tastes, but if you already know PHP, it might make it a little easier.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

This is pretty cool! Thanks!