discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Beginner needs help with project

D
donrecardo
Sun, Mar 22, 2015 1:01 PM

I am a complete beginner to Openscad ( started yesterday )
I have been reading tutorials and understand some of the ideas but still
have much to learn .
I am ok on things like primatives , and translations , difference , union
etc , and understand the reason for modules
and I am guessing modules will be what I need for my project

I normally use Solidworks which I find easy enough to use and very powerful
however Openscad has one feature that Solidworks doesnt.
The abilty to use a file to make a design , but with the alteration of just
a few variables make a similar , but different copy of
the item

The project I wish to make , but dont know quite how to go about it is a
simple box to hold a printed circuit board. That in itself I can do
but by changing a few variables I want to be able to make the box fit any
sized PCB that I choose rather than have to design a new box every time I
use a different sized PCB

I can assume various things about the box

  1. It will always have 4 bosses to screw the PCB down to and that those
    bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole
    in the middle to
    take a screw

  2. the Printed circuit board mounting holes will always be in a rectangular
    pattern and will be  4 mm in from each edge of the board
    ( the board will always be 8mm longer and wider than the bosses are
    spaced at)

  3. there will always be a 3mm gap between the edge of the board and the
    inside edge of the box

From those assumptions I should be able to input variables for

The distance between mounting bosses in the X and Y directions

The thickness of the box walls and floor

The height of the box

and the code should then know enough to make a box that will fit a PCB of
that size

Thats where I come to a stop, I dont know how to make it do that
Can any one help please ?

Regards
Don

--
View this message in context: http://forum.openscad.org/Beginner-needs-help-with-project-tp12117.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I am a complete beginner to Openscad ( started yesterday ) I have been reading tutorials and understand some of the ideas but still have much to learn . I am ok on things like primatives , and translations , difference , union etc , and understand the reason for modules and I am guessing modules will be what I need for my project I normally use Solidworks which I find easy enough to use and very powerful however Openscad has one feature that Solidworks doesnt. The abilty to use a file to make a design , but with the alteration of just a few variables make a similar , but different copy of the item The project I wish to make , but dont know quite how to go about it is a simple box to hold a printed circuit board. That in itself I can do but by changing a few variables I want to be able to make the box fit any sized PCB that I choose rather than have to design a new box every time I use a different sized PCB I can assume various things about the box 1) It will always have 4 bosses to screw the PCB down to and that those bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole in the middle to take a screw 2) the Printed circuit board mounting holes will always be in a rectangular pattern and will be 4 mm in from each edge of the board ( the board will always be 8mm longer and wider than the bosses are spaced at) 3) there will always be a 3mm gap between the edge of the board and the inside edge of the box >From those assumptions I should be able to input variables for The distance between mounting bosses in the X and Y directions The thickness of the box walls and floor The height of the box and the code should then know enough to make a box that will fit a PCB of that size Thats where I come to a stop, I dont know how to make it do that Can any one help please ? Regards Don -- View this message in context: http://forum.openscad.org/Beginner-needs-help-with-project-tp12117.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Sun, Mar 22, 2015 1:22 PM

On 03/22/2015 02:01 PM, donrecardo wrote:

Thats where I come to a stop, I dont know how to make it do that
Can any one help please ?

Whew, that's a question that is difficult to answer without just doing
the model and posting it :-).

Maybe start with creating just a cube() of the correct size based on
calculation using the variables you've described and add the drill
holes (simply though the whole cube).

Then post the code for that for discussing the next step.

ciao,
Torsten.

On 03/22/2015 02:01 PM, donrecardo wrote: > Thats where I come to a stop, I dont know how to make it do that > Can any one help please ? > Whew, that's a question that is difficult to answer without just doing the model and posting it :-). Maybe start with creating just a cube() of the correct size based on calculation using the variables you've described and add the drill holes (simply though the whole cube). Then post the code for that for discussing the next step. ciao, Torsten.
PF
Peter Falke
Sun, Mar 22, 2015 1:47 PM

Now, you posted an almost complete description of what you need.
Just extract all the variables-definition from that before you start coding.

Like this: ( // denotes this line to be a comment)

  1. It will always have 4 bosses to screw the PCB down to and that those
    bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole
    in the middle to
    take a screw

// boss
boss_height=6;
boss_diameter=6;
boss_hole=2,5;

Now do this for all your variables that you will need.

Next step:
Write modules for the single parts.
You may start again with the boss:

module boss(){

// now comes the real code, but I leave this for you.

}

2015-03-22 14:22 GMT+01:00 Torsten Paul Torsten.Paul@gmx.de:

On 03/22/2015 02:01 PM, donrecardo wrote:

Thats where I come to a stop, I dont know how to make it do that
Can any one help please ?

Whew, that's a question that is difficult to answer without just doing

the model and posting it :-).

