Coder Social home page Coder Social logo

solidboredom / constructive Goto Github PK

View Code? Open in Web Editor NEW
53.0 7.0 8.0 2.04 MB

Extends OpenScad Language for complex and complementary mechanical parts with less mathematical code. Offers a "Stamping" approach to quickly create mechanical parts fitting and complementing one another. This is used as a replacement for Constraints known form other CAD systems

License: Other

OpenSCAD 99.76% Shell 0.24%

constructive's Introduction

License

This work is dual-licensed under GPL 2.0 or CERN-OHL-W .

You can choose between one of them if you use this work.

SPDX-License-Identifier: GPL-2.0 OR CERN-OHL-W

Constructive Library:

Extends OpenScad Language for complex and complementary mechanical parts with less mathematical code. Offers a "Stamping" approach to quickly create mechanical parts fitting and complementing one another. This is used as a replacement for Constraints known form other CAD systems Easily create holes from modules and overcome many Openscad's limitiations for complex models using the library's own syntax.

Compiles directly by OpenScad. No other tools needed. Just include the: constructive-compiled.scad in your .scad file, that is all.


screeen

Constructive Library (about 1900 lines of Code) introduces a different approach to OpenScad Syntax: you rarely need difference(), for(),intersection() or their one-to-one equivalents, In the library's own dialect a for() block might look like:

pieces(4) X(every(35)) turnXY (vals(10,25,-15,40)) cube(10);

It is all valid OpenScad, you do not need any additional programs, just the OpenScad and the constructive-compiled.scad file.

The Constuctive-Syntax tries to align more with mechanical construction of parts and less with mathematical concepts like arrays, vectors and functions. (but they are heavily used behind the scenes). So it aims to be more concise and fluent for mechanical parts than vanilla OpenScad. It allows you to make holes from Modules and really good deal more.

NOTE: if you use a development version openscad, please make sure the experimental option "lazy Unions" is tuned off under Settings. This experiment breaks Openscads compatibility and you might encounter problems with this library also.

For a basic introduction (specially if you are new to Openscad ) see the beginners tutorial it explains Constructive Syntax for main Building blocks, like tube(), box() or bentStrip() and their placement and alignment in space like stack() , align(), X(),Y(),Z() or turnXZ()

Part II tutorial shows somee basic object modification like reflectX(), cScale() ,or colors and then goes on to explain, how to work with sets of similar objects without for(), with: pieces(), span(), vals(), selectPieces(), etc..

Part III tutorial shows more advanced Features like grouping commands into a g() group, working with Parts, and combinig them into Assembly

if you have questions you can ask me on the Openscad mailing list: https://lists.openscad.org/list/discuss.lists.openscad.org . Just add: constructive-lib to your subject to make sure i will see it

For a more advanced use also look at the explanations inside the example below

https://github.com/solidboredom/constructive/blob/main/examples/mount-demo.scad

there is also another Example at:

https://github.com/solidboredom/constructive/blob/main/examples/pulley-demo.scad screeen

Note: Here A Gallery where some shiny constructive examples will be added, to show what can be acheived

https://github.com/solidboredom/constructive/blob/main/gallery/

Note: see here the source code ofthe Gallery pieces here: https://github.com/solidboredom/constructive/blob/main/gallery/sources/

how little code is actually needed for this, the code is in part not commented nor cleaned up, but it still can be used for reference


The easiest way to try out the Library is to download the kickstart.zip

Still uncovered are inverse transformations like in:

g(X(10),Y(15),turnXY(45),X(30))

g(backwards([X(10),Y(15),turnXY(45),X(30)])

    box(10);

also part inheritance, part selector prefixes, internal type Ssystem and some more features

Try it! i hope you will find it as useful as i do.

Peter

constructive's People

Contributors

42sol-eu avatar pronvis avatar solidboredom avatar tonowie1 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

constructive's Issues

`chamfer()` changes box dimensions?

box(2) gives a 2x2x2 box as expected (https://rjp.is/stls/nochambox2.stl)

chamfer(0,0,0) box(2) gives a 2x2x2.06 box (https://rjp.is/stls/cham0box2.stl)

chamfer(0, -0.1, -0.1) box(2) gives a 2x2x2.03 box
(https://rjp.is/stls/cham0101box2.stl).

Seems to stabilise at 2.03 as you increase those two values.

Oddly chamfer(-0.1, -0.3, -0.3) box(2) gives an exact 2x2x2 box (https://rjp.is/stls/cham010303.stl) - it seems that if the first value is not 0, you'll get the height you requested (even with a skirt chamfer.)

I can work around this by making my chamfered boxes a little taller than required and clipping them down but is there a way to get a chamfered top-and-sides box with an exact height?

(All measurements via stl_bbox from https://github.com/AllwineDesigns/stl_cmd.git )

Consider dual licencing under CERN-OHL-S?

Hi,

This looks like a really cool project. I get that it is GPL licensed to make it strongly reciprocal. It does make it unclear if it can be used in open hardware projects that are also strongly reciprocal. The main strongly reciprocal open hardware license is the CERN OHL-S (v2).

Would you consider dual licensing for open hardware use?

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.