Library and Structure WB

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Library and Structure WB

Post by bernd »

emills2 wrote: Sun May 20, 2018 5:21 pm
bernd wrote: Sun May 20, 2018 4:25 am you should have a look at bolts, it is even smarter ...
three pull requests over 1 year old, last commit 3 years ago, link to documentation broken. am i even looking at the right repo?

if i am, i can see why Fernando might think it's worth trying again.

i'm not trying to do this myself, just indicating my personal preference for where to place the complexity in a library.
I must admit There has not been much development has taken place since the project founder left the project. But it is still working and has lot of the features which are discussed here already. It might be worth not starting from scratch ... Ahh I did add some more profiles and fixed some bugs. The FreeCAD version of BOLTS (BOLTSFC) which will be installed with the addonmanager ATM is based on a development branch on my repo of BOLTS. See https://github.com/berndhahnebach/BOLTS ... s/boltsdev and https://github.com/berndhahnebach/BOLTS ... /README.md

JM2C
User avatar
waebbl
Posts: 200
Joined: Thu Aug 16, 2018 3:12 pm

Re: Library and Structure WB

Post by waebbl »

I very much like the idea of getting standard parts into FreeCAD. I won't discuss whether there's a separate WB needed, it might actually be a good choice for easy creation of standard derived parts.
I didn't read all of the four pages, only some of the threads in the topic, so please excuse me, if I missed something.

What's stunning me, is that it looks like you want to create your own standards catalog for this project. I know there are online accessible databases for all kinds of standard parts. What I don't know, whether there's one which is publicly and freely accessible through a well defined API. Have you done any research into this? Wouldn't it be easier to fill in the data for the parts from such a database than creating our own catalog from scratch? It's already a huge effort to create such a catalog for all kinds of starndard parts used throughout mechanical engineering and BIM. Also keeping it up to date with the standard bodies and taking care of such a catalog to have it up to date all the time, will need a massive continuous effort. I suppose that at least dimensions and material properties could be filled by querying some external databases.
fdomateu
Posts: 26
Joined: Thu May 17, 2018 7:14 am

Re: Library and Structure WB

Post by fdomateu »

Hi everybody,

Following my work, I have started to create of the task panels, Bellow I have attached some picture of the task panels that should appears at the moment that the command add standard part is clicked. Actually I still have some problems to define the order of the items. I will continue working on it. Nevertheless I would be happy to know what is the feeling about the design. With the time, I would like to understand and add at top the draft widget named Point, like Arch workbench is using it.
  1. The idea from the Library tree is to choose the standard part family that should be displayed at the Standard part selection widget (Screw, Beam, etc.)
  2. The standard part widget is the widget where the user should select the standard part norm/type and the dimensions
  3. At the encapsulate widget, the user should select if the part should be introduced at the model as python feature, body, part or body inside a part.
The user can choose at the preferences if the library structure has to be as CAD software (For machine design) or as BIM software (For architecture and installations design).
Attachments
library_task_panel.png
library_task_panel.png (62.86 KiB) Viewed 2223 times
akredd
Posts: 71
Joined: Wed Mar 19, 2014 8:31 pm
Location: D-02733 Cunewalde

Re: Library and Structure WB

Post by akredd »

Hi fdomateu
fdomateu wrote: Thu Aug 30, 2018 9:13 pm Hi akredd,

I have cheked your propose Standards.py. I am still making tests and thinking how to build the WB proposed by me that you are showing interest. I have to say that I think that I have a different perspective than you, I will try to explain you.

At your file Standards.py you write all the code necessary for the part, at this case holes. And there is no pre-defined way to introduce all this information. At the begining you wirite many dictionaries with the information and at the end of the file you write the code to generate all the things.

...
I'm back again - it took me a bit longer.... :(
First I have to tell You, that this was not my code. I took it as an example. In my all day work I am a mechanical engineer an I usually don't write code.
fdomateu wrote: Sun Nov 04, 2018 7:22 pm Hi everybody,

Following my work, I have started to create of the task panels, Bellow I have attached some picture of the task panels that should appears at the moment that the command add standard part is clicked. Actually I still have some problems to define the order of the items. I will continue working on it. Nevertheless I would be happy to know what is the feeling about the design. With the time, I would like to understand and add at top the draft widget named Point, like Arch workbench is using it.
  1. The idea from the Library tree is to choose the standard part family that should be displayed at the Standard part selection widget (Screw, Beam, etc.)
  2. The standard part widget is the widget where the user should select the standard part norm/type and the dimensions
  3. At the encapsulate widget, the user should select if the part should be introduced at the model as python feature, body, part or body inside a part.
