Git Product home page Git Product logo

functionalopenscad's People

Contributors

thehans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

functionalopenscad's Issues

text() is unaccounted for

text() is not in the list of implemented functions, and not in the list of not-yet-implemented. I hope it's not forgotten.

It doesn't seem to be impossible to implement, with some custom fonts. Here's an example: https://www.thingiverse.com/thing:16193

I have an actual use case for it: Concatenating text, where each text has a different font size.

Sum breaks the addition overload.

The way that sum is written here, it explicitly involves numbers, but in OpenSCAD, + works on other kinds of things. Not explicitly involving 0 can save that for summation.

Consider this example:

function vsum(v,i=0) = len(v)-1 > i ? v[i] + vsum(v, i+1) : v[i];

echo(vsum([1,2,3]));

echo(vsum([[1,2,3],[4,5,6]]));

echo(sum([1,2,3]));

echo(sum([[1,2,3],[4,5,6]]));

How About Signed Volume

I'm not sure what your stylistic sensibilities are, but there's a 'shoelace formula' for volume that seems like it would fight right in here:

function signed_volume(poly)=
   sum([ for(i=[0:len(poly[1])]
      _signed_volume(poly[0],poly[1][i])
   ])
;

function _signed_volume(points,face)=
   let( l=len(face) )
   (l>2)?
      sum([
         for(i=[1:l-2]) 
         cross(points[face[i]]-points[face[0]],points[face[i+1]]-points[face[i]])
   ])*points[face[0]]/6;
   :
      0
;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.