discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

Conversion of .scad to .stl results in Blank output

U
user35b@gmail.com
Thu, Jan 6, 2022 3:00 PM

Please help. I cannot convert the above Openscad code to STL. On trying it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't know how to fix it. The keyboard dimension (top of source code) is the actual length for the artefact.

Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here - https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey";          // Override any global defaults here if required, see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad>  // Includes all the vitamins and utilities in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module that makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

//    translate([5,9,-2])

difference(){

    square(24, center = true);

    square(23.5, center = true);

}//close of inner difference

    

    }//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, center = true, twist = 0)polygon(points = triangle_points, paths = triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0, 90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate(\[0,0,-5\])bottom();

}

/\*

intersection(){

    translate(\[10,6,1\]){scale(0.5,0.5,0.5){

//        difference(){

//        sphere(8);

//    translate([0,10,0])sphere(8);

//    translate([0,-10,0])sphere(8);

//    }

        translate(\[0, 2, 0\])rotate(\[90,0,0\])cylinder(r = 1, h = 9, center = true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

        translate(\[0, -2, 0\])rotate(\[90,0,0\])cylinder(r = 1, h = 7, center = true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.

Please help. I cannot convert the above Openscad code to STL. On trying it, I received the above blank page with the notice/warning below it. I read somewhere that it might be owing to the % I used, yet I don't know how to fix it. The keyboard dimension (top of source code) is the actual length for the artefact. Here is the code in editable form - <https://pastebin.mozilla.org/wjo2V2xj> Entire code and grahics can be downloaded from here - <https://file.pizza/download/gt0tfawi> Main code here: \[code\] //Comment line 52 to hide the PSU //Keyboard dimension: 14.1” x 7.79” x 1.49” //! Project description in Markdown format before the first include. $pp1_colour = "grey"; // Override any global defaults here if required, see NopSCADlib/global_defs.scad. include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities in NopSCADlib but not the printed parts. include <NopSCADlib/vitamins/d_connector.scad> include <NopSCADlib/vitamins/psus.scad> //Custom files; may not be needed now //include <bottom.scad> //! Assembly instructions in Markdown format in front of each module that makes an assembly. module main_assembly() assembly("main") { difference(){ linear_extrude(height = 15){ // translate(\[5,9,-2\]) difference(){ square(24, center = true); square(23.5, center = true); }//close of inner difference }//close of linear extrude translate(\[8, 0, 13\])rotate(\[0, 90, 0\])cube(\[11, 24, 18\], center = true); // polygon(points=\[\[0,0\],\[10,0\],\[0,10\],\[1,1\],\[8,1\],\[1,8\]\], paths=\[\[0,1,2\],\[3,4,5\]\],convexity=10); // // triangle_points =\[\[0,0\],\[10,0\],\[0,10\],\[1,1\],\[8,1\],\[1,8\]\]; // triangle_paths =\[\[0,1,2\],\[3,4,5\]\]; //translate(\[-10, 0, 7\]) rotate(\[90, 0, 0\]) linear_extrude(height = 24, center = true) polygon(triangle_points,triangle_paths,1); b = 10; h = 10; w = 24; triangle_points = \[\[0,0\],\[h,0\],\[0,b\]\]; triangle_paths = \[\[0,1,2\]\]; //Start with an extruded triangle translate(\[0, 0, 16\]) rotate(\[90, 90, 180\])linear_extrude(height = w, center = true, twist = 0)polygon(points = triangle_points, paths = triangle_paths, convexity = 10); }//close of difference //scale(\[0.2,0.2,0.2\])d_plug(DCONN9); //Comment next line to hide the PSU translate(\[-9, -7.7, 0\]) rotate(\[0, 0, 90\])scale(\[0.05,0.05,0.05\])psu(PD_150_12); }//close of assembly ("main") if($preview){ main_assembly(); translate(\[0,0,-5\])bottom(); } /\* intersection(){ translate(\[10,6,1\]){scale(0.5,0.5,0.5){ // difference(){ // sphere(8); // translate(\[0,10,0\])sphere(8); // translate(\[0,-10,0\])sphere(8); // } translate(\[0, 2, 0\])rotate(\[90,0,0\])cylinder(r = 1, h = 9, center = true); } }//close of intersection } //updating via http-svn translate(\[10,36,1\]){ } translate(\[0, -2, 0\])rotate(\[90,0,0\])cylinder(r = 1, h = 7, center = true); \*/ \[/code\] Error image, desired output and code screenshots are attached. Kindly assist. Thanks in advance.
NH
nop head
Thu, Jan 6, 2022 4:27 PM

Line 60 is if($preview), so it only generates an assembly view with F5 and
nothing with F6.

Your main_assembly() has geometry in it, which is not how NopSCADlib works.
You put geometry in modules that make STLs and include those modules in
your assembly view. Then you normally export the STLs using the Python
framework but you could
add an else clause to the if($preview) to call one of your STL making
modules.

On Thu, 6 Jan 2022 at 15:19, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't know
how to fix it. The keyboard dimension (top of source code) is the actual
length for the artefact.

Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module that
makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Line 60 is if($preview), so it only generates an assembly view with F5 and nothing with F6. Your main_assembly() has geometry in it, which is not how NopSCADlib works. You put geometry in modules that make STLs and include those modules in your assembly view. Then you normally export the STLs using the Python framework but you could add an else clause to the if($preview) to call one of your STL making modules. On Thu, 6 Jan 2022 at 15:19, <user35b@gmail.com> wrote: > Please help. I cannot convert the above Openscad code to STL. On trying > it, I received the above blank page with the notice/warning below it. > > > > I read somewhere that it might be owing to the % I used, yet I don't know > how to fix it. The keyboard dimension (top of source code) is the actual > length for the artefact. > > Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj > > Entire code and grahics can be downloaded from here - > https://file.pizza/download/gt0tfawi > > Main code here: > > [code] > > //Comment line 52 to hide the PSU > > //Keyboard dimension: 14.1” x 7.79” x 1.49” > > //! Project description in Markdown format before the first include. > > $pp1_colour = "grey"; // Override any global defaults here if required, > see NopSCADlib/global_defs.scad. > > include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities > in NopSCADlib but not the printed parts. > > include <NopSCADlib/vitamins/d_connector.scad> > > include <NopSCADlib/vitamins/psus.scad> > > //Custom files; may not be needed now > > //include <bottom.scad> > > //! Assembly instructions in Markdown format in front of each module that > makes an assembly. > > module main_assembly() > > assembly("main") { > > difference(){ > > linear_extrude(height = 15){ > > // translate([5,9,-2]) > > difference(){ > > square(24, center = true); > > square(23.5, center = true); > > }//close of inner difference > > }//close of linear extrude > > translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); > > // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], > paths=[[0,1,2],[3,4,5]],convexity=10); > > // > > // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; > > // triangle_paths =[[0,1,2],[3,4,5]]; > > //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, > center = true) polygon(triangle_points,triangle_paths,1); > > b = 10; > > h = 10; > > w = 24; > > triangle_points = [[0,0],[h,0],[0,b]]; > > triangle_paths = [[0,1,2]]; > > //Start with an extruded triangle > > translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, > center = true, twist = 0)polygon(points = triangle_points, paths = > triangle_paths, convexity = 10); > > }//close of difference > > //scale([0.2,0.2,0.2])d_plug(DCONN9); > > //Comment next line to hide the PSU > > translate([-9, -7.7, 0]) rotate([0, 0, > 90])scale([0.05,0.05,0.05])psu(PD_150_12); > > }//close of assembly ("main") > > if($preview){ > > main_assembly(); > > translate([0,0,-5])bottom(); > > } > > /* > > intersection(){ > > translate([10,6,1]){scale(0.5,0.5,0.5){ > > // difference(){ > > // sphere(8); > > // translate([0,10,0])sphere(8); > > // translate([0,-10,0])sphere(8); > > // } > > translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true); > > } > > }//close of intersection > > } > > //updating via http-svn > > translate([10,36,1]){ > > } > > translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = true); > > */ > > [/code] > > Error image, desired output and code screenshots are attached. > > Kindly assist. > > Thanks in advance. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Thu, Jan 6, 2022 4:33 PM

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't know
how to fix it. The keyboard dimension (top of source code) is the actual
length for the artefact.

Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module that
makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Hi There is another way to do this. not clear what is psu regards On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: > Please help. I cannot convert the above Openscad code to STL. On trying > it, I received the above blank page with the notice/warning below it. > > > > I read somewhere that it might be owing to the % I used, yet I don't know > how to fix it. The keyboard dimension (top of source code) is the actual > length for the artefact. > > Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj > > Entire code and grahics can be downloaded from here - > https://file.pizza/download/gt0tfawi > > Main code here: > > [code] > > //Comment line 52 to hide the PSU > > //Keyboard dimension: 14.1” x 7.79” x 1.49” > > //! Project description in Markdown format before the first include. > > $pp1_colour = "grey"; // Override any global defaults here if required, > see NopSCADlib/global_defs.scad. > > include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities > in NopSCADlib but not the printed parts. > > include <NopSCADlib/vitamins/d_connector.scad> > > include <NopSCADlib/vitamins/psus.scad> > > //Custom files; may not be needed now > > //include <bottom.scad> > > //! Assembly instructions in Markdown format in front of each module that > makes an assembly. > > module main_assembly() > > assembly("main") { > > difference(){ > > linear_extrude(height = 15){ > > // translate([5,9,-2]) > > difference(){ > > square(24, center = true); > > square(23.5, center = true); > > }//close of inner difference > > }//close of linear extrude > > translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); > > // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], > paths=[[0,1,2],[3,4,5]],convexity=10); > > // > > // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; > > // triangle_paths =[[0,1,2],[3,4,5]]; > > //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, > center = true) polygon(triangle_points,triangle_paths,1); > > b = 10; > > h = 10; > > w = 24; > > triangle_points = [[0,0],[h,0],[0,b]]; > > triangle_paths = [[0,1,2]]; > > //Start with an extruded triangle > > translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, > center = true, twist = 0)polygon(points = triangle_points, paths = > triangle_paths, convexity = 10); > > }//close of difference > > //scale([0.2,0.2,0.2])d_plug(DCONN9); > > //Comment next line to hide the PSU > > translate([-9, -7.7, 0]) rotate([0, 0, > 90])scale([0.05,0.05,0.05])psu(PD_150_12); > > }//close of assembly ("main") > > if($preview){ > > main_assembly(); > > translate([0,0,-5])bottom(); > > } > > /* > > intersection(){ > > translate([10,6,1]){scale(0.5,0.5,0.5){ > > // difference(){ > > // sphere(8); > > // translate([0,10,0])sphere(8); > > // translate([0,-10,0])sphere(8); > > // } > > translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true); > > } > > }//close of intersection > > } > > //updating via http-svn > > translate([10,36,1]){ > > } > > translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = true); > > */ > > [/code] > > Error image, desired output and code screenshots are attached. > > Kindly assist. > > Thanks in advance. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
NH
nop head
Thu, Jan 6, 2022 4:59 PM

psu() is a module that draws a specified power supply in an assembly
diagram, so you can fit it into a project. It isn't something that can be
exported as an STL. I don't know why one would ever want to scale it down
by 20 as it is the actual size in mm.

On Thu, 6 Jan 2022 at 16:34, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't know
how to fix it. The keyboard dimension (top of source code) is the actual
length for the artefact.

Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module that
makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

psu() is a module that draws a specified power supply in an assembly diagram, so you can fit it into a project. It isn't something that can be exported as an STL. I don't know why one would ever want to scale it down by 20 as it is the actual size in mm. On Thu, 6 Jan 2022 at 16:34, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Hi > There is another way to do this. > not clear what is psu > regards > > On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: > >> Please help. I cannot convert the above Openscad code to STL. On trying >> it, I received the above blank page with the notice/warning below it. >> >> >> >> I read somewhere that it might be owing to the % I used, yet I don't know >> how to fix it. The keyboard dimension (top of source code) is the actual >> length for the artefact. >> >> Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj >> >> Entire code and grahics can be downloaded from here - >> https://file.pizza/download/gt0tfawi >> >> Main code here: >> >> [code] >> >> //Comment line 52 to hide the PSU >> >> //Keyboard dimension: 14.1” x 7.79” x 1.49” >> >> //! Project description in Markdown format before the first include. >> >> $pp1_colour = "grey"; // Override any global defaults here if required, >> see NopSCADlib/global_defs.scad. >> >> include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities >> in NopSCADlib but not the printed parts. >> >> include <NopSCADlib/vitamins/d_connector.scad> >> >> include <NopSCADlib/vitamins/psus.scad> >> >> //Custom files; may not be needed now >> >> //include <bottom.scad> >> >> //! Assembly instructions in Markdown format in front of each module that >> makes an assembly. >> >> module main_assembly() >> >> assembly("main") { >> >> difference(){ >> >> linear_extrude(height = 15){ >> >> // translate([5,9,-2]) >> >> difference(){ >> >> square(24, center = true); >> >> square(23.5, center = true); >> >> }//close of inner difference >> >> }//close of linear extrude >> >> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); >> >> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >> paths=[[0,1,2],[3,4,5]],convexity=10); >> >> // >> >> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >> >> // triangle_paths =[[0,1,2],[3,4,5]]; >> >> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, >> center = true) polygon(triangle_points,triangle_paths,1); >> >> b = 10; >> >> h = 10; >> >> w = 24; >> >> triangle_points = [[0,0],[h,0],[0,b]]; >> >> triangle_paths = [[0,1,2]]; >> >> //Start with an extruded triangle >> >> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >> center = true, twist = 0)polygon(points = triangle_points, paths = >> triangle_paths, convexity = 10); >> >> }//close of difference >> >> //scale([0.2,0.2,0.2])d_plug(DCONN9); >> >> //Comment next line to hide the PSU >> >> translate([-9, -7.7, 0]) rotate([0, 0, >> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >> >> }//close of assembly ("main") >> >> if($preview){ >> >> main_assembly(); >> >> translate([0,0,-5])bottom(); >> >> } >> >> /* >> >> intersection(){ >> >> translate([10,6,1]){scale(0.5,0.5,0.5){ >> >> // difference(){ >> >> // sphere(8); >> >> // translate([0,10,0])sphere(8); >> >> // translate([0,-10,0])sphere(8); >> >> // } >> >> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true); >> >> } >> >> }//close of intersection >> >> } >> >> //updating via http-svn >> >> translate([10,36,1]){ >> >> } >> >> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >> true); >> >> */ >> >> [/code] >> >> Error image, desired output and code screenshots are attached. >> >> Kindly assist. >> >> Thanks in advance. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Fri, Jan 7, 2022 12:19 AM

Thanks for the explanation

On Thu, 6 Jan 2022, 22:29 nop head, nop.head@gmail.com wrote:

psu() is a module that draws a specified power supply in an assembly
diagram, so you can fit it into a project. It isn't something that can be
exported as an STL. I don't know why one would ever want to scale it down
by 20 as it is the actual size in mm.

On Thu, 6 Jan 2022 at 16:34, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't
know how to fix it. The keyboard dimension (top of source code) is the
actual length for the artefact.

Here is the code in editable form -
https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module
that makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center =
true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thanks for the explanation On Thu, 6 Jan 2022, 22:29 nop head, <nop.head@gmail.com> wrote: > psu() is a module that draws a specified power supply in an assembly > diagram, so you can fit it into a project. It isn't something that can be > exported as an STL. I don't know why one would ever want to scale it down > by 20 as it is the actual size in mm. > > On Thu, 6 Jan 2022 at 16:34, Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> Hi >> There is another way to do this. >> not clear what is psu >> regards >> >> On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: >> >>> Please help. I cannot convert the above Openscad code to STL. On trying >>> it, I received the above blank page with the notice/warning below it. >>> >>> >>> >>> I read somewhere that it might be owing to the % I used, yet I don't >>> know how to fix it. The keyboard dimension (top of source code) is the >>> actual length for the artefact. >>> >>> Here is the code in editable form - >>> https://pastebin.mozilla.org/wjo2V2xj >>> >>> Entire code and grahics can be downloaded from here - >>> https://file.pizza/download/gt0tfawi >>> >>> Main code here: >>> >>> [code] >>> >>> //Comment line 52 to hide the PSU >>> >>> //Keyboard dimension: 14.1” x 7.79” x 1.49” >>> >>> //! Project description in Markdown format before the first include. >>> >>> $pp1_colour = "grey"; // Override any global defaults here if required, >>> see NopSCADlib/global_defs.scad. >>> >>> include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities >>> in NopSCADlib but not the printed parts. >>> >>> include <NopSCADlib/vitamins/d_connector.scad> >>> >>> include <NopSCADlib/vitamins/psus.scad> >>> >>> //Custom files; may not be needed now >>> >>> //include <bottom.scad> >>> >>> //! Assembly instructions in Markdown format in front of each module >>> that makes an assembly. >>> >>> module main_assembly() >>> >>> assembly("main") { >>> >>> difference(){ >>> >>> linear_extrude(height = 15){ >>> >>> // translate([5,9,-2]) >>> >>> difference(){ >>> >>> square(24, center = true); >>> >>> square(23.5, center = true); >>> >>> }//close of inner difference >>> >>> }//close of linear extrude >>> >>> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); >>> >>> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >>> paths=[[0,1,2],[3,4,5]],convexity=10); >>> >>> // >>> >>> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >>> >>> // triangle_paths =[[0,1,2],[3,4,5]]; >>> >>> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, >>> center = true) polygon(triangle_points,triangle_paths,1); >>> >>> b = 10; >>> >>> h = 10; >>> >>> w = 24; >>> >>> triangle_points = [[0,0],[h,0],[0,b]]; >>> >>> triangle_paths = [[0,1,2]]; >>> >>> //Start with an extruded triangle >>> >>> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >>> center = true, twist = 0)polygon(points = triangle_points, paths = >>> triangle_paths, convexity = 10); >>> >>> }//close of difference >>> >>> //scale([0.2,0.2,0.2])d_plug(DCONN9); >>> >>> //Comment next line to hide the PSU >>> >>> translate([-9, -7.7, 0]) rotate([0, 0, >>> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >>> >>> }//close of assembly ("main") >>> >>> if($preview){ >>> >>> main_assembly(); >>> >>> translate([0,0,-5])bottom(); >>> >>> } >>> >>> /* >>> >>> intersection(){ >>> >>> translate([10,6,1]){scale(0.5,0.5,0.5){ >>> >>> // difference(){ >>> >>> // sphere(8); >>> >>> // translate([0,10,0])sphere(8); >>> >>> // translate([0,-10,0])sphere(8); >>> >>> // } >>> >>> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = >>> true); >>> >>> } >>> >>> }//close of intersection >>> >>> } >>> >>> //updating via http-svn >>> >>> translate([10,36,1]){ >>> >>> } >>> >>> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >>> true); >>> >>> */ >>> >>> [/code] >>> >>> Error image, desired output and code screenshots are attached. >>> >>> Kindly assist. >>> >>> Thanks in advance. >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
UU
user user
Fri, Jan 7, 2022 12:46 AM

Dear Sanjeev,

ou Tfor your assistance.  Your attachment throws an error as shown below:

dependencies.scad", line 107: syntax error

On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't know
how to fix it. The keyboard dimension (top of source code) is the actual
length for the artefact.

Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module that
makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Dear Sanjeev, ou Tfor your assistance. Your attachment throws an error as shown below: dependencies.scad", line 107: syntax error On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Hi > There is another way to do this. > not clear what is psu > regards > > On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: > >> Please help. I cannot convert the above Openscad code to STL. On trying >> it, I received the above blank page with the notice/warning below it. >> >> >> >> I read somewhere that it might be owing to the % I used, yet I don't know >> how to fix it. The keyboard dimension (top of source code) is the actual >> length for the artefact. >> >> Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj >> >> Entire code and grahics can be downloaded from here - >> https://file.pizza/download/gt0tfawi >> >> Main code here: >> >> [code] >> >> //Comment line 52 to hide the PSU >> >> //Keyboard dimension: 14.1” x 7.79” x 1.49” >> >> //! Project description in Markdown format before the first include. >> >> $pp1_colour = "grey"; // Override any global defaults here if required, >> see NopSCADlib/global_defs.scad. >> >> include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities >> in NopSCADlib but not the printed parts. >> >> include <NopSCADlib/vitamins/d_connector.scad> >> >> include <NopSCADlib/vitamins/psus.scad> >> >> //Custom files; may not be needed now >> >> //include <bottom.scad> >> >> //! Assembly instructions in Markdown format in front of each module that >> makes an assembly. >> >> module main_assembly() >> >> assembly("main") { >> >> difference(){ >> >> linear_extrude(height = 15){ >> >> // translate([5,9,-2]) >> >> difference(){ >> >> square(24, center = true); >> >> square(23.5, center = true); >> >> }//close of inner difference >> >> }//close of linear extrude >> >> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); >> >> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >> paths=[[0,1,2],[3,4,5]],convexity=10); >> >> // >> >> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >> >> // triangle_paths =[[0,1,2],[3,4,5]]; >> >> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, >> center = true) polygon(triangle_points,triangle_paths,1); >> >> b = 10; >> >> h = 10; >> >> w = 24; >> >> triangle_points = [[0,0],[h,0],[0,b]]; >> >> triangle_paths = [[0,1,2]]; >> >> //Start with an extruded triangle >> >> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >> center = true, twist = 0)polygon(points = triangle_points, paths = >> triangle_paths, convexity = 10); >> >> }//close of difference >> >> //scale([0.2,0.2,0.2])d_plug(DCONN9); >> >> //Comment next line to hide the PSU >> >> translate([-9, -7.7, 0]) rotate([0, 0, >> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >> >> }//close of assembly ("main") >> >> if($preview){ >> >> main_assembly(); >> >> translate([0,0,-5])bottom(); >> >> } >> >> /* >> >> intersection(){ >> >> translate([10,6,1]){scale(0.5,0.5,0.5){ >> >> // difference(){ >> >> // sphere(8); >> >> // translate([0,10,0])sphere(8); >> >> // translate([0,-10,0])sphere(8); >> >> // } >> >> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true); >> >> } >> >> }//close of intersection >> >> } >> >> //updating via http-svn >> >> translate([10,36,1]){ >> >> } >> >> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >> true); >> >> */ >> >> [/code] >> >> Error image, desired output and code screenshots are attached. >> >> Kindly assist. >> >> Thanks in advance. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Fri, Jan 7, 2022 1:05 AM

Which version of openscad you are working with?
It needs 2021 version which supports x^2 system for squaring otherwise you
need to replace the syntax with  pow(x,2)

On Fri, 7 Jan 2022, 06:17 user user, user35b@gmail.com wrote:

Dear Sanjeev,

ou Tfor your assistance.  Your attachment throws an error as shown below:

dependencies.scad", line 107: syntax error

On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't
know how to fix it. The keyboard dimension (top of source code) is the
actual length for the artefact.

Here is the code in editable form -
https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module
that makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center =
true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Which version of openscad you are working with? It needs 2021 version which supports x^2 system for squaring otherwise you need to replace the syntax with pow(x,2) On Fri, 7 Jan 2022, 06:17 user user, <user35b@gmail.com> wrote: > Dear Sanjeev, > > ou Tfor your assistance. Your attachment throws an error as shown below: > > dependencies.scad", line 107: syntax error > > On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar < > sprabhakar2006@gmail.com> wrote: > >> Hi >> There is another way to do this. >> not clear what is psu >> regards >> >> On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: >> >>> Please help. I cannot convert the above Openscad code to STL. On trying >>> it, I received the above blank page with the notice/warning below it. >>> >>> >>> >>> I read somewhere that it might be owing to the % I used, yet I don't >>> know how to fix it. The keyboard dimension (top of source code) is the >>> actual length for the artefact. >>> >>> Here is the code in editable form - >>> https://pastebin.mozilla.org/wjo2V2xj >>> >>> Entire code and grahics can be downloaded from here - >>> https://file.pizza/download/gt0tfawi >>> >>> Main code here: >>> >>> [code] >>> >>> //Comment line 52 to hide the PSU >>> >>> //Keyboard dimension: 14.1” x 7.79” x 1.49” >>> >>> //! Project description in Markdown format before the first include. >>> >>> $pp1_colour = "grey"; // Override any global defaults here if required, >>> see NopSCADlib/global_defs.scad. >>> >>> include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities >>> in NopSCADlib but not the printed parts. >>> >>> include <NopSCADlib/vitamins/d_connector.scad> >>> >>> include <NopSCADlib/vitamins/psus.scad> >>> >>> //Custom files; may not be needed now >>> >>> //include <bottom.scad> >>> >>> //! Assembly instructions in Markdown format in front of each module >>> that makes an assembly. >>> >>> module main_assembly() >>> >>> assembly("main") { >>> >>> difference(){ >>> >>> linear_extrude(height = 15){ >>> >>> // translate([5,9,-2]) >>> >>> difference(){ >>> >>> square(24, center = true); >>> >>> square(23.5, center = true); >>> >>> }//close of inner difference >>> >>> }//close of linear extrude >>> >>> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); >>> >>> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >>> paths=[[0,1,2],[3,4,5]],convexity=10); >>> >>> // >>> >>> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >>> >>> // triangle_paths =[[0,1,2],[3,4,5]]; >>> >>> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, >>> center = true) polygon(triangle_points,triangle_paths,1); >>> >>> b = 10; >>> >>> h = 10; >>> >>> w = 24; >>> >>> triangle_points = [[0,0],[h,0],[0,b]]; >>> >>> triangle_paths = [[0,1,2]]; >>> >>> //Start with an extruded triangle >>> >>> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >>> center = true, twist = 0)polygon(points = triangle_points, paths = >>> triangle_paths, convexity = 10); >>> >>> }//close of difference >>> >>> //scale([0.2,0.2,0.2])d_plug(DCONN9); >>> >>> //Comment next line to hide the PSU >>> >>> translate([-9, -7.7, 0]) rotate([0, 0, >>> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >>> >>> }//close of assembly ("main") >>> >>> if($preview){ >>> >>> main_assembly(); >>> >>> translate([0,0,-5])bottom(); >>> >>> } >>> >>> /* >>> >>> intersection(){ >>> >>> translate([10,6,1]){scale(0.5,0.5,0.5){ >>> >>> // difference(){ >>> >>> // sphere(8); >>> >>> // translate([0,10,0])sphere(8); >>> >>> // translate([0,-10,0])sphere(8); >>> >>> // } >>> >>> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = >>> true); >>> >>> } >>> >>> }//close of intersection >>> >>> } >>> >>> //updating via http-svn >>> >>> translate([10,36,1]){ >>> >>> } >>> >>> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >>> true); >>> >>> */ >>> >>> [/code] >>> >>> Error image, desired output and code screenshots are attached. >>> >>> Kindly assist. >>> >>> Thanks in advance. >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
UU
user user
Fri, Jan 7, 2022 1:14 AM

All right, I shall get the version 2021.
Thanks. I am wanting to learn from the resource you sent while putting some
final touches to mine.

On Fri, Jan 7, 2022 at 9:06 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Which version of openscad you are working with?
It needs 2021 version which supports x^2 system for squaring otherwise you
need to replace the syntax with  pow(x,2)

On Fri, 7 Jan 2022, 06:17 user user, user35b@gmail.com wrote:

Dear Sanjeev,

ou Tfor your assistance.  Your attachment throws an error as shown below:

dependencies.scad", line 107: syntax error

On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't
know how to fix it. The keyboard dimension (top of source code) is the
actual length for the artefact.

Here is the code in editable form -
https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and
utilities in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module
that makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center =
true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center =
true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

All right, I shall get the version 2021. Thanks. I am wanting to learn from the resource you sent while putting some final touches to mine. On Fri, Jan 7, 2022 at 9:06 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > Which version of openscad you are working with? > It needs 2021 version which supports x^2 system for squaring otherwise you > need to replace the syntax with pow(x,2) > > On Fri, 7 Jan 2022, 06:17 user user, <user35b@gmail.com> wrote: > >> Dear Sanjeev, >> >> ou Tfor your assistance. Your attachment throws an error as shown below: >> >> dependencies.scad", line 107: syntax error >> >> On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar < >> sprabhakar2006@gmail.com> wrote: >> >>> Hi >>> There is another way to do this. >>> not clear what is psu >>> regards >>> >>> On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: >>> >>>> Please help. I cannot convert the above Openscad code to STL. On trying >>>> it, I received the above blank page with the notice/warning below it. >>>> >>>> >>>> >>>> I read somewhere that it might be owing to the % I used, yet I don't >>>> know how to fix it. The keyboard dimension (top of source code) is the >>>> actual length for the artefact. >>>> >>>> Here is the code in editable form - >>>> https://pastebin.mozilla.org/wjo2V2xj >>>> >>>> Entire code and grahics can be downloaded from here - >>>> https://file.pizza/download/gt0tfawi >>>> >>>> Main code here: >>>> >>>> [code] >>>> >>>> //Comment line 52 to hide the PSU >>>> >>>> //Keyboard dimension: 14.1” x 7.79” x 1.49” >>>> >>>> //! Project description in Markdown format before the first include. >>>> >>>> $pp1_colour = "grey"; // Override any global defaults here if required, >>>> see NopSCADlib/global_defs.scad. >>>> >>>> include <NopSCADlib/lib.scad> // Includes all the vitamins and >>>> utilities in NopSCADlib but not the printed parts. >>>> >>>> include <NopSCADlib/vitamins/d_connector.scad> >>>> >>>> include <NopSCADlib/vitamins/psus.scad> >>>> >>>> //Custom files; may not be needed now >>>> >>>> //include <bottom.scad> >>>> >>>> //! Assembly instructions in Markdown format in front of each module >>>> that makes an assembly. >>>> >>>> module main_assembly() >>>> >>>> assembly("main") { >>>> >>>> difference(){ >>>> >>>> linear_extrude(height = 15){ >>>> >>>> // translate([5,9,-2]) >>>> >>>> difference(){ >>>> >>>> square(24, center = true); >>>> >>>> square(23.5, center = true); >>>> >>>> }//close of inner difference >>>> >>>> }//close of linear extrude >>>> >>>> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = >>>> true); >>>> >>>> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >>>> paths=[[0,1,2],[3,4,5]],convexity=10); >>>> >>>> // >>>> >>>> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >>>> >>>> // triangle_paths =[[0,1,2],[3,4,5]]; >>>> >>>> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, >>>> center = true) polygon(triangle_points,triangle_paths,1); >>>> >>>> b = 10; >>>> >>>> h = 10; >>>> >>>> w = 24; >>>> >>>> triangle_points = [[0,0],[h,0],[0,b]]; >>>> >>>> triangle_paths = [[0,1,2]]; >>>> >>>> //Start with an extruded triangle >>>> >>>> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >>>> center = true, twist = 0)polygon(points = triangle_points, paths = >>>> triangle_paths, convexity = 10); >>>> >>>> }//close of difference >>>> >>>> //scale([0.2,0.2,0.2])d_plug(DCONN9); >>>> >>>> //Comment next line to hide the PSU >>>> >>>> translate([-9, -7.7, 0]) rotate([0, 0, >>>> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >>>> >>>> }//close of assembly ("main") >>>> >>>> if($preview){ >>>> >>>> main_assembly(); >>>> >>>> translate([0,0,-5])bottom(); >>>> >>>> } >>>> >>>> /* >>>> >>>> intersection(){ >>>> >>>> translate([10,6,1]){scale(0.5,0.5,0.5){ >>>> >>>> // difference(){ >>>> >>>> // sphere(8); >>>> >>>> // translate([0,10,0])sphere(8); >>>> >>>> // translate([0,-10,0])sphere(8); >>>> >>>> // } >>>> >>>> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = >>>> true); >>>> >>>> } >>>> >>>> }//close of intersection >>>> >>>> } >>>> >>>> //updating via http-svn >>>> >>>> translate([10,36,1]){ >>>> >>>> } >>>> >>>> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >>>> true); >>>> >>>> */ >>>> >>>> [/code] >>>> >>>> Error image, desired output and code screenshots are attached. >>>> >>>> Kindly assist. >>>> >>>> Thanks in advance. >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Fri, Jan 7, 2022 1:15 AM

Great thanks

On Fri, 7 Jan 2022, 06:43 user user, user35b@gmail.com wrote:

All right, I shall get the version 2021.
Thanks. I am wanting to learn from the resource you sent while putting
some final touches to mine.

On Fri, Jan 7, 2022 at 9:06 AM Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

Which version of openscad you are working with?
It needs 2021 version which supports x^2 system for squaring otherwise
you need to replace the syntax with  pow(x,2)

On Fri, 7 Jan 2022, 06:17 user user, user35b@gmail.com wrote:

Dear Sanjeev,

ou Tfor your assistance.  Your attachment throws an error as shown below:

dependencies.scad", line 107: syntax error

On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar <
sprabhakar2006@gmail.com> wrote:

Hi
There is another way to do this.
not clear what is psu
regards

On Thu, 6 Jan 2022 at 20:31, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On
trying it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't
know how to fix it. The keyboard dimension (top of source code) is the
actual length for the artefact.

Here is the code in editable form -
https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if
required, see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and
utilities in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module
that makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center =
true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height =
24, center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center =
true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Great thanks On Fri, 7 Jan 2022, 06:43 user user, <user35b@gmail.com> wrote: > All right, I shall get the version 2021. > Thanks. I am wanting to learn from the resource you sent while putting > some final touches to mine. > > On Fri, Jan 7, 2022 at 9:06 AM Sanjeev Prabhakar <sprabhakar2006@gmail.com> > wrote: > >> Which version of openscad you are working with? >> It needs 2021 version which supports x^2 system for squaring otherwise >> you need to replace the syntax with pow(x,2) >> >> On Fri, 7 Jan 2022, 06:17 user user, <user35b@gmail.com> wrote: >> >>> Dear Sanjeev, >>> >>> ou Tfor your assistance. Your attachment throws an error as shown below: >>> >>> dependencies.scad", line 107: syntax error >>> >>> On Fri, Jan 7, 2022 at 12:34 AM Sanjeev Prabhakar < >>> sprabhakar2006@gmail.com> wrote: >>> >>>> Hi >>>> There is another way to do this. >>>> not clear what is psu >>>> regards >>>> >>>> On Thu, 6 Jan 2022 at 20:31, <user35b@gmail.com> wrote: >>>> >>>>> Please help. I cannot convert the above Openscad code to STL. On >>>>> trying it, I received the above blank page with the notice/warning below it. >>>>> >>>>> >>>>> >>>>> I read somewhere that it might be owing to the % I used, yet I don't >>>>> know how to fix it. The keyboard dimension (top of source code) is the >>>>> actual length for the artefact. >>>>> >>>>> Here is the code in editable form - >>>>> https://pastebin.mozilla.org/wjo2V2xj >>>>> >>>>> Entire code and grahics can be downloaded from here - >>>>> https://file.pizza/download/gt0tfawi >>>>> >>>>> Main code here: >>>>> >>>>> [code] >>>>> >>>>> //Comment line 52 to hide the PSU >>>>> >>>>> //Keyboard dimension: 14.1” x 7.79” x 1.49” >>>>> >>>>> //! Project description in Markdown format before the first include. >>>>> >>>>> $pp1_colour = "grey"; // Override any global defaults here if >>>>> required, see NopSCADlib/global_defs.scad. >>>>> >>>>> include <NopSCADlib/lib.scad> // Includes all the vitamins and >>>>> utilities in NopSCADlib but not the printed parts. >>>>> >>>>> include <NopSCADlib/vitamins/d_connector.scad> >>>>> >>>>> include <NopSCADlib/vitamins/psus.scad> >>>>> >>>>> //Custom files; may not be needed now >>>>> >>>>> //include <bottom.scad> >>>>> >>>>> //! Assembly instructions in Markdown format in front of each module >>>>> that makes an assembly. >>>>> >>>>> module main_assembly() >>>>> >>>>> assembly("main") { >>>>> >>>>> difference(){ >>>>> >>>>> linear_extrude(height = 15){ >>>>> >>>>> // translate([5,9,-2]) >>>>> >>>>> difference(){ >>>>> >>>>> square(24, center = true); >>>>> >>>>> square(23.5, center = true); >>>>> >>>>> }//close of inner difference >>>>> >>>>> }//close of linear extrude >>>>> >>>>> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = >>>>> true); >>>>> >>>>> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >>>>> paths=[[0,1,2],[3,4,5]],convexity=10); >>>>> >>>>> // >>>>> >>>>> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >>>>> >>>>> // triangle_paths =[[0,1,2],[3,4,5]]; >>>>> >>>>> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = >>>>> 24, center = true) polygon(triangle_points,triangle_paths,1); >>>>> >>>>> b = 10; >>>>> >>>>> h = 10; >>>>> >>>>> w = 24; >>>>> >>>>> triangle_points = [[0,0],[h,0],[0,b]]; >>>>> >>>>> triangle_paths = [[0,1,2]]; >>>>> >>>>> //Start with an extruded triangle >>>>> >>>>> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >>>>> center = true, twist = 0)polygon(points = triangle_points, paths = >>>>> triangle_paths, convexity = 10); >>>>> >>>>> }//close of difference >>>>> >>>>> //scale([0.2,0.2,0.2])d_plug(DCONN9); >>>>> >>>>> //Comment next line to hide the PSU >>>>> >>>>> translate([-9, -7.7, 0]) rotate([0, 0, >>>>> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >>>>> >>>>> }//close of assembly ("main") >>>>> >>>>> if($preview){ >>>>> >>>>> main_assembly(); >>>>> >>>>> translate([0,0,-5])bottom(); >>>>> >>>>> } >>>>> >>>>> /* >>>>> >>>>> intersection(){ >>>>> >>>>> translate([10,6,1]){scale(0.5,0.5,0.5){ >>>>> >>>>> // difference(){ >>>>> >>>>> // sphere(8); >>>>> >>>>> // translate([0,10,0])sphere(8); >>>>> >>>>> // translate([0,-10,0])sphere(8); >>>>> >>>>> // } >>>>> >>>>> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = >>>>> true); >>>>> >>>>> } >>>>> >>>>> }//close of intersection >>>>> >>>>> } >>>>> >>>>> //updating via http-svn >>>>> >>>>> translate([10,36,1]){ >>>>> >>>>> } >>>>> >>>>> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >>>>> true); >>>>> >>>>> */ >>>>> >>>>> [/code] >>>>> >>>>> Error image, desired output and code screenshots are attached. >>>>> >>>>> Kindly assist. >>>>> >>>>> Thanks in advance. >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
UU
user user
Fri, Jan 7, 2022 1:30 AM

Dear All,
Thank you for your comments. I can now convert to STL on commenting the
preview. I however now need properly scale the artefact. I am actually
wanting to insert this device -
https://www.aliexpress.com/item/1772142652.html - into it. The transparent
plastic guard that the touchscreen and PCB sit on will be cut into two. The
screen will now be inserted in a slanty form on my print while the PCB will
be sitting in a horizontal state.
The dimension I need is about 7.2inch for length. It is in accordance with
the touchscreen width. The keyboard (dimension 14.1” x 7.79” x 1.49) will
sit just on top protuding out left and right. While I won't worry about
its length, I reckon the width of my artefact would be roughly 12in and
height being 7in too.

Kindly help me adjust the dimension in my source code to
7..2in(L)X12in(W)X7in(H)

On Fri, Jan 7, 2022 at 12:28 AM nop head nop.head@gmail.com wrote:

Line 60 is if($preview), so it only generates an assembly view with F5 and
nothing with F6.

Your main_assembly() has geometry in it, which is not how NopSCADlib
works. You put geometry in modules that make STLs and include those modules
in your assembly view. Then you normally export the STLs using the Python
framework but you could
add an else clause to the if($preview) to call one of your STL making
modules.

On Thu, 6 Jan 2022 at 15:19, user35b@gmail.com wrote:

Please help. I cannot convert the above Openscad code to STL. On trying
it, I received the above blank page with the notice/warning below it.

I read somewhere that it might be owing to the % I used, yet I don't know
how to fix it. The keyboard dimension (top of source code) is the actual
length for the artefact.

Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj

Entire code and grahics can be downloaded from here -
https://file.pizza/download/gt0tfawi

Main code here:

[code]

//Comment line 52 to hide the PSU

//Keyboard dimension: 14.1” x 7.79” x 1.49”

//! Project description in Markdown format before the first include.

$pp1_colour = "grey"; // Override any global defaults here if required,
see NopSCADlib/global_defs.scad.

include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities
in NopSCADlib but not the printed parts.

include <NopSCADlib/vitamins/d_connector.scad>

include <NopSCADlib/vitamins/psus.scad>

//Custom files; may not be needed now

//include <bottom.scad>

//! Assembly instructions in Markdown format in front of each module that
makes an assembly.

module main_assembly()

assembly("main") {

difference(){

linear_extrude(height = 15){

// translate([5,9,-2])

difference(){

square(24, center = true);

square(23.5, center = true);

}//close of inner difference

}//close of linear extrude

translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true);

// polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]],
paths=[[0,1,2],[3,4,5]],convexity=10);

//

// triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]];

// triangle_paths =[[0,1,2],[3,4,5]];

//translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24,
center = true) polygon(triangle_points,triangle_paths,1);

b = 10;

h = 10;

w = 24;

triangle_points = [[0,0],[h,0],[0,b]];

triangle_paths = [[0,1,2]];

//Start with an extruded triangle

translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w,
center = true, twist = 0)polygon(points = triangle_points, paths =
triangle_paths, convexity = 10);

}//close of difference

//scale([0.2,0.2,0.2])d_plug(DCONN9);

//Comment next line to hide the PSU

translate([-9, -7.7, 0]) rotate([0, 0,
90])scale([0.05,0.05,0.05])psu(PD_150_12);

}//close of assembly ("main")

if($preview){

main_assembly();

translate([0,0,-5])bottom();

}

/*

intersection(){

translate([10,6,1]){scale(0.5,0.5,0.5){

// difference(){

// sphere(8);

// translate([0,10,0])sphere(8);

// translate([0,-10,0])sphere(8);

// }

translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true);

}

}//close of intersection

}

//updating via http-svn

translate([10,36,1]){

}

translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center =
true);

*/

[/code]

Error image, desired output and code screenshots are attached.

Kindly assist.

Thanks in advance.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Dear All, Thank you for your comments. I can now convert to STL on commenting the preview. I however now need properly scale the artefact. I am actually wanting to insert this device - https://www.aliexpress.com/item/1772142652.html - into it. The transparent plastic guard that the touchscreen and PCB sit on will be cut into two. The screen will now be inserted in a slanty form on my print while the PCB will be sitting in a horizontal state. The dimension I need is about 7.2inch for length. It is in accordance with the touchscreen width. The keyboard (dimension 14.1” x 7.79” x 1.49) will sit just on top protuding out left and right. While I won't worry about its length, I reckon the width of my artefact would be roughly 12in and height being 7in too. Kindly help me adjust the dimension in my source code to 7..2in(L)X12in(W)X7in(H) On Fri, Jan 7, 2022 at 12:28 AM nop head <nop.head@gmail.com> wrote: > Line 60 is if($preview), so it only generates an assembly view with F5 and > nothing with F6. > > Your main_assembly() has geometry in it, which is not how NopSCADlib > works. You put geometry in modules that make STLs and include those modules > in your assembly view. Then you normally export the STLs using the Python > framework but you could > add an else clause to the if($preview) to call one of your STL making > modules. > > > > On Thu, 6 Jan 2022 at 15:19, <user35b@gmail.com> wrote: > >> Please help. I cannot convert the above Openscad code to STL. On trying >> it, I received the above blank page with the notice/warning below it. >> >> >> >> I read somewhere that it might be owing to the % I used, yet I don't know >> how to fix it. The keyboard dimension (top of source code) is the actual >> length for the artefact. >> >> Here is the code in editable form - https://pastebin.mozilla.org/wjo2V2xj >> >> Entire code and grahics can be downloaded from here - >> https://file.pizza/download/gt0tfawi >> >> Main code here: >> >> [code] >> >> //Comment line 52 to hide the PSU >> >> //Keyboard dimension: 14.1” x 7.79” x 1.49” >> >> //! Project description in Markdown format before the first include. >> >> $pp1_colour = "grey"; // Override any global defaults here if required, >> see NopSCADlib/global_defs.scad. >> >> include <NopSCADlib/lib.scad> // Includes all the vitamins and utilities >> in NopSCADlib but not the printed parts. >> >> include <NopSCADlib/vitamins/d_connector.scad> >> >> include <NopSCADlib/vitamins/psus.scad> >> >> //Custom files; may not be needed now >> >> //include <bottom.scad> >> >> //! Assembly instructions in Markdown format in front of each module that >> makes an assembly. >> >> module main_assembly() >> >> assembly("main") { >> >> difference(){ >> >> linear_extrude(height = 15){ >> >> // translate([5,9,-2]) >> >> difference(){ >> >> square(24, center = true); >> >> square(23.5, center = true); >> >> }//close of inner difference >> >> }//close of linear extrude >> >> translate([8, 0, 13])rotate([0, 90, 0])cube([11, 24, 18], center = true); >> >> // polygon(points=[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]], >> paths=[[0,1,2],[3,4,5]],convexity=10); >> >> // >> >> // triangle_points =[[0,0],[10,0],[0,10],[1,1],[8,1],[1,8]]; >> >> // triangle_paths =[[0,1,2],[3,4,5]]; >> >> //translate([-10, 0, 7]) rotate([90, 0, 0]) linear_extrude(height = 24, >> center = true) polygon(triangle_points,triangle_paths,1); >> >> b = 10; >> >> h = 10; >> >> w = 24; >> >> triangle_points = [[0,0],[h,0],[0,b]]; >> >> triangle_paths = [[0,1,2]]; >> >> //Start with an extruded triangle >> >> translate([0, 0, 16]) rotate([90, 90, 180])linear_extrude(height = w, >> center = true, twist = 0)polygon(points = triangle_points, paths = >> triangle_paths, convexity = 10); >> >> }//close of difference >> >> //scale([0.2,0.2,0.2])d_plug(DCONN9); >> >> //Comment next line to hide the PSU >> >> translate([-9, -7.7, 0]) rotate([0, 0, >> 90])scale([0.05,0.05,0.05])psu(PD_150_12); >> >> }//close of assembly ("main") >> >> if($preview){ >> >> main_assembly(); >> >> translate([0,0,-5])bottom(); >> >> } >> >> /* >> >> intersection(){ >> >> translate([10,6,1]){scale(0.5,0.5,0.5){ >> >> // difference(){ >> >> // sphere(8); >> >> // translate([0,10,0])sphere(8); >> >> // translate([0,-10,0])sphere(8); >> >> // } >> >> translate([0, 2, 0])rotate([90,0,0])cylinder(r = 1, h = 9, center = true); >> >> } >> >> }//close of intersection >> >> } >> >> //updating via http-svn >> >> translate([10,36,1]){ >> >> } >> >> translate([0, -2, 0])rotate([90,0,0])cylinder(r = 1, h = 7, center = >> true); >> >> */ >> >> [/code] >> >> Error image, desired output and code screenshots are attached. >> >> Kindly assist. >> >> Thanks in advance. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >