About PDM for FreeCAD

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!
Post Reply
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: About PDM for FreeCAD

Post by Jee-Bee »

grd wrote: Sun May 08, 2022 2:38 pm ...
I don't if you noticed it already but i cloned your repro and i started to create research like folder inside it. I tried to figure out so far:
  • What do we need
  • What problems are we running into
  • How does the pdm need to work(I call it workflows, and a lot are missing )
  • etc.
You can check it out. Ithink it helps to define a more clear vision how and why some things should be done...
My repro is here: https://github.com/Jee-Bee/FreePDM/tree/conceptod

Edit: There are some issues with the loading of figures but i have to figure that out ;)
grd
Posts: 328
Joined: Wed Apr 13, 2022 5:13 am
Location: Eindhoven, The Netherlands

Re: About PDM for FreeCAD

Post by grd »

Jee-Bee wrote: Mon May 09, 2022 9:30 am You can check it out. Ithink it helps to define a more clear vision how and why some things should be done...
My repro is here: https://github.com/Jee-Bee/FreePDM/tree/conceptod
I checked it out. Great work! I am gonna fill some of the questions in

Gerard
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: About PDM for FreeCAD

Post by heda »

I think local should be an option, since local does not necessarily mean one computer one user...
a shared drive on lan, which I imagine is not uncommon for SME, that is in essence still local.
(or maybe I have gotten that completely wrong...)

"But to think about it, this should also apply to the data source."

yes please, believe that is the right architectural choice.
at the same time, imho, this inherently means that you have to roll your own wrapper around any version scheme used, but you can leverage on this to overcome the limitation of the typical sw-version schemes that in my simple mind are one-dimensional, i.e. they have a revision, whereas a typical current pdm (imho) is two dimensional, it has a revision and a "state" or "status", which basically are independent (suppose it depends on business logic if you are allowed to go back in status or not). I know of some attempts to get the branching/forking, i.e. non-linear versioning type of schemes into enterprise pdm's, personally I think it will just create a mess out of everything, both for users and downstream, but maybe people will like it.

"That is why we need to have roles and an Admin page where you can pick which role you can select."

hm, might be understanding of wording (where mine can be completely off :-)), but imho "role" means "select a role and you are then stuck with a predefined set of attributes", don't mind roles at all, but the point is then that the attributes in a role should not be fixed, but freely configurable...


"I think that we should stay away from the web as long as we can, because sooner or later all your data is gone, copied or encrypted. Securing a web site is a tough job and we are no experts in that area."

hm, totally get the point, however afaik it is possible to use web-technology without actually being on the world wide web...
if nothing else running a local one-box/user server, or a server deployed in a "private" network
(or I am utterly wrong in that, if so I'm counting on others to point that out)
but, yes, expecting that a hobbyist will off the cuff make a secure website when it is an "open" one is more or less the same as publishing it openly directly. (at the same time I imagine that webframeworks are quite helpful in this matter...)


food for thought.

comparison between webframeworks: https://www.youtube.com/watch?v=3vfum74ggHE

is it not really a "document management system" that is most tuned towards pdm-like?
compare what the things do on wikipedia, and what they list as core features...
https://en.wikipedia.org/wiki/Document_ ... ent_system vs. https://en.wikipedia.org/wiki/Version_control

one example of a dms: https://docs.mayan-edms.com/ (incidently django-based)

spend 5 minutes to glance through openpdm code, clearly they have used django, and then it appears that they have used svn to keep track of versions behind the scenes, and built their own "version/status" view.
hm, note to self... seems like without really knowing it upfront, I have made very similar choices to the ones having created openpdm...
grd
Posts: 328
Joined: Wed Apr 13, 2022 5:13 am
Location: Eindhoven, The Netherlands

Re: About PDM for FreeCAD

Post by grd »

heda wrote: Mon May 09, 2022 8:45 pm I think local should be an option, since local does not necessarily mean one computer one user...
a shared drive on lan, which I imagine is not uncommon for SME, that is in essence still local.
(or maybe I have gotten that completely wrong...)
The question is: What do you want? This proposal will probably become a WB in the future. And that is it, nothing more. If you want to use it, that is good but if you don't want to use it, that is also good. It will become a PDM, with lots of features (that we even didn't thought out very well). Take a look at https://github.com/grd/FreePDM
"But to think about it, this should also apply to the data source."

yes please, believe that is the right architectural choice.
at the same time, imho, this inherently means that you have to roll your own wrapper around any version scheme used, but you can leverage on this to overcome the limitation of the typical sw-version schemes that in my simple mind are one-dimensional, i.e. they have a revision, whereas a typical current pdm (imho) is two dimensional, it has a revision and a "state" or "status", which basically are independent (suppose it depends on business logic if you are allowed to go back in status or not). I know of some attempts to get the branching/forking, i.e. non-linear versioning type of schemes into enterprise pdm's, personally I think it will just create a mess out of everything, both for users and downstream, but maybe people will like it.
Yes, you can be right, but in the past I also worked wit companies that didn't have a PDM and I can tell you: Never again!
"That is why we need to have roles and an Admin page where you can pick which role you can select."