Maybe start with creating just a cube() of the correct size based on
calculation using the variables you've described and add the drill
holes (simply though the whole cube).

Then post the code for that for discussing the next step.

ciao,
Torsten.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

Now, you posted an almost complete description of what you need. Just extract all the variables-definition from that before you start coding. Like this: ( // denotes this line to be a comment) 1) It will always have 4 bosses to screw the PCB down to and that those bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole in the middle to take a screw // boss boss_height=6; boss_diameter=6; boss_hole=2,5; Now do this for all your variables that you will need. Next step: Write modules for the single parts. You may start again with the boss: module boss(){ // now comes the real code, but I leave this for you. } 2015-03-22 14:22 GMT+01:00 Torsten Paul <Torsten.Paul@gmx.de>: > On 03/22/2015 02:01 PM, donrecardo wrote: > >> Thats where I come to a stop, I dont know how to make it do that >> Can any one help please ? >> >> Whew, that's a question that is difficult to answer without just doing > the model and posting it :-). > > Maybe start with creating just a cube() of the correct size based on > calculation using the variables you've described and add the drill > holes (simply though the whole cube). > > Then post the code for that for discussing the next step. > > ciao, > Torsten. > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
PF
Peter Falke
Sun, Mar 22, 2015 1:51 PM

Most often , I start with this INIT-file, when I code:

// Init v0_0

// GPLv2

// (c) 2015 xxx

//

// v0_1:

//

//

//

//*******************************************************

//

// basic definitions

//

//*******************************************************

// circle have $fn facets

$fn=32;

// small displacement to avoid parallel faces with zero volume

e=0.02;

// unit vectors

xaxis=[1,0,0];

yaxis=[0,1,0];

zaxis=[0,0,1];

// colors

col1="red";

col2="lime";

//*******************************************************

//

// dimensions

//

//*******************************************************

//*******************************************************

//

// modules

//

//*******************************************************

//*******************************************************

//

// main program

//

//*******************************************************

2015-03-22 14:47 GMT+01:00 Peter Falke stempeldergeschichte@googlemail.com
:

Now, you posted an almost complete description of what you need.
Just extract all the variables-definition from that before you start
coding.

Like this: ( // denotes this line to be a comment)

  1. It will always have 4 bosses to screw the PCB down to and that those
    bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole
    in the middle to
    take a screw

// boss
boss_height=6;
boss_diameter=6;
boss_hole=2,5;

Now do this for all your variables that you will need.

Next step:
Write modules for the single parts.
You may start again with the boss:

module boss(){

// now comes the real code, but I leave this for you.

}

2015-03-22 14:22 GMT+01:00 Torsten Paul Torsten.Paul@gmx.de:

On 03/22/2015 02:01 PM, donrecardo wrote:

Thats where I come to a stop, I dont know how to make it do that
Can any one help please ?

Whew, that's a question that is difficult to answer without just doing

the model and posting it :-).

Maybe start with creating just a cube() of the correct size based on
calculation using the variables you've described and add the drill
holes (simply though the whole cube).

Then post the code for that for discussing the next step.

ciao,
Torsten.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

Most often , I start with this INIT-file, when I code: // Init v0_0 // GPLv2 // (c) 2015 xxx // // v0_1: // // // //******************************************************* // // basic definitions // //******************************************************* // circle have $fn facets $fn=32; // small displacement to avoid parallel faces with zero volume e=0.02; // unit vectors xaxis=[1,0,0]; yaxis=[0,1,0]; zaxis=[0,0,1]; // colors col1="red"; col2="lime"; //******************************************************* // // dimensions // //******************************************************* //******************************************************* // // modules // //******************************************************* //******************************************************* // // main program // //******************************************************* 2015-03-22 14:47 GMT+01:00 Peter Falke <stempeldergeschichte@googlemail.com> : > Now, you posted an almost complete description of what you need. > Just extract all the variables-definition from that before you start > coding. > > Like this: ( // denotes this line to be a comment) > > 1) It will always have 4 bosses to screw the PCB down to and that those > bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole > in the middle to > take a screw > > // boss > boss_height=6; > boss_diameter=6; > boss_hole=2,5; > > Now do this for all your variables that you will need. > > Next step: > Write modules for the single parts. > You may start again with the boss: > > module boss(){ > > // now comes the real code, but I leave this for you. > > } > > 2015-03-22 14:22 GMT+01:00 Torsten Paul <Torsten.Paul@gmx.de>: > >> On 03/22/2015 02:01 PM, donrecardo wrote: >> >>> Thats where I come to a stop, I dont know how to make it do that >>> Can any one help please ? >>> >>> Whew, that's a question that is difficult to answer without just doing >> the model and posting it :-). >> >> Maybe start with creating just a cube() of the correct size based on >> calculation using the variables you've described and add the drill >> holes (simply though the whole cube). >> >> Then post the code for that for discussing the next step. >> >> ciao, >> Torsten. >> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > > -- > stempeldergeschichte@googlemail.com <karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!
RB
Richard Benjamin
Sun, Mar 22, 2015 2:24 PM

Yes Openscad can do all this.

But...Solidworks can do just what you want
too...https://www.youtube.com/watch?v=DRS6dhyvU-E

But you may well feel in control with openscad as you will be settin the
parameters up yourself before hand, and building the model using them.

On 22/03/2015 13:51, Peter Falke wrote:

Most often , I start with this INIT-file, when I code:

// Init v0_0

// GPLv2

// (c) 2015 xxx

//

// v0_1:

//

//

//

//*******************************************************

//

// basic definitions

//

//*******************************************************

// circle have $fn facets

$fn=32;

// small displacement to avoid parallel faces with zero volume

e=0.02;

// unit vectors

xaxis=[1,0,0];

yaxis=[0,1,0];

zaxis=[0,0,1];

// colors

col1="red";

col2="lime";

//*******************************************************

//

// dimensions

//

//*******************************************************

//*******************************************************

//

// modules

//

//*******************************************************

//*******************************************************

//

// main program

//

//*******************************************************

2015-03-22 14:47 GMT+01:00 Peter Falke
<stempeldergeschichte@googlemail.com
mailto:stempeldergeschichte@googlemail.com>:

 Now, you posted an almost complete description of what you need.
 Just extract all the variables-definition from that before you
 start coding.

 Like this: ( // denotes this line to be a comment)

 1) It will always have 4 bosses to screw the PCB down to and that
 those
 bosses will always be 6mm high, 6mm outside diameter and have a
 2.5mm hole
 in the middle to
    take a screw

 // boss
 boss_height=6;
 boss_diameter=6;
 boss_hole=2,5;

 Now do this for all your variables that you will need.

 Next step:
 Write modules for the single parts.
 You may start again with the boss:

 module boss(){

 // now comes the real code, but I leave this for you.

 }

 2015-03-22 14:22 GMT+01:00 Torsten Paul <Torsten.Paul@gmx.de
 <mailto:Torsten.Paul@gmx.de>>:

     On 03/22/2015 02:01 PM, donrecardo wrote:

         Thats where I come to a stop, I dont know how to make it
         do that
         Can any one help please ?

     Whew, that's a question that is difficult to answer without
     just doing
     the model and posting it :-).

     Maybe start with creating just a cube() of the correct size
     based on
     calculation using the variables you've described and add the drill
     holes (simply though the whole cube).

     Then post the code for that for discussing the next step.

     ciao,
       Torsten.



     _______________________________________________
     OpenSCAD mailing list
     Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
     http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org




 -- 
 stempeldergeschichte@googlemail.com <mailto:karsten@rohrbach.de>

 P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
 Ich probiere gerade aus kurze Antworten statt gar keine Antworten
 zu schreiben.
 Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

 P.S. In case my e-mail is shorter than you enjoy:
 I am currently trying short replies instead of no replies at all.
 Please let me know, if you like to read more.

 Enjoy!

--
stempeldergeschichte@googlemail.com mailto:karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Yes Openscad can do all this. But...Solidworks can do just what you want too...https://www.youtube.com/watch?v=DRS6dhyvU-E But you may well feel in control with openscad as you will be settin the parameters up yourself before hand, and building the model using them. On 22/03/2015 13:51, Peter Falke wrote: > Most often , I start with this INIT-file, when I code: > > // Init v0_0 > > // GPLv2 > > // (c) 2015 xxx > > // > > // v0_1: > > // > > // > > // > > > > //******************************************************* > > // > > // basic definitions > > // > > //******************************************************* > > > > // circle have $fn facets > > $fn=32; > > > // small displacement to avoid parallel faces with zero volume > > e=0.02; > > > // unit vectors > > xaxis=[1,0,0]; > > yaxis=[0,1,0]; > > zaxis=[0,0,1]; > > > // colors > > col1="red"; > > col2="lime"; > > > //******************************************************* > > // > > // dimensions > > // > > //******************************************************* > > > > > //******************************************************* > > // > > // modules > > // > > //******************************************************* > > > > > //******************************************************* > > // > > // main program > > // > > //******************************************************* > > > > > > > 2015-03-22 14:47 GMT+01:00 Peter Falke > <stempeldergeschichte@googlemail.com > <mailto:stempeldergeschichte@googlemail.com>>: > > Now, you posted an almost complete description of what you need. > Just extract all the variables-definition from that before you > start coding. > > Like this: ( // denotes this line to be a comment) > > 1) It will always have 4 bosses to screw the PCB down to and that > those > bosses will always be 6mm high, 6mm outside diameter and have a > 2.5mm hole > in the middle to > take a screw > > // boss > boss_height=6; > boss_diameter=6; > boss_hole=2,5; > > Now do this for all your variables that you will need. > > Next step: > Write modules for the single parts. > You may start again with the boss: > > module boss(){ > > // now comes the real code, but I leave this for you. > > } > > 2015-03-22 14:22 GMT+01:00 Torsten Paul <Torsten.Paul@gmx.de > <mailto:Torsten.Paul@gmx.de>>: > > On 03/22/2015 02:01 PM, donrecardo wrote: > > Thats where I come to a stop, I dont know how to make it > do that > Can any one help please ? > > Whew, that's a question that is difficult to answer without > just doing > the model and posting it :-). > > Maybe start with creating just a cube() of the correct size > based on > calculation using the variables you've described and add the drill > holes (simply though the whole cube). > > Then post the code for that for discussing the next step. > > ciao, > Torsten. > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > > > -- > stempeldergeschichte@googlemail.com <mailto:karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten > zu schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > > > > > -- > stempeldergeschichte@googlemail.com <mailto:karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
TH
Tim Hawkins
Sun, Mar 22, 2015 2:31 PM

