Nabble has removed Mailing-list integration.
Posts created here DO NOT GET SENT TO THE MAILING LIST.
Mailing-list emails DO NOT GET POSTED TO THE FORUM.
So basically the Forum is now out of date, we are looking into migrating the history.
The 2021 release allows the insertion of code snippets. I can't find any information in the docs about this other that to use alt-ins to insert a snippet. Some questions.
1) The option key on the mac subs for alt, but where is the ins(ert?) key? 2) How do I create a new snippet? 3) How do I edit an existing snippet? -Bob Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
On 18.05.21 03:14, rjcarlson49 wrote:
> 1) The option key on the mac subs for alt, but where is the > ins(ert?) key? No idea where that key is on Mac, but the code snippets can be also inserted via context menu (normally right click in the editor, wherever that is on Mac, probably CTRL+Click?) > 2) How do I create a new snippet? There's no GUI for that yet. Maybe that will happen at some point but right now it's all manual work. 1) Go to config directory (create if it does not exist) The folder name can be found in Help->Library Info->User Config Path 2) Create a subfolder called "templates" 3) Create a text file with extension .json, for example: File name: points.json Content: { "key" : "points", "content" : "points = [ for (a = [0:5:359]) 1^~^ * [ -sin(x), cos(x) ] ]" } The 3 chars ^~^ indicate where the cursor will end up after the text was inserted at the current cursor location. > 3) How do I edit an existing snippet? Those are stored in the Application Bundle, so it might be possible to edit those by "Show Package Content" and going into the Contents/Resources/templates folder. I'm not sure if that's a good option though. For reference the files shipped in the application are: https://github.com/openscad/openscad/tree/master/templates ciao, Torsten. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
-- Torsten
|
https://www.passfab.com/mac/insert-key-on-macbook-keyboard.html
> -----Original Message----- > From: Torsten Paul [mailto:[hidden email]] > Sent: Sun, 23 May 2021 10:45 > To: [hidden email] > Subject: [OpenSCAD] Re: How do I edit/create code snippets? > > On 18.05.21 03:14, rjcarlson49 wrote: > > 1) The option key on the mac subs for alt, but where is the > > ins(ert?) key? > > No idea where that key is on Mac, but the code snippets can > be also inserted via context menu (normally right click in > the editor, wherever that is on Mac, probably CTRL+Click?) > > > 2) How do I create a new snippet? > > There's no GUI for that yet. Maybe that will happen at some > point but right now it's all manual work. > > 1) Go to config directory (create if it does not exist) > > The folder name can be found in Help->Library Info->User > Config Path > > 2) Create a subfolder called "templates" > > 3) Create a text file with extension .json, for example: > > File name: points.json > Content: > { > "key" : "points", > "content" : "points = [ for (a = [0:5:359]) 1^~^ * [ -sin(x), cos(x) ] ]" > } > > The 3 chars ^~^ indicate where the cursor will end up > after the text was inserted at the current cursor location. > > > 3) How do I edit an existing snippet? > > Those are stored in the Application Bundle, so it might be > possible to edit those by "Show Package Content" and going > into the Contents/Resources/templates folder. I'm not sure > if that's a good option though. > > For reference the files shipped in the application are: > https://github.com/openscad/openscad/tree/master/templates > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to [hidden email] -- This email has been checked for viruses by AVG. https://www.avg.com _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by tp3
Thanks. That should be documented somewhere.
I would suggest first of all, that all templates include vectors with numbers. This is much quicker in the long run. Even when typing I do that. I type translate([0, 0, 0]), then edit. For multmatrix I would make it multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]]). That’s a good starting point for that function. Second, perhaps this is already how it works, but allow templates in the library to replace the built in ones. It would make for less confusion. Also, in the Mac editor UI, option-leftarrow should go left one word, but it does not. This is basic mac text editing. And option-rightarrow does the “right” thing. -Bob Tucson AZ On May 22, 2021, at 17:45, Torsten Paul <[hidden email]> wrote: On 18.05.21 03:14, rjcarlson49 wrote: > 1) The option key on the mac subs for alt, but where is the > ins(ert?) key? No idea where that key is on Mac, but the code snippets can be also inserted via context menu (normally right click in the editor, wherever that is on Mac, probably CTRL+Click?) > 2) How do I create a new snippet? There's no GUI for that yet. Maybe that will happen at some point but right now it's all manual work. 1) Go to config directory (create if it does not exist) The folder name can be found in Help->Library Info->User Config Path 2) Create a subfolder called "templates" 3) Create a text file with extension .json, for example: File name: points.json Content: { "key" : "points", "content" : "points = [ for (a = [0:5:359]) 1^~^ * [ -sin(x), cos(x) ] ]" } The 3 chars ^~^ indicate where the cursor will end up after the text was inserted at the current cursor location. > 3) How do I edit an existing snippet? Those are stored in the Application Bundle, so it might be possible to edit those by "Show Package Content" and going into the Contents/Resources/templates folder. I'm not sure if that's a good option though. For reference the files shipped in the application are: https://github.com/openscad/openscad/tree/master/templates ciao, Torsten. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Administrator
|
The OpenSCAD Manual Wiki is editable by anyone ;) There doesn't seem to be a section this info would slot into, so if anyone wants to add this info, I'd do it in FAQ for now. There is a bunch of similar config details that need documenting, color schemes, registry (and *nix equiv.) etc. This is a very personal matter of taste, I would (and have in Notepad++) use <KeyWord name="translate (["/> So from there I just type e,g, "somevar.x, somevar.y, -1] ) " then follow on e.g. "cu" for a cube. +1, if it doesn't now, they are in the template subdir where the .exe lives (e.g. 'My programs' for Windows). Bob, would you be able to check the Keyboard info on GitHub from a Mac users perspective? No need to edit it, just note anything here and I'll update it.
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. |
I looked at it, but it will take some time to do it right.
First thing I noticed though is that on a Mac, there is a control key. ctrl should equal control not command. When the semantics exist on a mac like undo, cut, copy, paste the Mac shortcuts should always be used. So those four are command-z, -x, -c, -v, even though those use control- on the PC. Perhaps the problem is just the presentation. Better I think would be a table with rows consisting of <action> <pc shortcut> <mac shortcut> <linux shortcut>. Is there a Linux version? Second, the entire "Mac only navigation shortcuts” should probably be eliminated. AFAIK these are in no way mac standard and no one would use them. -Bob Tucson AZ Bob, would you be able to check the Keyboard info on GitHub from a Mac users perspective? No need to edit it, just note anything here and I'll update it.
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Administrator
|
Sorry Bob, I wrote the first bits, where I
included this at the top, 'C - Ctrl (Cmd on Mac) ' 'M - Ctrl on Mac
(Windows/Meta key on others) ' I should have mentioned that. I did that as the GitHub Wiki is written
from a developer's perspective, and so in Qt context, where: 'Each key code consists of a
single Qt::Key value and
zero or more modifiers, such as Qt::SHIFT, Qt::CTRL, Qt::ALT and Qt::META.' 'On macOS, the appropriate
symbols are used to describe keyboard shortcuts using special keys on the
Macintosh keyboard.' & 'Note: On macOS, references to "Ctrl", Qt::CTRL, Qt::Key_Control and Qt::ControlModifier
correspond to the Command keys on
the Macintosh keyboard, and references to "Meta", Qt::META, Qt::Key_Meta and Qt::MetaModifier
correspond to the Control keys.
Developers on macOS can use the same shortcut descriptions across all
platforms, and their applications will automatically work as expected on macOS.' So in Function Shortcuts
Key Modifier
Function Notes ... C C Copy selection V C Paste X C Cut selection Modifier 'C' means Command on Mac, but is technically
in Qt is CTRL, and 'M' In that context, I think the functions
match. Don't worry about it if you don't want to
do that mental translation. Re 'the entire "Mac
only navigation shortcuts” should probably be eliminated. AFAIK these are in no
way mac standard' they are listed in https://support.apple.com/en-us/HT201236,
is that out of date? Michael. From:
Bob Carlson [mailto:[hidden email]] I looked at it, but it will take some time to do it right. First thing I noticed though is that on a Mac, there is a control key.
ctrl should equal control not command. When the semantics exist on a mac like
undo, cut, copy, paste the Mac shortcuts should always be used. So those four
are command-z, -x, -c, -v, even though those use control- on the PC. Perhaps
the problem is just the presentation. Better I think would be a table with rows
consisting of <action> <pc shortcut> <mac shortcut> <linux
shortcut>. Is there a Linux version? Second, the entire "Mac only navigation shortcuts” should probably
be eliminated. AFAIK these are in no way mac standard and no one would use
them.
Bob, would you be able to
check the Keyboard info on GitHub from a Mac users
perspective? OpenSCAD Admin - email*
me if you need anything, or if I've done something stupid... Sent from the OpenSCAD mailing
list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. |
In reply to this post by tp3
I have a bunch of templates set up now. They work fine. (For clarification, I’m talking MAC here.)
1) I can’t set up a keyboard shortcut for Insert Template because that command does not exist in the menu tree. Apparently context menu items cannot be keyboard shortcutted. I verified this by tying the key to another command in the Edit menu and it works perfectly. Please just put Insert Template somewhere in the menu tree. 2) It would be WAY easier to maintain if you allowed an array of templates in a single file instead of requiring a single file for each template. 3) User templates do not replace the built in templates. Just the opposite. If I create a transfer template, it does not appear at all and the built in template is the only one available. I believe it would be better to reverse that. 4) I notice that option-left and option-right now work. Maybe I was mistaken before. However, shift-option-left and shift-option-right are supposed to extend the selection one word to the left or right. That is NOT working. 5) There was no OpenSCAD folder in …/Library/Application Support/. I had to create OpenSCAD/ and OpenSCAD/templates/. -Bob Tucson AZ On May 22, 2021, at 17:45, Torsten Paul <[hidden email]> wrote: On 18.05.21 03:14, rjcarlson49 wrote: > 1) The option key on the mac subs for alt, but where is the > ins(ert?) key? No idea where that key is on Mac, but the code snippets can be also inserted via context menu (normally right click in the editor, wherever that is on Mac, probably CTRL+Click?) > 2) How do I create a new snippet? There's no GUI for that yet. Maybe that will happen at some point but right now it's all manual work. 1) Go to config directory (create if it does not exist) The folder name can be found in Help->Library Info->User Config Path 2) Create a subfolder called "templates" 3) Create a text file with extension .json, for example: File name: points.json Content: { "key" : "points", "content" : "points = [ for (a = [0:5:359]) 1^~^ * [ -sin(x), cos(x) ] ]" } The 3 chars ^~^ indicate where the cursor will end up after the text was inserted at the current cursor location. > 3) How do I edit an existing snippet? Those are stored in the Application Bundle, so it might be possible to edit those by "Show Package Content" and going into the Contents/Resources/templates folder. I'm not sure if that's a good option though. For reference the files shipped in the application are: https://github.com/openscad/openscad/tree/master/templates ciao, Torsten. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Dear friends
I found many libraries for modelling srews and bolts. As my requirements are really very low and as I am not a screw specialist who is willing to re-invent the circle Iḿ looking for a small library only for modelling M2-M6 threads/bolts... any recommendations? BR Karl _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Not really a small library but you can use a small part of it: https://github.com/nophead/NopSCADlib#screws ![]() On Tue, 8 Jun 2021 at 09:26, Karl Exler <[hidden email]> wrote: Dear friends _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
hm... something less experienced???
Am 08.06.21 um 10:39 schrieb nop head:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
I'm far from an OpenSCAD wizard and have used Dan's library to great results:
On Tuesday, June 8, 2021, 4:48:11 AM EDT, Karl Exler <[hidden email]> wrote:
hm... something less experienced???
Am 08.06.21 um 10:39 schrieb nop head:
Not really a small library but you can use a small
part of it: https://github.com/nophead/NopSCADlib#screws
![]() On Tue, 8 Jun 2021 at 09:26,
Karl Exler [hidden email] wrote:
Dear friends _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
could you please send me one small file, which works on my
OpenScad-Installation, where I can see the syntax and the stuff with INCLUDE ? Please. e.g. making an M8 screw and/or a M8 bolt.. That would be great thank you very much in advance Karl Am 08.06.21 um 11:08 schrieb fred via Discuss: > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by Karl Exler
If you are Ok to finish threads with metal instrument after printing then https://www.thingiverse.com/thing:2989174
is probably the smallest one :-) From: Karl Exler <[hidden email]>
Sent: 08 June 2021 11:26:06 To: [hidden email] Subject: [OpenSCAD] Metric screws and bolts Dear friends
I found many libraries for modelling srews and bolts. As my requirements are really very low and as I am not a screw specialist who is willing to re-invent the circle Iḿ looking for a small library only for modelling M2-M6 threads/bolts... any recommendations? BR Karl _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by Karl Exler
//twist nut 8mm blank
include<NopSCADlib/utils/thread.scad> //module male_metric_thread(d, pitch, length, center = true, top = -1, bot = -1, solid = true, colour = undef) { //! Create male thread with metric profile translate([0,0,10]) difference(){ union(){ translate ([0,0, 5]) sphere( 12); scale([1.5,1,1])translate ([0,0,-5]) rotate ([90,0,0]) cylinder(h=3,d=15,center=true); cylinder (h=20,d=16,center=true); } male_metric_thread(8,1.25,21); translate([0,0,-60]) cube([100,100,100],true); //chop off bottom } $fn=80; fyi,well worth looking at NopSCADlib hth On 08/06/2021 10:49, Karl Exler wrote: > could you please send me one small file, which works on my > OpenScad-Installation, where I can see the syntax and the stuff with > INCLUDE ? Please. > > e.g. making an M8 screw and/or a M8 bolt.. > > > That would be great > > thank you very much in advance > > Karl > > Am 08.06.21 um 11:08 schrieb fred via Discuss: >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to [hidden email] > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to [hidden email] OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by nophead
Nop Head, I looked at the readme.md,
This looks like real high quality
mechanical and electronic components Model library.
Very good to know where to look for
these now!
Also very cool to have a BOM and .stl
build system in Python
Thanks for sharing great Work.
PeterOn 08.06.21 10:39, nop head wrote:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Thanks Yes, most libraries are more concentrated on making printed parts using complex maths. My library is mainly for making accurate assembly views to make sure my printed parts fit around them. Nearly every project I build adds more parts to it. I am currently working on this perf board assembly: ![]() and another user of the library made this cute printer with it. https://github.com/martinbudden/BabyCube/tree/main/BC200 ![]()
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
can not imagine this is all Openscad.
Awesome! Things went very far way.
p.s: i see you like
Wemos-like-ESP-boards too :)
I see your approach now, i also had to
somehow model the environment/assemblies several times, though
rarely so precise, as you do.
very impressive.
Can't imagine how much work the printer
was.
Is it near-real-time animatable?
never!
On 08.06.21 19:02, nop head wrote:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
I imagine the preview can be panned and rotated in near real time with the vertex buffer options turned on but for an actual animation with the axes moving I would expect it needs to be recorded as a video and played back faster.
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by mondo
D: Just tried that and get the error shown on line 5:
![]() Terry Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Free forum by Nabble | Edit this page |