The user can choose at the preferences if the library structure has to be as CAD software (For machine design) or as BIM software (For architecture and installations design).
The last is very interesting . But I didn't get an idea how the functionality will be in FC. Is there some code that I can download and test?
waebbl wrote: Fri Oct 26, 2018 9:53 pm What's stunning me, is that it looks like you want to create your own standards catalog for this project. I know there are online accessible databases for all kinds of standard parts. What I don't know, whether there's one which is publicly and freely accessible through a well defined API. Have you done any research into this? Wouldn't it be easier to fill in the data for the parts from such a database than creating our own catalog from scratch? It's already a huge effort to create such a catalog for all kinds of starndard parts used throughout mechanical engineering and BIM. Also keeping it up to date with the standard bodies and taking care of such a catalog to have it up to date all the time, will need a massive continuous effort. I suppose that at least dimensions and material properties could be filled by querying some external databases.
I agree with that and will add, that (e.g. in companies) the user should get the possibility to filter such catalogues if for example a particular company will only use screws M6X20 and M6X25, but not M6X22 (DIN 912).
A special WB will give such companies the possibility to create standard parts (they mostly not use encapsulate) at a central point by only a few designers and all the others will use predefined parts to put them into e.g. assemblies.

Andreas
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Library and Structure WB

Post by Kunda1 »

rus wrote:
I understand that OpenSourceEcology is wanting to develop an OSE library for their parts. I'm pinging @rus who is part of their team. Perhaps there could be some collaboration and mututal benefit ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
rus
Posts: 73
Joined: Wed Feb 22, 2017 6:37 pm

Re: Library and Structure WB

Post by rus »

Kunda1 wrote: Thu Nov 15, 2018 11:02 am
rus wrote:
I understand that OpenSourceEcology is wanting to develop an OSE library for their parts. I'm pinging @rus who is part of their team. Perhaps there could be some collaboration and mututal benefit ?
Thank you @Kunda1 for the message.

Well we already have some kind of "part library". One may fork the https://github.com/rkrenzler/ose-part-library-workbench, add or replace buttons and tables and than rename to their favorite workbench. The structure of the table is "PartNumber", "Text", "Image" and "Cad".
For tests we use the part for UniProKit of OSEG (Open Source Ecology Germany).

I am going to make a separate lightweight project, which can be used as a template. The UniProKit version of this project will become a separate project.

We can collaborate for sure.
fdomateu
Posts: 26
Joined: Thu May 17, 2018 7:14 am

Re: Library and Structure WB

Post by fdomateu »

rus wrote:
Hi @rus,

I am really interested to work together on the development of a FreeCAD libary.

I have made a fast check to the library and I would like to know way you prefer to create one part FreeCAD part for each component. At the case of beams, screws, nuts and may others components is not better to have a script? From the beginning I am planing to create a library where FreeCAD parts, step models, ifc models and python scrips are allowed.
User avatar
rus
Posts: 73
Joined: Wed Feb 22, 2017 6:37 pm

Re: Library and Structure WB

Post by rus »

fdomateu wrote: Sun Nov 25, 2018 9:45 pm
rus wrote:
Hi @rus,

I am really interested to work together on the development of a FreeCAD libary.

I have made a fast check to the library and I would like to know way you prefer to create one part FreeCAD part for each component. At the case of beams, screws, nuts and may others components is not better to have a script? From the beginning I am planing to create a library where FreeCAD parts, step models, ifc models and python scrips are allowed.
Cool! Now I prefer just to insert a part from a FreeCAD file to the current document. The idea was to create a very simplest library. Although I fear that at some point I will add more complexity and configuration to the project such that at the end it would be easier to create a new project from scratch
. :D . Like it happens to many projects, which start as a "new light weight XYZ" and after some times you need to download Megabytes of code and plugins ;) .

If we want to use a script for component, we need to answer the question: "Is a combination library+script easier to use or to develop than just a new workbench from scratch?"
fdomateu
Posts: 26
Joined: Thu May 17, 2018 7:14 am

Re: Library and Structure WB

Post by fdomateu »

rus wrote:
Hi @rus,

I think we need a workbench, not only scripts. I think that the workbench should defines the workflow and the scripts each part poperty and geometry. The image bellow defines one of my draft ideas about Hierarchy of objects.

Image

The script should be a definition if a class that is derived from Screw, U profile, nut, etc. At the function Standard_Part.Geometry(), a python script should create the geometry from python code, step model, ifc model or FreeCAD part. I think that ISO parts will come from python scripts to reduce the number of files to 1 and avoid one file per metric and the components like a toilet which should be introduced at the BIM model can be created from a ifc model.

I have also though on the possibility to create a new container named Standard Part, like the Part or Body container but with different properties as Manufacturer, norm, etc. Bellow you find my first draft idea

Image
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Library and Structure WB

Post by yorik »

This is a very good chart...
Post Reply