Openscad will do it at negligable cost, solidworks, well hmmm, i tried to
get a quote and they stopped talking to me when they realised i was not a
commercial company.

On Sun, Mar 22, 2015, 22:24 Richard Benjamin richard@digicalm.com wrote:

Yes Openscad can do all this.

But...Solidworks can do just what you want too...
https://www.youtube.com/watch?v=DRS6dhyvU-E

But you may well feel in control with openscad as you will be settin the
parameters up yourself before hand, and building the model using them.

On 22/03/2015 13:51, Peter Falke wrote:

Most often , I start with this INIT-file, when I code:

// Init v0_0

// GPLv2

// (c) 2015 xxx

//

// v0_1:

//

//

//

//*******************************************************

//

// basic definitions

//

//*******************************************************

// circle have $fn facets

$fn=32;

// small displacement to avoid parallel faces with zero volume

e=0.02;

// unit vectors

xaxis=[1,0,0];

yaxis=[0,1,0];

zaxis=[0,0,1];

// colors

col1="red";

col2="lime";

//*******************************************************

//

// dimensions

//

//*******************************************************

//*******************************************************

//

// modules

//

//*******************************************************

//*******************************************************

//

// main program

//

//*******************************************************

2015-03-22 14:47 GMT+01:00 Peter Falke <
stempeldergeschichte@googlemail.com>:

Now, you posted an almost complete description of what you need.

Just extract all the variables-definition from that before you start
coding.

Like this: ( // denotes this line to be a comment)

  1. It will always have 4 bosses to screw the PCB down to and that those
    bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole
    in the middle to
    take a screw

// boss
boss_height=6;
boss_diameter=6;
boss_hole=2,5;

Now do this for all your variables that you will need.

Next step:
Write modules for the single parts.
You may start again with the boss:

module boss(){

// now comes the real code, but I leave this for you.

}

2015-03-22 14:22 GMT+01:00 Torsten Paul Torsten.Paul@gmx.de:

On 03/22/2015 02:01 PM, donrecardo wrote:

Thats where I come to a stop, I dont know how to make it do that
Can any one help please ?

Whew, that's a question that is difficult to answer without just doing

the model and posting it :-).

Maybe start with creating just a cube() of the correct size based on
calculation using the variables you've described and add the drill
holes (simply though the whole cube).

Then post the code for that for discussing the next step.