hm, might be understanding of wording (where mine can be completely off :-)), but imho "role" means "select a role and you are then stuck with a predefined set of attributes", don't mind roles at all, but the point is then that the attributes in a role should not be fixed, but freely configurable...
This is about the role that the user can select. Personally I don't mind roles. An architect has different needs than a mechanical engineer. And maybe we are gonna end up with one role, but I like predefined attributes that I can modify. We just need to figure that part out.
is it not really a "document management system" that is most tuned towards pdm-like?
No. It is a lot more than that.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
user1234
Veteran
Posts: 3506
Joined: Mon Jul 11, 2016 5:08 pm

Re: About PDM for FreeCAD

Post by user1234 »

grd wrote: Sat May 07, 2022 6:23 am I think that we should stay away from the web as long as we can, because sooner or later all your data is gone, copied or encrypted. Securing a web site is a tough job and we are no experts in that area.

Web based does not mean internet based, it means webbrowser based and can absolutely be local. When it is based on a webbrowser FreeCAD can not steal the focus of the screen (example: when you are middle in a taskdialog, you still can work on the PDM) and is is better organizeable on a screen, at least i think so. Also setting up a web frontend later is much harder else when it is an the start the gui, since can do both, local (computer, network, server) or nonlocal.


Greetings
user1234
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: About PDM for FreeCAD

Post by Jee-Bee »

heda wrote: Mon May 09, 2022 8:45 pm I think local should be an option, since local does not necessarily mean one computer one user...
a shared drive on lan, which I imagine is not uncommon for SME, that is in essence still local.
(or maybe I have gotten that completely wrong...)
I meant local as on a user PC because also a server can be local. I described basically everything that is a network source as a server(Except the raspberry Pi just to strech the basic concept). I think there is more needed than just a hard disc within the network. To be honest a NAS is almost a PC nowadays. So If you like i can add the term network PC in the list even if it don't change much on the working ;)
heda wrote: Mon May 09, 2022 8:45 pm at the same time, imho, this inherently means that you have to roll your own wrapper around any version scheme used, but you can leverage on this to overcome the limitation of the typical sw-version schemes that in my simple mind are one-dimensional, i.e. they have a revision, whereas a typical current pdm (imho) is two dimensional, it has a revision and a "state" or "status", which basically are independent (suppose it depends on business logic if you are allowed to go back in status or not). I know of some attempts to get the branching/forking, i.e. non-linear versioning type of schemes into enterprise pdm's, personally I think it will just create a mess out of everything, both for users and downstream, but maybe people will like it.
There are serval different (Open source)version control systems available. The main difficulty is that those are most written for software.
Where software is released as a whole that is not always the case within the mechanical world. see: @ref to story
This has to be tackeled.
Currently the most promissing implementation is the svn version system (a Client-server).
The most wel known Distributed version systems are git and mercurial.
grd wrote: But there are also closed source versions. I think that we should also accept those because in a company they might only allow this kind of software.
...
Why does it need to be tackled? You can also allow them all. But in that case we need to hav an admin page in where we can select which one we use. They all work roughly the same, but we need to make all work of course. But we are gonna start with SVN.
Yes it is true that the versioning system is the most complicated part.
The reason why this is complicated is (and @grd that was where the word tackled was referring too) is that a version system for software works on project as a whole basis. if you change a single file the whole project change. While in CAD it totally fine that a single file or a set of files get a change while the rest is untouched(and hold their revision as they have).
I'm busy working an example out, but that one is just in concept. So i come back on that one.

