wall with window in 3D

classic Classic list List threaded Threaded
3 messages Options
uka
Reply | Threaded
Open this post in threaded view
|

wall with window in 3D

uka
This post has NOT been accepted by the mailing list yet.
Hi Experts !

Although I'm new to OpenSCAD, I like it very^3 much !!

At the moment I'm modelling a house and an balkony attached.

The only problem I couldn't solve so far is the indentation of
windows into the walls...  
May be I made an error at the 'difference'-statement?


With thanks in advance & best regards, Uli



// x-Richtung:  von West nach Ost
// y-Richtung:  von Sued nach Nord
// z-Richtung:  von unten nach oben

// NullNiveau für z ist die Oberkante der Betonkellerdecke.
// Null für x und y ist die SüdOstEcke des Hauses

// Definition of colors for this project
red = [ 1.0, 0.0, 0.0 ];
white = [ 1.0, 1.0, 1.0 ];
green = [ 0.0, 1.0, 0.0 ];
light_green= [0.5,1.0, 0.5];
black = [ 0.0, 0.0, 0.0 ];
grey9 = [ 0.9, 0.9, 0.9 ];
grey8 = [ 0.8, 0.8, 0.8 ];
grey5 = [ 0.5, 0.5, 0.5 ];


// !!!!!!!!!!!!!!  Alle Maße in Metern !!!!!!!!!!!!!



module haus5()
{
        x_haus = 13.00;
        y_haus = 10.00;

        // Origin Marker
        color(black)
                  cube( 0.10,  center=true );


        // Keller
        h_keller = 2.40;
        z_kf = -1.40;
        x_keller = -13.00;
        y_keller = 0.0;
        z_keller = -h_keller;

        difference()
        {
                translate([x_keller,  y_keller, z_keller])
                color( light_green )
  cube([x_haus, y_haus, h_keller]);
                // hole for 1. window
                translate([-3.10, -0.01, z_kf])
  %cube([1.00, 0.12, 0.80]);
        }

        // Kellerfenster
        //  1. window
        translate([-3.10,  0.10, z_kf])
                color( red )
  cube([1.00, 0.10, 0.80]);
        //  2. window
        translate([-5.60,  0.0, z_kf])
                color(white)
  cube([1.00, 0.10, 0.80]);


        // Kellerdecke
        translate([-13.00,  0, -0.20])
                color( green )
  cube([x_haus, y_haus, 0.20]);
        // Fundamentplatte
        translate([-13.20,  -0.20, -2.60])
                color( green )
  cube([x_haus+0.40, y_haus+0.40, 0.20]);

}// haus5


haus5();


Reply | Threaded
Open this post in threaded view
|

Re: wall with window in 3D

kitwallace
I think the cutout for the window isn't deep enough for the offset window -

I replaced
  %cube([1.00, 0.12, 0.80]);
with
      cube([1.00, 0.3, 0.80]);

uka
Reply | Threaded
Open this post in threaded view
|

Re: wall with window in 3D

uka
This post has NOT been accepted by the mailing list yet.
Hi Kit !

Thanks a lot for your help !

This works ok now !


However, I found out why the problem was so strange for me:

The problem is still there on my old PC with OpenGL 1.1.0 and OpenSCAD 2011.06 ...

And the window in the wall looks fine with another PC and OpenSCAD version 2015.03 !

Have nice holidays, best regards, Uli