ciao,
Torsten.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing listDiscuss@lists.openscad.orghttp://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Openscad will do it at negligable cost, solidworks, well hmmm, i tried to get a quote and they stopped talking to me when they realised i was not a commercial company. On Sun, Mar 22, 2015, 22:24 Richard Benjamin <richard@digicalm.com> wrote: > Yes Openscad can do all this. > > But...Solidworks can do just what you want too... > https://www.youtube.com/watch?v=DRS6dhyvU-E > > But you may well feel in control with openscad as you will be settin the > parameters up yourself before hand, and building the model using them. > > > > > On 22/03/2015 13:51, Peter Falke wrote: > > Most often , I start with this INIT-file, when I code: > > // Init v0_0 > > // GPLv2 > > // (c) 2015 xxx > > // > > // v0_1: > > // > > // > > // > > > > //******************************************************* > > // > > // basic definitions > > // > > //******************************************************* > > > > // circle have $fn facets > > $fn=32; > > > // small displacement to avoid parallel faces with zero volume > > e=0.02; > > > // unit vectors > > xaxis=[1,0,0]; > > yaxis=[0,1,0]; > > zaxis=[0,0,1]; > > > // colors > > col1="red"; > > col2="lime"; > > > //******************************************************* > > // > > // dimensions > > // > > //******************************************************* > > > > > //******************************************************* > > // > > // modules > > // > > //******************************************************* > > > > > //******************************************************* > > // > > // main program > > // > > //******************************************************* > > > > > > > 2015-03-22 14:47 GMT+01:00 Peter Falke < > stempeldergeschichte@googlemail.com>: > >> Now, you posted an almost complete description of what you need. >> Just extract all the variables-definition from that before you start >> coding. >> >> Like this: ( // denotes this line to be a comment) >> >> 1) It will always have 4 bosses to screw the PCB down to and that those >> bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm hole >> in the middle to >> take a screw >> >> // boss >> boss_height=6; >> boss_diameter=6; >> boss_hole=2,5; >> >> Now do this for all your variables that you will need. >> >> Next step: >> Write modules for the single parts. >> You may start again with the boss: >> >> module boss(){ >> >> // now comes the real code, but I leave this for you. >> >> } >> >> 2015-03-22 14:22 GMT+01:00 Torsten Paul <Torsten.Paul@gmx.de>: >> >>> On 03/22/2015 02:01 PM, donrecardo wrote: >>> >>>> Thats where I come to a stop, I dont know how to make it do that >>>> Can any one help please ? >>>> >>>> Whew, that's a question that is difficult to answer without just doing >>> the model and posting it :-). >>> >>> Maybe start with creating just a cube() of the correct size based on >>> calculation using the variables you've described and add the drill >>> holes (simply though the whole cube). >>> >>> Then post the code for that for discussing the next step. >>> >>> ciao, >>> Torsten. >>> >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >> >> >> >> -- >> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >> >> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >> schreiben. >> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >> >> P.S. In case my e-mail is shorter than you enjoy: >> I am currently trying short replies instead of no replies at all. >> Please let me know, if you like to read more. >> >> Enjoy! >> > > > > -- > stempeldergeschichte@googlemail.com <karsten@rohrbach.de> > > P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: > Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu > schreiben. > Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. > > P.S. In case my e-mail is shorter than you enjoy: > I am currently trying short replies instead of no replies at all. > Please let me know, if you like to read more. > > Enjoy! > > > _______________________________________________ > OpenSCAD mailing listDiscuss@lists.openscad.orghttp://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
DV
david vanhorn
Sun, Mar 22, 2015 3:11 PM

Hey there brother!  I too am an EE, and I just did this.

You are so very close.

Here's what I did:  I created a file using modules. A module for a test
point hole, a module for a screw post, a module for a PCB recess, and so
on.
In the end, I have an object which is built from differences and unions.

I will PM you those files, nothing proprietary there.  I think you'll find
them useful.

On Sun, Mar 22, 2015 at 8:31 AM, Tim Hawkins tim.thawkins@gmail.com wrote:

Openscad will do it at negligable cost, solidworks, well hmmm, i tried to
get a quote and they stopped talking to me when they realised i was not a
commercial company.

On Sun, Mar 22, 2015, 22:24 Richard Benjamin richard@digicalm.com wrote:

Yes Openscad can do all this.

But...Solidworks can do just what you want too...
https://www.youtube.com/watch?v=DRS6dhyvU-E

But you may well feel in control with openscad as you will be settin the
parameters up yourself before hand, and building the model using them.

On 22/03/2015 13:51, Peter Falke wrote:

Most often , I start with this INIT-file, when I code:

// Init v0_0

// GPLv2

// (c) 2015 xxx

//

// v0_1:

//

//

//

//*******************************************************

//

// basic definitions

//

//*******************************************************

// circle have $fn facets

$fn=32;

// small displacement to avoid parallel faces with zero volume

e=0.02;

// unit vectors

xaxis=[1,0,0];

yaxis=[0,1,0];

zaxis=[0,0,1];

// colors

col1="red";

col2="lime";

//*******************************************************

//

// dimensions

//

//*******************************************************

//*******************************************************

//

// modules

//

//*******************************************************

//*******************************************************

//

// main program

//

//*******************************************************

2015-03-22 14:47 GMT+01:00 Peter Falke <
stempeldergeschichte@googlemail.com>:

Now, you posted an almost complete description of what you need.

Just extract all the variables-definition from that before you start
coding.