@grd first the response on your comment about the close source versioning system. It would be great that they can be ported but initial i don't care. Your argument that a company want's a close source software versioning system but an open source pdm don't fit together.
heda wrote: Mon May 09, 2022 8:45 pm "That is why we need to have roles and an Admin page where you can pick which role you can select."
I would argue the reverse. A role (or a set of roles) is given to a user. And based on the roles you have you have a certain freedom. For example a engineer role can de the create new part, checkout, set it ready for release etc. but he can't change for example the library parts that is for example part of the power user.
How to create roles and how to change what task are available for a certain role(Don't forget the creation of tasks) is definitely something to thing about!!
heda wrote: Mon May 09, 2022 8:45 pm comparison between webframeworks: https://www.youtube.com/watch?v=3vfum74ggHE
Thanks i try to theck it out
Within databases there are two main types of databases. SQL based databases. Examples of SQL like databases are SQLite, MariaDB, PostgreSQL.

The other is noSQL. An example of this database is MongoDB

Note: Add What the difference is and how such a database is build up
grd wrote: Why do we need such a database? That is the question. We need it because we can't extract the relevant information out of VCS and that is because a FC file attributes are stored somewhere into that file. And you want to be able to search that metadata information. To be honest, I don't care about which kind of software you use (SQL / noSQL), but SQLAlchemy helps a lot when you use SQL data. That is why I think that we better use SQL. Starting with sqlite.
I try to explain my problem a bit(i was not that far with working out ;) ) that there are basically a few types of databases where i think SQL based databases the most well known are. My issue is that there is as far as i can see some difference in complexity. Maybe from user point of view there is not that much different but i think from implementation wise there is some difference. If SQLAlchemy handles both well to me there is no problem.
The only thing (but that could also be me) What are the alternatives for SQLAlchemy (https://builtin.com/data-science/python-database) SQL
grd wrote: This is never gonna work. When a part is changed you aso need to update the drawing of that part, the assy (or assy's) in where it belongs and the drawings of those too.
I wrote it the wrong way around.
Let's assume i created a assembly and a drawing(in separate files. Of course this change if the drawing is inside the related part / assembly.) . everything is released and there has to be a change for example i described in the notes a type of glue that is not strong enough. Is it valid to change the drawing without releasing the model. So the drawing get release version 2, but the assembly hold release state 1.
The answer could be "It is up to the user(Read: Admin) / Company" to decide if it's aloud or not. but at least should it be possible in that case
grd
Posts: 328
Joined: Wed Apr 13, 2022 5:13 am
Location: Eindhoven, The Netherlands

Re: About PDM for FreeCAD

Post by grd »

user1234 wrote: Tue May 10, 2022 12:05 am Web based does not mean internet based, it means webbrowser based and can absolutely be local. When it is based on a webbrowser FreeCAD can not steal the focus of the screen (example: when you are middle in a taskdialog, you still can work on the PDM) and is is better organizeable on a screen, at least i think so. Also setting up a web frontend later is much harder else when it is an the start the gui, since can do both, local (computer, network, server) or nonlocal.
It is true that the browser doesn't mess with your focus. That also counts for a independent GUI. And that is what we want. Why? Because IMO it's better to not run FC when you do your operations and that is because FC copies the files to another directory when it runs the program (that I read somewhere in this thread). So you better run this PDM without using FC.

About the browser: you can run QT inside the browser, and even with QML (is QML being used in FC?). Look at https://itnext.io/developing-web-apps-u ... 84453f2f61 And you can also use qtwebkit https://wiki.qt.io/Qt_WebKit
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: About PDM for FreeCAD

Post by Jee-Bee »

The FreeCAD StartWB make that one use of the QT Webkit?
grd
Posts: 328
Joined: Wed Apr 13, 2022 5:13 am
Location: Eindhoven, The Netherlands

Re: About PDM for FreeCAD

Post by grd »

Jee-Bee wrote: Tue May 10, 2022 10:58 am There are serval different (Open source)version control systems available. The main difficulty is that those are most written for software.
Where software is released as a whole that is not always the case within the mechanical world. see: @ref to story
Yes. Maybe I was a little bit too enthusiastic and maybe we should only use one. And that counts for the SQL too. Maybe we should just stick with SVN and sqlite. And then in the future we can maybe add others.
]
Yes it is true that the versioning system is the most complicated part.
I think that the SQL part is probably the hardest thing to do, especially since we need to be able to do things such as "Check Out" (this needs to be achieved in SQL, the VCS doesn't handle this kind of things AFAIK).
I try to explain my problem a bit(i was not that far with working out ;) ) that there are basically a few types of databases where i think SQL based databases the most well known are. My issue is that there is as far as i can see some difference in complexity. Maybe from user point of view there is not that much different but i think from implementation wise there is some difference. If SQLAlchemy handles both well to me there is no problem.
The only thing (but that could also be me) What are the alternatives for SQLAlchemy (https://builtin.com/data-science/python-database) SQL
It is good to have an alternative, but I hope that SQLAlchemy "just works".
I wrote it the wrong way around.
Let's assume i created a assembly and a drawing(in separate files. Of course this change if the drawing is inside the related part / assembly.) . everything is released and there has to be a change for example i described in the notes a type of glue that is not strong enough. Is it valid to change the drawing without releasing the model. So the drawing get release version 2, but the assembly hold release state 1.
The answer could be "It is up to the user(Read: Admin) / Company" to decide if it's aloud or not. but at least should it be possible in that case
I still don't fully understand your question. But when a drawing has changed then it should have a new version. That is for sure. And it should also look at the right model.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: About PDM for FreeCAD

Post by adrianinsaval »

I think that the SQL part is probably the hardest thing to do, especially since we need to be able to do things such as "Check Out" (this needs to be achieved in SQL, the VCS doesn't handle this kind of things AFAIK).
what is check out in this context? At least in git there is something called checkout and svn probably has something at least similar too.
Post Reply