Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 10, 2014 01:02PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 10, 2014 02:19PM |
Registered: 13 years ago Posts: 50 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 10, 2014 02:31PM |
Registered: 13 years ago Posts: 50 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 10, 2014 06:35PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 07:49AM |
Registered: 13 years ago Posts: 50 |
Quote
Dale Dunn
In the morning, I'll work out what it means to "publish" a branch. Is it anything more than fork, clone locally, edit, commit, and push to my fork? A pull request to let you know I've done it?
I think you have correctly deduced which parts of this project I will mainly be concerned with. I won't be able to make any significant contribution to [*].py other than to report issues and offer endless opinions on what it should do. I think I can mainly contribute by adding data and SolidWorks models.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 04:10PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 07:33PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 07:58PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 08:44PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 10:25PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 11, 2014 10:34PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 12, 2014 06:45AM |
Registered: 13 years ago Posts: 50 |
Quote
Dale Dunn
OK, I've worked through the GitHub processes to fork, clone, edit and sync to my repository. I added files for nuts to my repository here. It should be visible as a fork of BOLTS as well. Please feel free to open issues for items you need from me to proceed.
Quote
Dale Dunn
How should backwards compatibility be dealt with? With few exceptions, SolidWorks files are not compatible with older versions of the software. It's not at all unusual for users to be using older versions. I have a customer who requires SolidWorks 2011 files, when I'd rather be working with SolidWorks 2014. So, I work in 2011. That's what I'm using for BOLTS at the moment, being aware of the backwards compatibility issue.
I would think that for a particular release of BOLTS there should be a target version of SolidWorks. Deciding which version should be targeted will depend on features we want available in BOLTS. Right now, the design tables created by BOLTS are compatible with SolidWorks versions so old they wouldn't run on XP. The model files themselves may have some features in different versions, and that needs to be evaluated.
Quote
Dale Dunn
Once I have a handle on BOLTS, I expect to bring it to the attention of the SolidWorks forums to see if anyone there wants to contribute models and data. Once others get involved in contributing models, there will need to be some way to communicate which version of SolidWorks is targeted for the next release. (I'm sure other users will have input on which version to target as well. Maybe even contribute SolidWorks macros to automate adding design tables to model files.)
At what point should we take this conversation out of the RepRap forums?
Quote
Dale Dunn
I'm experimenting with metadata, and I need to be able to add more than the key and columns. I need to be able to add description and standard as metadata.
Quote
Dale Dunn
Unless we append units to every number the params put in a design table, we will need separate model files for inch and metric hardware. Perhaps convert units on export to standardize on mm in the design tables? I would prefer separate model files for different units.
Do parameters need to be a data type that includes units? It's not inconceivable that some standard specifies cm or m for something is it? Some data might even be given in µm or µin.
I see you've given units some thought already. How do you plan to manage this? Split the output directories into inch and mm and use different .base files referencing different classes in the .blt?
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 12, 2014 06:37PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 13, 2014 04:52AM |
Registered: 13 years ago Posts: 50 |
Quote
Dale Dunn
SolidWorks version compatibility:
You have correctly guessed the process for moving a SolidWorks file to a newer version: just open and save using the new version. With the small files in a BOLTS distribution, the update process will be effectively transparent when the file is opened to add the design table.
Because the update is so easy, I don't think it will be worthwhile to maintain separate BOLTS distributions unless we identify a feature of a newer version of SolidWorks that merits the effort. Right now, I don't know of anything that merits maintaining multiple releases. The kind of model features we need for BOLTS have been stable in SolidWorks for over a decade. The only thing differentiating different versions (for our purposes) is which versions of SolidWorks can open the files.
What I propose is to target the earliest version that is supported on current platforms (Win7/8). The earliest version of SolidWorks supported on Win7 is 2010. Unfortunately, that means anyone who wants to contribute to BOLTS will need to install SW2010. But it would always be the case that a contributor would need to install an old version in order to support anything but the very latest release.
Quote
Dale Dunn
Description and standards metadata:
It didn't occur to me to add description and standards parameters to the .blt files. For many classes, that will result in the same data for each key. But not for all. Yes, I think this is the correct thing to do.
Quote
Dale Dunn
Metadata character case:
Some drawing standards require a particular character case. In particular, ANSI/ASME specifies that all text on a drawing is all upper case unless otherwise required (Hz, McMASTER, etc.). What this means is that metadata inserted into a design table for use in ANSI/ASME drawings needs to be upper case. Would it be at all difficult to implement different capitalization options for export? Or would it be better to consider this part of the translation issue and maintain separate .blt files for each translation?
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 13, 2014 02:32PM |
Registered: 13 years ago Posts: 485 |
Quote
jreinhardt
...
Good point. That requires some thought.
BOLTS knows about the units of the parameters in the blt files, but currently does not use this when exporting to a design table. Currently BOLTS assumes that a parameter is a length given in mm, unless stated otherwise (like e.g. [github.com]). It should be not a problem to add other units if needed.
Can Solidworks read units from designtables? And can you mix parts from designtables with metric units with parts from designtables with imperial units?
I am thinking about a possibility to specify the unit per model in the base file. This way a model can be designed in a whatever unit the designer is comfortable with, and BOLTS can convert the numbers on export. Or is this becoming too flexible?
I am a bit reluctant to have different models for each unit. The model files will be essentially identical, so if a change is made to the class it has to be applied manually to each unit (potentially for each version of SolidWorks). This has a lot of potential to forget to change something and introduce bugs and inconsistencies.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 13, 2014 03:04PM |
Registered: 13 years ago Posts: 50 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 13, 2014 03:21PM |
Registered: 13 years ago Posts: 485 |
Quote
jreinhardt
Can newer version save in old file formats? Something like "Save as" -> SW2010?
Targeting only one version requires a difficult tradeoff:
* BOLTS is usable for everyone with the targeted version or newer, so to maximise audience one should target a maximally old version
* Contributors need to have the targeted version or older, so to maximise contribution one should a maximally young version
You mentioned that the userbase is spread out over many versions, which makes this tradeoff even more difficult. Are there many people using versions older than SW 2010? Also this tradeoff changes over time, as people switch to newer versions.
On the other hand, keeping track of model file versions would allow to accept contributions from everybody, and build distributions for different versions with all models that are compatible with this version. This could be automated. But
* which model to use if there is more than one compatible?
* this leads to many more files that need to be maintained manually.
I am not sure what is the best way to handle this.
Quote
jreinhardt
For which classes will be description and standards not be the same for each key?
Quote
jreinhardt
Hmm. Do you mean something like a "capitalize" field in the base file? And the best I can do automatically is to capitalize everything, so the special cases would not be covered.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 13, 2014 06:10PM |
Registered: 13 years ago Posts: 50 |
Quote
Dale Dunn
I'm thinking of set screws. The description will change depending on the point style. Hex socket set screw, cone point, hex socket set screw, flat point, etc. For standards that might change for each key, I don't have an example ready. I'm not sure I've ever seen it, other than a suffix for a subsection of a standard. But I do need a way to add the standard as metadata so it can be pulled into a BOM. The only way to do that via design table is to include the standard with each key.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 13, 2014 06:23PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 15, 2014 09:55AM |
Registered: 13 years ago Posts: 485 |
Quote
jreinhardt
Ok, that is nice. It seems that is well doable.
I have now a branch where I will keep track of your work and add experimental stuff:
[github.com]
I just added some code that adds the units to the design table. I hope that works, as I write strings to the spreadsheet instead of numbers. Can you test that?
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 15, 2014 10:13AM |
Registered: 13 years ago Posts: 50 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 15, 2014 10:49AM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 15, 2014 11:07AM |
Registered: 13 years ago Posts: 50 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 15, 2014 11:14AM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 18, 2014 09:32PM |
Registered: 13 years ago Posts: 485 |
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 25, 2014 06:28PM |
Registered: 13 years ago Posts: 485 |
Quote
jreinhardt
...
I have started to add set screws to the hex_socket.blt file in my solidworks branch. I used data from [www.fullermetric.com] Maybe you can try add the remaining point types and the class for the ANSI standard.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD January 29, 2014 06:40PM |
Registered: 13 years ago Posts: 50 |
Quote
Dale Dunn
You seem to excel at giving me tasks that require me to fill in the vast holes in my GitHub skill set. Most likely, I probably still have not achieved competence.
Quote
Dale Dunn
The test with mm units was successful. I have some more work to do to be able to test something with inch units. Specifically, using the key in a configuration name is a problem. The forward slash in the fractional inch thread sizes is not a legal character in a design table. I'll have to replace them with decimal equivalents in the .blt file I'm working with. This might be a problem, because it forces a limitation on the .blt files for all systems, only for the sake of SolidWorks.
Quote
Dale Dunn
Edit:
Successful test adding inch and mm units to SolidWorks configuration data via design tables.
Comments:
1- The forward slash in the fractional inch thread sizes is not a legal character in a design table. I renamed the keys in hexagonnut3 to decimal equivalents and added some thread pitches (much more to be done there)
2- Because of item 1 above, the inch fasteners need "name" metadata column so the size can appear on drawings in the correct fractional form, instead of the decimal form. Why can't we all just use mm?
3- The units were successfully added to the parameters, but they should not appear in the metadata. I apologize for not pointing that out earlier. The problem is, the metadata is most likely to appear on a drawing, where the units should only be specified if they are not the default units for the entire drawing (rare). I looked in solidworks.py to see if I could figure out where to change this myself, but had no success.
Quote
I haven't forgotten this. Adding a model and base file for the hex screw took the whole afternoon, and I'm out of time for today. Well, the new files and learning some Python string formatting, merge conflict resolution, inscrutable Python errors, etc.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD February 01, 2014 10:24PM |
Registered: 13 years ago Posts: 485 |
Quote
jreinhardt
This is not really a problem because this limitation affects other systems. For example the IGES backend can not use forward slashes in filenames. Are decimal equivalents something that people understand (i.e. 0.375 instead of 3/8), or is this too uncommon?
Quote
jreinhardt
The imperial system is really quite curious.
Quote
jreinhardt
Good that the units work.
1 and 2 - This is a bit a problem in the current infrastructure. I think for solidworks one can work around that pretty well by having a string parameter "size_name" that contains the fractional form, put a extra column in the table and include size_name as metadata in the designtable. But for example in FreeCAD the keys are used in the ui to let the user choose the size he wants. So having the uncommon decimal form there is suboptimal. On the other hand, for filenames (e.g. IGES backend), the common form causes problems.
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD February 02, 2014 04:00PM |
Registered: 13 years ago Posts: 50 |
Quote
Dale Dunn
That reminds me: Is "#" a legal character in file names? Even if it is, I would want to keep everything in decimal equivalents for ease of use. Something like this: "0.1250-40(#5) x 0.1875" for a #5-40 x 3/16 screw. If for no other reason than to maintain a sane sort order. That's how I've set up my work library.
Quote
jreinhardt
Good that the units work.
1 and 2 - This is a bit a problem in the current infrastructure. I think for solidworks one can work around that pretty well by having a string parameter "size_name" that contains the fractional form, put a extra column in the table and include size_name as metadata in the designtable. But for example in FreeCAD the keys are used in the ui to let the user choose the size he wants. So having the uncommon decimal form there is suboptimal. On the other hand, for filenames (e.g. IGES backend), the common form causes problems.
OK. I'll add "size_name" to my list of things to add. Is there a reason for replacing spaces with underscores?
Re: BOLTS, a standard parts library for OpenSCAD and FreeCAD April 24, 2014 04:46PM |
Registered: 13 years ago Posts: 50 |