Like this: ( // denotes this line to be a comment)

  1. It will always have 4 bosses to screw the PCB down to and that those
    bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm
    hole
    in the middle to
    take a screw

// boss
boss_height=6;
boss_diameter=6;
boss_hole=2,5;

Now do this for all your variables that you will need.

Next step:
Write modules for the single parts.
You may start again with the boss:

module boss(){

// now comes the real code, but I leave this for you.

}

2015-03-22 14:22 GMT+01:00 Torsten Paul Torsten.Paul@gmx.de:

On 03/22/2015 02:01 PM, donrecardo wrote:

Thats where I come to a stop, I dont know how to make it do that
Can any one help please ?

Whew, that's a question that is difficult to answer without just

doing
the model and posting it :-).

Maybe start with creating just a cube() of the correct size based on
calculation using the variables you've described and add the drill
holes (simply though the whole cube).

Then post the code for that for discussing the next step.

ciao,
Torsten.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!


OpenSCAD mailing listDiscuss@lists.openscad.orghttp://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Hey there brother! I too am an EE, and I just did this. You are so very close. Here's what I did: I created a file using modules. A module for a test point hole, a module for a screw post, a module for a PCB recess, and so on. In the end, I have an object which is built from differences and unions. I will PM you those files, nothing proprietary there. I think you'll find them useful. On Sun, Mar 22, 2015 at 8:31 AM, Tim Hawkins <tim.thawkins@gmail.com> wrote: > Openscad will do it at negligable cost, solidworks, well hmmm, i tried to > get a quote and they stopped talking to me when they realised i was not a > commercial company. > > On Sun, Mar 22, 2015, 22:24 Richard Benjamin <richard@digicalm.com> wrote: > >> Yes Openscad can do all this. >> >> But...Solidworks can do just what you want too... >> https://www.youtube.com/watch?v=DRS6dhyvU-E >> >> But you may well feel in control with openscad as you will be settin the >> parameters up yourself before hand, and building the model using them. >> >> >> >> >> On 22/03/2015 13:51, Peter Falke wrote: >> >> Most often , I start with this INIT-file, when I code: >> >> // Init v0_0 >> >> // GPLv2 >> >> // (c) 2015 xxx >> >> // >> >> // v0_1: >> >> // >> >> // >> >> // >> >> >> >> //******************************************************* >> >> // >> >> // basic definitions >> >> // >> >> //******************************************************* >> >> >> >> // circle have $fn facets >> >> $fn=32; >> >> >> // small displacement to avoid parallel faces with zero volume >> >> e=0.02; >> >> >> // unit vectors >> >> xaxis=[1,0,0]; >> >> yaxis=[0,1,0]; >> >> zaxis=[0,0,1]; >> >> >> // colors >> >> col1="red"; >> >> col2="lime"; >> >> >> //******************************************************* >> >> // >> >> // dimensions >> >> // >> >> //******************************************************* >> >> >> >> >> //******************************************************* >> >> // >> >> // modules >> >> // >> >> //******************************************************* >> >> >> >> >> //******************************************************* >> >> // >> >> // main program >> >> // >> >> //******************************************************* >> >> >> >> >> >> >> 2015-03-22 14:47 GMT+01:00 Peter Falke < >> stempeldergeschichte@googlemail.com>: >> >>> Now, you posted an almost complete description of what you need. >>> Just extract all the variables-definition from that before you start >>> coding. >>> >>> Like this: ( // denotes this line to be a comment) >>> >>> 1) It will always have 4 bosses to screw the PCB down to and that those >>> bosses will always be 6mm high, 6mm outside diameter and have a 2.5mm >>> hole >>> in the middle to >>> take a screw >>> >>> // boss >>> boss_height=6; >>> boss_diameter=6; >>> boss_hole=2,5; >>> >>> Now do this for all your variables that you will need. >>> >>> Next step: >>> Write modules for the single parts. >>> You may start again with the boss: >>> >>> module boss(){ >>> >>> // now comes the real code, but I leave this for you. >>> >>> } >>> >>> 2015-03-22 14:22 GMT+01:00 Torsten Paul <Torsten.Paul@gmx.de>: >>> >>>> On 03/22/2015 02:01 PM, donrecardo wrote: >>>> >>>>> Thats where I come to a stop, I dont know how to make it do that >>>>> Can any one help please ? >>>>> >>>>> Whew, that's a question that is difficult to answer without just >>>> doing >>>> the model and posting it :-). >>>> >>>> Maybe start with creating just a cube() of the correct size based on >>>> calculation using the variables you've described and add the drill >>>> holes (simply though the whole cube). >>>> >>>> Then post the code for that for discussing the next step. >>>> >>>> ciao, >>>> Torsten. >>>> >>>> >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> Discuss@lists.openscad.org >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>>> >>> >>> >>> >>> -- >>> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >>> >>> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >>> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >>> schreiben. >>> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >>> >>> P.S. In case my e-mail is shorter than you enjoy: >>> I am currently trying short replies instead of no replies at all. >>> Please let me know, if you like to read more. >>> >>> Enjoy! >>> >> >> >> >> -- >> stempeldergeschichte@googlemail.com <karsten@rohrbach.de> >> >> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: >> Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu >> schreiben. >> Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. >> >> P.S. In case my e-mail is shorter than you enjoy: >> I am currently trying short replies instead of no replies at all. >> Please let me know, if you like to read more. >> >> Enjoy! >> >> >> _______________________________________________ >> OpenSCAD mailing listDiscuss@lists.openscad.orghttp://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
D
donrecardo
Sun, Mar 22, 2015 3:28 PM

