Nabble removed Mailing-list integration from the Forum.
This killed the Forum. This is now an ARCHIVE.
It is likely Nabble will shutdown in the future.
While continuing my learning on how to use libraries, I've opened the file washer.scad from the library NopSCADlib.
But I don't understand why I'm getting these messages? WARNING: Can't open include file '../utils/sweep.scad'. WARNING: Can't open include file '../utils/sweep.scad'. The NopSCADlib library is here: C:\Users\terry\Dropbox\3D Printer\OpenSCAD\LIBRARIES\NopSCADlib And both core.scad and sweep.scad are in NopSCADlib\utils\sweep.scad BTW, what is the purpose of '//!', which I don't see in the Comments section of the user manual? Code extract from washer.scad ---------------------------------- // // NopSCADlib Copyright Chris Palmer 2018 // [hidden email] // hydraraptor.blogspot.com // // This file is part of NopSCADlib. // etc // // //! Washers, star washers, penny washers and printed washers. //! //! If a washer is given a child, usually a screw or a nut, then it is placed on its top surface. // include <../utils/core/core.scad> include <../utils/sweep.scad> soft_washer_colour = grey(20); hard_washer_colour = grey(80); star_washer_colour = brass; etc ![]() Terry Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
afaik you need to define the path more fully, e.g for my system openscad is here C:\Program Files\OpenSCAD\openscad.exe Nopscad library is here C:\Program Files\OpenSCAD\libraries\NopSCADlib and incude modules like here include<NopSCADlib/utils/thread.scad>
i.e. include path from openscad library.
On 13/06/2021 18:45, Terrypin wrote:
While continuing my learning on how to use libraries, I've opened the file washer.scad from the library NopSCADlib. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Thanks. I had tried that ... but forgot to change the separators '\' to '/'.
So the following now works: //include <../utils/core/core.scad> //include <../utils/sweep.scad> // My latest attempt now works include</NopSCADlib/utils/sweep.scad> include</NopSCADlib/utils/core/core.scad> However ... I don't see why the first one doesn't fail! Its path looks wrong: core.scad is not in \utils, it's in \core: C:\Users\terry\Dropbox\3D Printer\OpenSCAD\LIBRARIES\NopSCADlib\utils\core\core.scad Yet if I change it to what seems the correct path include</NopSCADlib/core/core.scad> it fails, with that same message. Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Given how often we run into file naming and path problems, I wonder if it would make sense to do something like this: if the given File Name and Path (FNP) exists, then fine. else try replacing slashes and backslashes in a variety of ways to see if we can get FNP to exist else try just looking for the file name in the base Library path else <something smarter than I can imagine> If the file name has to be modified to be found, then explain to the user what was done and what they need to do to fix the FNP Might reduce the number of questions about things like this. Jon
Thanks. I had tried that ... but forgot to change the separators '\' to '/'. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Thanks Jon. I’m guessing you posted before seeing my slightly earlier reply?
Do you/anyone have any thoughts on the puzzle I raised in that, beginning “However…”? -- TerryOn 13 Jun 2021, at 22:49, jon <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by jon_bondy
The way it is supposed to work is you put NopSCADLib anywhere you want and put the directory it is in in the OPENSCADPATH environment variable. Then, for a simple one file project, you simply do include <NopSCADlib/lib.scad> and that gets you everything. You don't open washers.scad, as it won't do anything on its own. You can open tests/washers.scad to see all the washers but normally you would just use them in your own code. E.g. include <NopSCADlib/lib.scad> washer(M3_washer); // Draws a washer. Those relative path includes you have commented are part of the library as all its internal paths are relative and don't need to be changed. I can't see why paths starting with / would work at all as they would imply NopSCADlib is at the root but you say it is in your dropbox. All paths should use forward slashes, so they work on Windows and Linux. //! is used to make the documentation. OpenSCAD treats it as a comment but my Python framework scrapes it and uses it as markdown to make the readme.md for the library and also assembly instructions for user projects. On Sun, 13 Jun 2021 at 23:27, jon <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Your original message went in my spam folder and the image is too small to read. You shouldn't get an error opening vitamins/washer.scad, it should simply do nothing. This is what it looks like on my machine. ![]() washer.scad is in NopSCADlib/vitamins/washer.scad so ../utils/sweep.scad should get you NopSCADlib/utils/sweep.scad. On Mon, 14 Jun 2021 at 00:26, nop head <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Thanks, will study and reply fully later. Meanwhile posting this (from my iPad) to ask if you’ve found the cause of several of my recent posts going to your spam folder?
Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
No I don't know why your emails go into my spam folder. It is something to do with the mailing list that was updated recently but gmail addresses normally work. Gmail's spam filter doesn't often give false positives. I can't diagnose your original problem because your screenshot is too low resolution. As long as you have OPENSCADPATH=C:/Users/terry/Dropbox/3D Printer/OpenSCAD/LIBRARIES it should work without any changes. I also don't understand how it can work with paths starting with /. What version of OpenSCAD are you using? On Mon, 14 Jun 2021 at 08:57, Terrypin <[hidden email]> wrote: Thanks, will study and reply fully later. Meanwhile posting this (from my iPad) to ask if you’ve found the cause of several of my recent posts going to your spam folder? _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
I'm posting this (covering both your recent replies) from the forum. But I'll also reply via email to the list, which may help isolate the cause of some posts going straight to your spam.
-------------------- Brilliant, thanks, that's the sort of concise instructions for a simple example that I desperately needed! I had the correct library installed correctly, as we discussed 9/6/21. And the Environment path. I suppose my most basic mistake was assuming that to make (say) a washer I'd use washer.scad. Another was the crucial omission of: include <NopSCADlib/lib.scad> I should have carefully studied usage.md, where on page #4 I now read: "All the vitamins and utilities are included if you include NopSCADlib/lib.scad." I did glance impatiently through it a week or so ago but "vitamins" temporariy delayed progress, although I've now googled its meaning ;-) This works fine: washer(M3_washer); // Draws a washer. But what is the equivalent for an M3 bolt (or screw) please, my practical objective? "Those relative path includes you have commented are part of the library as all its internal paths are relative and don't need to be changed." "I can't see why paths starting with / would work at all as they would imply NopSCADlib is at the root but you say it is in your dropbox." Well, I tried it again with the same result: include <../utils/core/core.scad> include <../utils/sweep.scad> // Those two give errors. My changes below do not, with or without the first '/' //include<NopSCADlib/utils/sweep.scad> //include<NopSCADlib/utils/core/core.scad> I've uploaded the file here: https://www.dropbox.com/s/bzt7vh61l13t7nt/washer_Errors.scad?raw=1 -------------------- One other aspect that confuses me is that there are many files in the library with the same name but different content, such as washer.scad. As another example, here's a screenshot showing both core.scad files. I'll include it as a link, as you've said that non-forum subscribers have a problem viewing large images, and smaller ones are unreadable. https://www.dropbox.com/s/nyxzxt670878m3x/TwoCore.jpg?raw=1 Terry Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
On Mon, 14 Jun 2021 at 11:52, Terrypin <[hidden email]> wrote: I'm posting this (covering both your recent replies) from the forum. But I'll also reply via email to the list, which may help isolate the cause of some posts going straight to your spam. screw(M3_hex_screw); or screw(M3_cap_screw); When you look at the documentation for screws it has a picture of all the screws available and below is a list of all the module calls to draw them. https://github.com/nophead/NopSCADlib#Screws
Makes no sense to me. I think your operating system must be broken if relative paths don't work or you have a broken version of OpenSCAD. I can't use snapshots later than 1st of May as $variables are broken. I found that I can add a leading / to /NopSCADlib and it makes no difference. That must be a bug in OpenSCAD because it should be interpreted as a path in the root of the current drive but it only seems to do that if I add a drive letter. I need to see your original screen shot at a resolution where I can see the warnings.
Yes there are lots of files with the same name internally in the library but you never need to use those directly. include <NopSCADlib/lib.scad> gets you everything except customisable printed parts. include <NopSCADlib/core.scad> gets you just the minimum utilities plus fasteners and then you can do say include <NopSCADlib/vitamins/fans.scad> to get the minimum to support fans but I only do that on my big 3D printer project. All my other projects have at most three files and the overhead of simply including lib.scad three times is negligible. Terry _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Actually those screw calls should include a length, as per the documentation. On Mon, 14 Jun 2021 at 12:23, nop head <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by nophead
"Makes no sense to me. I think your operating system must be broken if relative paths don't work or you have a broken version of OpenSCAD."
From the forum ----------------- Consistent with your advice that NopSCADLib could be anywhere, I placed it as described in my reply here: Jun 13, 2021; 6:45pm Why these warning messages? "The NopSCADlib library is here: C:\Users\terry\Dropbox\3D Printer\OpenSCAD\LIBRARIES\NopSCADlib" But in the user manual I've now found this: 'Library files are searched for in the same folder as the design was open from, or in the library folder of the OpenSCAD installation.' I certainly don't do my work in the library itself. And I assume the other option means this folder: C:\Program Files\OpenSCAD\libraries ? That would explain why your relative addressing doesn't work for me. Or for anyone who doesn't use C:\Program Files\OpenSCAD\ to hold their library file. -------------------- Did you receive both email and forum versions of my earlier posts? Any observations re the spam issue? Terry Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
I thought you opened
C:\Users\terry\Dropbox\3D Printer\OpenSCAD\LIBRARIES\NopSCADlib\vitamins\screw.scad in the GUI, therefore the first place it should look for files is starting from NopSCADlib/vitamins, so relative paths should work from there and they do on my Win7 machines and on Ubuntu and for all the other users of the library. Nobody else has said they need to start modifying the library file paths. I don't use C:\Program Files\OpenSCAD\ to hold my library files and it works for me. Any file should be able to include another relative to itself, no matter where it is placed. The "or in the library folder of the OpenSCAD installation" means if it doesn't find it in the first place it will look in the library folder. On Mon, 14 Jun 2021 at 15:46, Terrypin <[hidden email]> wrote: "Makes no sense to me. I think your operating system must be broken if relative paths don't work or you have a broken version of OpenSCAD." _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
When I open a file that I want to experiment with I save it promptly in a new folder, usually within C:\Users\terry\Dropbox\3D Printer\PROJECTS\
For the current discussion most are in C:\Users\terry\Dropbox\3D Printer\PROJECTS\SmallBolts Avoids the risk of over writing the original. -------------------- I tried your screw code. No errors but no thread: Still unsure whether you prefer links or embedded images? ![]() -------------------- My question re spam? Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
In reply to this post by nophead
Terry, are you trying to use these
include <../utils/core/core.scad> include <../utils/sweep.scad> from *your* program? That wouldn't work unless your program is in the NopSCADlib directory. Those relative paths allow files inside his library to find each other, but they wouldn't work from outside. *Your* references should all start with "NopSCADlib/". As Nop Head says, you should normally use "<NopSCADlib/lib.scad>", or might sometimes use "<NopSCADlib/core.scad>" and then "<NopSCADlib/vitamins/fans.scad>". If your files have references that start with "../" then those references are relative to *your* files, or perhaps to the directories in your library search path (where they would all point *outside* the directories in your library search path).
_______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Thanks Jordan. The discussion/confusion arose because I couldn't I understand why Nophead's relative addressing did not work for me. If you skim through the last few posts you'll see my explanation.
In summary: my library is conveniently in C:\Users\terry\Dropbox\3D Printer\OpenSCAD\LIBRARIES\ and I'm now using appropriate code. Terry Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Threads are not shown in the GUI by for speed. They are shown when it makes the assembly drawings. You can turn them on using $show_threads = true but that probably only works in OpenSCAD versions up to May 1st. ![]() It then takes 4.5 seconds to draw the screw. On Mon, 14 Jun 2021 at 17:44, Terrypin <[hidden email]> wrote: Thanks Jordan. The discussion/confusion arose because I couldn't I understand why Nophead's relative addressing did not work for me. If you skim through the last few posts you'll see my explanation. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Thanks, that works fine here in OpenSCAD version 2021.01. I now have a proper bolt!
Not sure how old 2021.01 is? I have a program (Glary Utilities Pro) and one of its tools scans my PC and is supposed to tell me when any app needs updating. Just checked and OpenSCAD isn't in its current reminder list. And the OpenSCAD site says "31 January 2021, OpenSCAD 2021.01 released". So are there versions after 1st May? If so, presumably betas? -------------------- I probably won't attempt further prints. At this small size it clearly won't be very strong. Although the plug cover for which it was intended should rarely need removing, I reckon I'll just do some more junk box rummaging, now that I've achieved much from the learning exercise. Terry Sent from the OpenSCAD mailing list archive at Nabble.com. _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Yes, in between releases there are development snapshots. On Mon, 14 Jun 2021 at 18:41, Terrypin <[hidden email]> wrote: Thanks, that works fine here in OpenSCAD version 2021.01. I now have a proper bolt! _______________________________________________ OpenSCAD mailing list To unsubscribe send an email to [hidden email] |
Free forum by Nabble | Edit this page |