Quantcast

Re: Help with two problems with SCAD

classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
I have found out that when renaming File to an existing name,
file is replaced but date of file remain same old date.
Next of late some programs cause SCAD to turn white screen
and whatever I do it is "Not Responding" all day long.
Is it W10 or my program?
I downloaded Newest Version of OPEN SCAD, but things turned from BAD to WORSE.
Program Attached!
Thanks in Advance, Marijan Pollak

On Wed, May 10, 2017 at 6:58 PM, Marijan Pollak <[hidden email]> wrote:
I have found out that when renaming File to an existing name,
file is replaced but date of file remain same old date.
Next of late some programs cause SCAD to turn white screen
and whatever I do it is "Not Responding" all day long.
Is it W10 or my program?
I downloaded Newest Version of OPEN SCAD, but things turned from BAD to WORSE.
Program Attached!
Thanks in Advance, Marijan Pollak
--
Regards from Croatia, the Homeland of one of greatest inventors from 19th and 20th Centuries, Engineer Nikola Tesla!



--
Regards from Croatia, the Homeland of one of greatest inventors from 19th and 20th Centuries, Engineer Nikola Tesla!

TangTurbineRoundBottomShortNewJetZI.scad (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
Confirmed this causes OpenSCAD to go into a CPU loop after preview results show in console, presumable then when painting the page.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
In reply to this post by Marijan Pollak
I believe it's because of all the vertices lining up in the center.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
If you get rid of the difference here

 // rotate([0, 270, 0]) {
      difference (){  
            union(){
            //difference()     // <---------
              {  
      // Cutting 120 Degrees of Circle, Screw Holes  from

it solves the immediate problem.
I think this has been seen before.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
While OpenSCAD should not go rouge when this happens, the problem is that all the objects in the two unions have coincident faces at [0,0], the tangent faces of the various circular objects (possibly elsewhere), so in preview CSG, the difference can't tell whether particular faces should be there or not.

F6 Render works, the results are non-manifold, which also points to other coincident faces and possibly other issues. This is the result, those are holes you can see inside what should be solid.


This is netfabb, those yellow lines are holes, so there are problems there too.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

kintel
Administrator
In reply to this post by MichaelAtOz

> On May 10, 2017, at 17:20, MichaelAtOz <[hidden email]> wrote:
>
> Confirmed this causes OpenSCAD to go into a CPU loop after preview results
> show in console, presumable then when painting the page.
>
I think I’m missing some info. If anyone feels like opening a github issue that would be helpful!
 
-Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
Ahh, I knew I'd seen this before.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
Well, similar, but not the same...
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
In reply to this post by Marijan Pollak
Marijan Pollak wrote
I have found out that when renaming File to an existing name,
file is replaced but date of file remain same old date.
Do you mean, using OpenSCAD to save a file named the same as an existing file, ie replacing the old file by Save?
Is it W10 or my program?
I downloaded Newest Version of OPEN SCAD, but things turned from BAD to
WORSE.
What was the version originally, and which  new version?
Could you also post the Help/Library info data.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
Note that it is not hung, OpenCSG just takes a very very long time to repaint the window.
If you hover the mouse over the View menu, when it is done, the menu (ie the :View:) is highlighted, you can then press Alt-V, then one of the different view, it then takes a very very long time again.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

MichaelAtOz
Administrator
If you stick render() before each union in the difference it works, highlights lots of coincident faces. (takes a while to preview the first time)

  difference (){  
    union(){
      difference()
      {  
        // Cutting 120 Degrees of Circle, Screw Holes  from
        render()
          union(){  
...
        }  // End of Union of first group for Difference
       render()
         union(){          
...
        }  // End of Union of Cuting elements
      }  // End of Difference for Paddle making
    } // End of Union of everything
    // Note NO difference
  } // End of Difference
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
In reply to this post by MichaelAtOz
I have dine that this morning by myself, no changes in problem, Object is intentionaly hollowand cavitied serve special mpurpose, Just latr Differencewere usung object with heavy thicknessand not positioned right so it cut trough center instead at offset from center.  
It is new Wind turbine composed of conical walls and vertical  ones. After half day of rendering it is more normal looking but is I touch anythinmg it wipes screen and is non responding again. It should be centered on 0,0,0 as it is circular and multy symetrical. it is as should be but I cannot see it except as overlarge, so only part of surface fir the screen.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
In reply to this post by MichaelAtOz
      render()  Helped, at least it is not "not respondimg"........
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Parkinbot
In reply to this post by Marijan Pollak
Your code is very crude and seems to create and use a bunch of empty differences. No wonder that it does not behave very well.

Just one example out of many: Look at the call

makeMantle (he=th, ro=tr+1, ri=tr, mccr=ccr);
It is not properly defaulted (which is bad style) and it F6-renders into a non-valid 2-manifold. No way to head on already at this point ...

Some hints:
- If you compose a design from multiple components, every component has to be a valid 2 manifold, otherwise you are in trouble.
- When debugging a component, try to successfully render each of its components first. Do this in a bottom-up fashion.
- If you don't see what you expect, omit Boolean operations first by commenting them out. To "find" a component within a composed object mark it with #.
- use well chosen default values to ease testing and simplify calls as much as possible.

- Reduce complexity (and increase readability) as much as possible, by:
1. poperly indenting your code with aligned brackets and bodies;

2. omitting (tons of) superfluous curly bracket pairs for operators like translate() rotate() and for() that have only a single operand. E.g. it is perfectly ok to stack something like: scale(A) linear_extrude(B) for(i=C) rotate(D) translate(E) myModule(...);  without putting a single curly bracket pair.

3. omitting explicit unions, where OpenSCAD puts implicit unions. This is essentially almost everywhere possible. An exception would be a boolean expression like difference() where the first (!) operand is explicitly composed by the union of several objects or an intersection with such an operand. Operators like translate(), scale() rotate(), for() use an implict union, if they operate over a list of operands. See also the difference between intersection() and intersection_for().

Good code is: readable and well structured into meaningful modules, submodules and functions. Each chunk of code should be designed in a way, so that can be easily tested on its own. It omits lengthy and crude sequences of badly organized and wildly transformed components. If you want to keep control over code, try to keep the body of any module as small as possible and test it and its parameter range properly before you use it as component in a larger context. Otherwise it will start to play with you and you will spend 99% of your time with debugging.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
Thanks for lecture. Unfortunately I do not understand You entirely. First English is not my Native Language, and second this is progran in works, I am adding and commenting out lot of things while testing results. How would I know module is properly defaulted? Whsat is "valid 2 manifold"? I am usualy making indentatiions, and when program finally work I clean up and make order, and Differences it seems empty to You are actually necesary and not empty. Maybe when I would use  SCAD longer, I would find some shortcuts. but I reason that putting curly brackets cannot make code less readable. What I try to achieve are thin conical walls joined together on top, to be strong and light, and I think 3D printer can print it, if it would do exactly what I programmed it for.  As there is no function to make pipe of desired diameter  I am making it by making difference from two cylinders, but i need only parts of this pipe of certain number of degrees and that is also not easy to do, so I am forced to improvise, and do best I can. Global variables do not exist in SCAD so Modules do not see what is not explicitely passed as parameter, and that goes double for modules called from other modules, as they have to be nested and defined within module that call them
what means same module cannot be called in another that can use itif I understood some rules I have to find hard way.
This not easy for me because I am from another time and carry legacy of 26+ programming languages some in several generations add on different Platforms and from different Vendors on same Platform.
But in ganeral I find SCAD usefull for my work as Inventor, and I have done lot for few months I am using it. I am asking for help only when I cannot finf solution by my own efforts.
right now next problem I am facing is to construct machine that use lot of pipes  that must be positioned precosely and have bends thar are half circular, and my method of creating pipes from difference of two cilinders is good only for straight pipes. if anyone know function to create such pipes, please tell me where to find it. 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
Actualy it is not that simple:








i have made this by hand from just ONE piece of pipe, it would be much better 3D printed.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

cacb
In reply to this post by Marijan Pollak
On 13. mai 2017 02:21, Marijan Pollak wrote:
> right now next problem I am facing is to construct machine that use lot of
> pipes  that must be positioned precosely and have bends thar are half
> circular, and my method of creating pipes from difference of two cilinders
> is good only for straight pipes. if anyone know function to create such
> pipes, please tell me where to find it.
> <http://forum.openscad.org/file/n21446/PerpetumMobiusDupliIstostraniPomaknutProziran.jpg>

So basically you have 2 closed pipe loops consisting of straight and
circular segments, and the 2 loops are independent of each other (not
connected to each other) and rotated 45 degrees relative. Is that right?

I tried to open the OpenSCAD file of your original post, but it didn't
look anything like the photo above. To get any further I think it would
be a good idea to clarify whether the above photo is indeed what you
want to create.

Parts of your hand made thing below seems to be in loose agreement with
the above photo, but the details are unclear.
http://forum.openscad.org/file/n21447/Photo-0001.jpg

I have no idea if this thing would do anything meaningful, it just seems
like a few bent pipes with no entrance/exit, but it should be possible
to model if the top photo is representative.

So is it the "PerpetumMobiusDupliIstostraniPomaknutProziran.jpg" layout
as shown you are attempting to recreate, with the dimensions from the
.scad file in your original post?

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
In reply to this post by MichaelAtOz
Hi, I must correct You, there is no overlaping FACES, just overlaping EDGES, as conical and vertical walls are joined on top. that creates walls that have no external faces as verticall walls are inside between two conical walls. I do not see why this shouls be preblem as every wallis created separatelly and joined to others with union () while each wall is difference betveen two cylinders or two conuses. So if each is rendered and then joined together as it is written all should be as intended to be.
I followed adwice to remove as many curly brackets and use implied unions, asnd found that object wihin for loop are not impilcitely part of union in fact thex are not created at all if union doed not precede for loops and have curly brackets.
I tried to simplifa program cut results are still slower rendering with both f5 ans f6 use.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

Marijan Pollak
In reply to this post by cacb
Well sory for confusion. This is not strictly related to first example and first picture is simplified version  to show what I need while photo is of actual machine built by hand that has to be made precisely an symetrically drawn in SCAD, and which is more complicated specially as it is made from one piece of hose. There could be two or more systems turned certain numbers of dehrees in relatiom to one another.It is Gravity motor, but I did not asked for help with that, only in creating round pipes or cylinders which I can made difference from cylindrical plate to get pipes inside. I intend to put it in bottom  of turbine in first example, or any of my hawt turbines so they would turn even without wind.  
I got example of "Macaroni Maker" exanple wihich I have to study jet, but as I ecplained I would prefer that to be cylinders instead of pipes so I can hide system from ones who does not believe such things is possible, and also because Patent Office would Label it Perpetum Mobile and that is forbidden for patenting.
Thank You  in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with two problems with SCAD

cacb
On 14. mai 2017 16:26, Marijan Pollak wrote:
> It is Gravity motor, but I did not
> asked for help with that, only in creating round pipes or cylinders which I
> can made difference from cylindrical plate to get pipes inside.

I would recommend something like below for creating pipes, instead of
subtracting cylinders. This avoids the problem that the inner cylinder
has to extend at both ends, to avoid numerical problems:


$fn=30;
module StraightPipe(ro=10, th=1, l=100)
{
    linear_extrude(l)
    difference() { circle(ro); circle(ro-th); }
}

module CurvedPipe(ro=10, th=1, radius=100, angle=60)
{
    rotate([90,0,0])
    translate([-radius,0,0])
    rotate_extrude(angle=angle,$fn=60)
    translate([radius,0,0])
    difference() { circle(ro); circle(ro-th); }
}


translate([-50,0,0]) CurvedPipe();
translate([+50,0,0]) StraightPipe();

----

The angle parameter in rotate_extrude requires a recent version of OpenSCAD.

Btw. the "PerpetumMobius" photo or the model you made with hoses imply
non-planar bent pipes. That isn't possible with rotate_extrude in OpenSCAD.


Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Untitled.png (20K) Download Attachment
12
Loading...