Thanks everyone for the replies, I can see a lot of useful stuff in there

I wasnt expecting so many replies so quickly so after the first one began
trying to write some code
which of course does not work

its not as neat or structured as some of the replies but I will try to get
better  now thay I have some tips from you

I began setting out variables for the dimensions that the mounting holes are
placed at ,  the depth of the box  and the thickness of the walls, these are
the variables the user would change to suit their needs
from these and the fixed constraints like the board is 3mm from the box
and the holes 4mm in from the edge of the board I was able to calculate the
other variables

I made a module to create a cube the size of the outside  ... box_outer()
I made a module to create a cube the size of the inside    ... box_inner()
I made a module that takes the inner cube from the outer cube using
difference  ... box()

but when I run it it tells me I have a recursion error , but I dont know why

I will try and attach my code if I can find out how

Cheers for the help
Don
PCB_Box.scad http://forum.openscad.org/file/n12126/PCB_Box.scad

--
View this message in context: http://forum.openscad.org/Beginner-needs-help-with-project-tp12117p12126.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thanks everyone for the replies, I can see a lot of useful stuff in there I wasnt expecting so many replies so quickly so after the first one began trying to write some code which of course does not work its not as neat or structured as some of the replies but I will try to get better now thay I have some tips from you I began setting out variables for the dimensions that the mounting holes are placed at , the depth of the box and the thickness of the walls, these are the variables the user would change to suit their needs from these and the fixed constraints like the board is 3mm from the box and the holes 4mm in from the edge of the board I was able to calculate the other variables I made a module to create a cube the size of the outside ... box_outer() I made a module to create a cube the size of the inside ... box_inner() I made a module that takes the inner cube from the outer cube using difference ... box() but when I run it it tells me I have a recursion error , but I dont know why I will try and attach my code if I can find out how Cheers for the help Don PCB_Box.scad <http://forum.openscad.org/file/n12126/PCB_Box.scad> -- View this message in context: http://forum.openscad.org/Beginner-needs-help-with-project-tp12117p12126.html Sent from the OpenSCAD mailing list archive at Nabble.com.
GW
G. Wade Johnson
Sun, Mar 22, 2015 3:51 PM

On Sun, 22 Mar 2015 08:28:20 -0700 (MST)
donrecardo don@crystal-computing.co.uk wrote:

Thanks everyone for the replies, I can see a lot of useful stuff in
there

I wasnt expecting so many replies so quickly so after the first one
began trying to write some code
which of course does not work

its not as neat or structured as some of the replies but I will try
to get better  now thay I have some tips from you

I began setting out variables for the dimensions that the mounting
holes are placed at ,  the depth of the box  and the thickness of the
walls, these are the variables the user would change to suit their
needs from these and the fixed constraints like the board is 3mm from
the box and the holes 4mm in from the edge of the board I was able to
calculate the other variables

I made a module to create a cube the size of the outside  ...
box_outer() I made a module to create a cube the size of the
inside    ... box_inner() I made a module that takes the inner cube
from the outer cube using difference  ... box()

but when I run it it tells me I have a recursion error , but I dont
know why

You have the outer_box() module calling outer_box() as the last step,
and the same problem with inner_box() and box().

Leave off the code that calls the module inside itself and the
recursion error will go away.

G. Wade

I will try and attach my code if I can find out how

Cheers for the help
Don
PCB_Box.scad http://forum.openscad.org/file/n12126/PCB_Box.scad

--
View this message in context:
http://forum.openscad.org/Beginner-needs-help-with-project-tp12117p12126.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
All things are difficult before they are easy.    -- Thomas Fuller

