Code Monkey home page Code Monkey logo

relativity.scad's People

Contributors

aleung avatar davidson16807 avatar player1537 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  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  avatar  avatar  avatar

relativity.scad's Issues

Seeking Active Maintainer [was: "Is this project dead?"]

Sorry if it's inappropriate to create an issue for that, but it's just hurts to see such a great library to have a majority of commits being older than 7 years. OpenSCAD constantly throws warnings at me as I use it, but it steel works. It would be so awesome if someone would continue development.

Suggestion - Orient

I wondered if you could make use of this more generalised version of orient ;)

module orient(a,b) {
    angle=acos((a*b)/(norm(a)*norm(b)));
    rotate(a=angle,v=cross(a,b))
        children();
}

where a and b are vectors.

WARNING: len() parameter could not be converted

include <relativity.scad>
box(50, anchor=[0,0,-1])
align([0,1,0])
orient([0,1,1])
rod(d=50, h=50, anchor=[0,0,-1]);

WARNING: len() parameter could not be converted, in file C:/Users/1/Documents/OpenSCAD/libraries/relativity.scad, line 918
WARNING: len() parameter could not be converted, in file C:/Users/1/Documents/OpenSCAD/libraries/relativity.scad, line 868
WARNING: len() parameter could not be converted, in file C:/Users/1/Documents/OpenSCAD/libraries/relativity.scad, line 887
WARNING: len() parameter could not be converted, in file C:/Users/1/Documents/OpenSCAD/libraries/relativity.scad, line 887

Why???

OpenSCAD version 2019.05

warning when loading strings.scad - even when doing nothing

include <C:\Users\herve\Downloads\openscad-2019.05\libraries\relativity.scad\strings.scad>
cube(10);

Console throw

Parsing design (AST generation)...
Saved backup file: C:/Users/herve/Documents/OpenSCAD/backups/unsaved-backup-FQfmFakr.scad
Compiling design (CSG Tree generation)...
WARNING: Too many unnamed arguments supplied, in file openscad-2019.05/libraries/relativity.scad/strings.scad, line 820
WARNING: Too many unnamed arguments supplied, in file openscad-2019.05/libraries/relativity.scad/strings.scad, line 820
WARNING: Too many unnamed arguments supplied, in file openscad-2019.05/libraries/relativity.scad/strings.scad, line 820
WARNING: Too many unnamed arguments supplied, in file openscad-2019.05/libraries/relativity.scad/strings.scad, line 820
WARNING: Too many unnamed arguments supplied, in file openscad-2019.05/libraries/relativity.scad/strings.scad, line 820
Compiling design (CSG Products generation)...
Geometries in cache: 1
Geometry cache size in bytes: 728
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized CSG tree has 1 elements
Compile and preview finished.
Total rendering time: 0 hours, 0 minutes, 0 seconds

hide() does not work with default geometric primitives (cube, cylinder, sphere)

The "hide()" module does not work with the default geometric primitives (like cube, cylinder, sphere). These are still rendered. Also nearly every other module uses the "hide()" module, so the problem occurs very often!

I have no (good) idea how to fix this. Perhaps a variable only available in relativity.scad-modules that enables the hide()-module to identify non-relativity.scad-children and therefore not rendering the sub-tree? Would this work with single default transformation in between a sub-tree (like a normal translate() or what ever)?

Shape difference between rod and cylinder

    rod([6, 6, 2.25], anchor = [0,0,1], $class = "nut", $fn= 6);
    cylinder(d = 6, h = 2.25, $fn = 6);

if you try to compare this objects you will see that rod is wider and not really even hexagon;
rod([6, 5.2, 2.25], anchor = [0,0,1], $class = "nut", $fn= 6);
cylinder(d = 6, h = 2.25, $fn = 6);
experimantally I found than x/y ratio of 6 to 5.2 makes nearly even hexagon. This result seems to be odd, cause in first case we 6mm between two sides and two verticies. Checking a few nuts and specifications [http://archicad-talk.graphisoft.com/files/filepages_from_16._nuts__bolts__screws_and_washers_559.pdf] see page 1 table 16.1 and page 2 figure 16.1(b), I would expected to see rod([6, 5.5, 2.25]) to be same size as d=6 cylinder, but it was still bigger.

I have to add and rod(... , $fn= 2^n) is fine, It means if u have vertex at +Pi/2 and -Pi/2. otherwise the rod is a bit wider at Y side.

differed does not work

The following code on the wiki does not provide the desired result:

differed("hole")
ball(50)
orient([x,y,z])
rod(d=25, h=55, $class="hole");

I am on osx Sierra (10.12.4), openscad (2017.08.03). Latest version on relativity.scad.

rel1

align() not working

I'm trying basic examples from wiki, like

use <../relativity.scad/relativity.scad>;

box(50, anchor=[0,0,-1])
    align([0,0,1])
    sphere(d=60);

and get this

image

instead of this:

image

from the wiki.

I'm running OpenScad 2015.03 on OS X (10.11.6) and latest commit (6d5cc88) of

https://github.com/davidson16807/relativity.scad

Apologies if I'm missing something obvious.

Syntax issues in file relativity.scad

When starting to use your library, I found a couple of small syntax issues, namely a missing ? and a missing ; in the function _css_select. I have included a diff below, and I'll try to do a pull request if needed (it's only two lines that need to be changed, though). Thanks.

diff --git a/relativity.scad b/relativity.scad
index e114c6a..174e1f9 100644
--- a/relativity.scad
+++ b/relativity.scad
@@ -237,10 +237,11 @@ function _css_select(tag, class, id, selector, index=0) =
        id == after(selector, "#")
    : starts_with(selector, ".") ?
        _has_token(class, after(selector, "."))
-   : starts_with(selector, "*")
+   : starts_with(selector, "*") ?
        id == after(selector, "#") || _has_token(class, after(selector, ".")) || tag == selector
    :
        tag == selector
+   ;

 //echo(_has_all_tokens("foo bar baz", "foo baz"));
 //echo(_has_all_tokens("foo bar baz", "spam baz"));

CSG Operations not working

Hi,

I'm using the 2015.03 release of OpenSCAD and I can't seem to get any of the CSG examples working. I've attached a screenshot to show what's happening.

screen shot 2016-09-06 at 15 58 52

Is there anything that I'm doing wrong?

Thanks

Wiki

In the table describing the selectors the last selector seams to be at least a copy-paste error, because it contains ".png" (simply search for "(parent child),B grandchild.png" in the wiki).

By the way, great work with the lib!

But I need more documentation, I just reached the end :D. And for example the "orient" module seams to be able to use lists of vectors (see "orient([x,y,z])" in the examples), but this isn't documented under the orient section.

Suggestion - Break out demos into separate repo for faster cloning

For small projects where your library is a submodule, it would be convenient to just clone what's required for the thing to work and skip the 40MBs of .STLs in the body demo, for instance.

I don't know enough about git, but maybe there's a way people could clone progressively, first shallow then complete... The idea is to help people bootstrap quicker and always with the latest code. Open to suggestions!

question - aligning tops?

I'm trying to align tops for box and a sphere. Anchor seems has no effect at all. How do I do that?

include <relativity.scad/relativity.scad>;
//
//%box(50, anchor=[0,0,-1])
// color("red") translate([0, 0, -30]) {
// align([0,0,1])
// %%sphere(d=60);
// }

%box(50, anchor=[0,0,-1])
color("red") 
  align([0,0,1])
%%sphere(d=60, anchor=[0,0,1]);  

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.