On Sun, 22 Mar 2015 08:28:20 -0700 (MST) donrecardo <don@crystal-computing.co.uk> wrote: > Thanks everyone for the replies, I can see a lot of useful stuff in > there > > I wasnt expecting so many replies so quickly so after the first one > began trying to write some code > which of course does not work > > its not as neat or structured as some of the replies but I will try > to get better now thay I have some tips from you > > I began setting out variables for the dimensions that the mounting > holes are placed at , the depth of the box and the thickness of the > walls, these are the variables the user would change to suit their > needs from these and the fixed constraints like the board is 3mm from > the box and the holes 4mm in from the edge of the board I was able to > calculate the other variables > > I made a module to create a cube the size of the outside ... > box_outer() I made a module to create a cube the size of the > inside ... box_inner() I made a module that takes the inner cube > from the outer cube using difference ... box() > > but when I run it it tells me I have a recursion error , but I dont > know why You have the outer_box() module calling outer_box() as the last step, and the same problem with inner_box() and box(). Leave off the code that calls the module inside itself and the recursion error will go away. G. Wade > I will try and attach my code if I can find out how > > Cheers for the help > Don > PCB_Box.scad <http://forum.openscad.org/file/n12126/PCB_Box.scad> > > > > -- > View this message in context: > http://forum.openscad.org/Beginner-needs-help-with-project-tp12117p12126.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- All things are difficult before they are easy. -- Thomas Fuller
PF
Peter Falke
Sun, Mar 22, 2015 4:17 PM

module outer_box() {
cube([ outer_x , outer_y, outer_depth]);
outer_box(); //<---- delete me !!!
}

2015-03-22 16:51 GMT+01:00 G. Wade Johnson gwadej@anomaly.org:

On Sun, 22 Mar 2015 08:28:20 -0700 (MST)
donrecardo don@crystal-computing.co.uk wrote:

Thanks everyone for the replies, I can see a lot of useful stuff in
there

I wasnt expecting so many replies so quickly so after the first one
began trying to write some code
which of course does not work

its not as neat or structured as some of the replies but I will try
to get better  now thay I have some tips from you

I began setting out variables for the dimensions that the mounting
holes are placed at ,  the depth of the box  and the thickness of the
walls, these are the variables the user would change to suit their
needs from these and the fixed constraints like the board is 3mm from
the box and the holes 4mm in from the edge of the board I was able to
calculate the other variables

I made a module to create a cube the size of the outside  ...
box_outer() I made a module to create a cube the size of the
inside    ... box_inner() I made a module that takes the inner cube
from the outer cube using difference  ... box()

but when I run it it tells me I have a recursion error , but I dont
know why

You have the outer_box() module calling outer_box() as the last step,
and the same problem with inner_box() and box().

Leave off the code that calls the module inside itself and the
recursion error will go away.

G. Wade

I will try and attach my code if I can find out how

Cheers for the help
Don
PCB_Box.scad http://forum.openscad.org/file/n12126/PCB_Box.scad

--
View this message in context:

Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
All things are difficult before they are easy.    -- Thomas Fuller


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

--
stempeldergeschichte@googlemail.com karsten@rohrbach.de

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!

module outer_box() { cube([ outer_x , outer_y, outer_depth]); outer_box(); //<---- delete me !!! } 2015-03-22 16:51 GMT+01:00 G. Wade Johnson <gwadej@anomaly.org>: > On Sun, 22 Mar 2015 08:28:20 -0700 (MST) > donrecardo <don@crystal-computing.co.uk> wrote: > > > Thanks everyone for the replies, I can see a lot of useful stuff in > > there > > > > I wasnt expecting so many replies so quickly so after the first one > > began trying to write some code > > which of course does not work > > > > its not as neat or structured as some of the replies but I will try > > to get better now thay I have some tips from you > > > > I began setting out variables for the dimensions that the mounting > > holes are placed at , the depth of the box and the thickness of the > > walls, these are the variables the user would change to suit their > > needs from these and the fixed constraints like the board is 3mm from > > the box and the holes 4mm in from the edge of the board I was able to > > calculate the other variables > > > > I made a module to create a cube the size of the outside ... > > box_outer() I made a module to create a cube the size of the > > inside ... box_inner() I made a module that takes the inner cube > > from the outer cube using difference ... box() > > > > but when I run it it tells me I have a recursion error , but I dont > > know why > > You have the outer_box() module calling outer_box() as the last step, > and the same problem with inner_box() and box(). > > Leave off the code that calls the module inside itself and the > recursion error will go away. > > G. Wade > > > I will try and attach my code if I can find out how > > > > Cheers for the help > > Don > > PCB_Box.scad <http://forum.openscad.org/file/n12126/PCB_Box.scad> > > > > > > > > -- > > View this message in context: > > > http://forum.openscad.org/Beginner-needs-help-with-project-tp12117p12126.html > > Sent from the OpenSCAD mailing list archive at Nabble.com. > > > > _______________________________________________ > > OpenSCAD mailing list > > Discuss@lists.openscad.org > > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > -- > All things are difficult before they are easy. -- Thomas Fuller > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- stempeldergeschichte@googlemail.com <karsten@rohrbach.de> P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben. Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen. P.S. In case my e-mail is shorter than you enjoy: I am currently trying short replies instead of no replies at all. Please let me know, if you like to read more. Enjoy!