Assembly3 preview

Discussion about the development of the Assembly workbench.
wsteffe
Posts: 142
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Fri Jan 11, 2019 11:30 am

realthunder wrote:
Fri Jan 11, 2019 9:20 am
Okay, Catia can create a constraint on a part in a separate file without loading it, so how does Catia assembly knows about the Parts geometry? Does It store the part's geometry inside the assembly? That's very unlikely. The fact that there is no UI showing the Part is loaded, does not mean the application did not read the file.
Of course the geometry (I mean the geometry of last time shot of part/body history) must be loeaded into the assembly.
Otherwise you wouldn't see anything in the geometrical display window of the assembly module.
realthunder wrote:
Fri Jan 11, 2019 9:20 am
Remember that A3 allows you to use any feature as constraining element, even historical feature in a body, a sketch, or datum.
To me it doesn't make much sense to use a past historical feature of a body as a constraining element. Anyway, if you want to use in the assembly constraint of Catia a scketch which belonges to a body and was "absorbed" in pad feature, you may create a new set (a generic container) and put into it a copy of the sketch. Each body/geometrical set has a separate history. So, if you leave the geoemtrical set as it is at this point, the sketch inside of it will be visible in the assembly and usable for an assembly coonstraint.

Regarding a datum element of course it may be usefull as a constraining element but it can be used also in Catia (assuming that is present in the last time shot).
realthunder wrote:
Fri Jan 11, 2019 9:20 am
Besides, please remember that A3 does not only store link information inside a Part, the assembly constraint contain links too, and it is stored with the assembly.
I have understood very well this point. May be some time I have misspelled storage of links (which is always done in the assembly) with storage of referred elements (and here there is a big difference between ASM3 and all/most others CAD/assemblies).
wsteffe wrote:
Fri Jan 11, 2019 9:00 am
The Elements declared in the "Part" are to publish those features. Once a Part is frozen, it will not load those "internal" feature next time, and it is those elements that provide upper assembly with the geometry information.
In fact I think that your idea of storing elements in part works makes sense to me, but only for what are normally known as "published features" or we may also call them as "explitely declared interfaces". Other elements (we make call them implicit interfaces) which, are cretaed by the assembly when you make a constraint that is referring to a real geoemtry, are better stored in the assembly. Here I am endorsing a proposal made by saso in a previous post.

Another possibility could be, as I proposed in a previous post, to store the "implicit interfaces" in a separate file/database which is associated with the part (and used by it only in read mode) and contains several sub-sections. Each sub section would would contain the elements created by an assembly and would belong to it. In that way the part would have the chance to know if one of its geometrical entity is used (referred to) in an assembly and the user who opens that part would be warned if he try to delete that geometry. But olnly the assembly that created the element should be allowed to delete it. The reference files (the sections owned by it) should be loaded in into an assembly when it is opened. The assembly would than have the chance to add or remove elements into that file.
But I am not sure if this additional complexity (with respect to the simpler configuration propesed by saso) is worthwhile to implement. The only additional benefit would be an alert that prevents you to delete a geoemetry inside of a part file (a geometry that you forgot to have used somwhere for an assemby constraint).
realthunder
Posts: 1011
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jan 11, 2019 11:43 am

wsteffe wrote:
Fri Jan 11, 2019 11:30 am
In fact I think that your idea of storing elements in part works makes sense to me, but only for what are normally known as "published features" or we may also call them as "explitely declared interfaces". Other elements (we make call them implicit interfaces) which, are cretaed by the assembly when you make a constraint that is referring to a real geoemtry, are better stored in the assembly. Here I am endorsing a proposal made by saso in a previous post.
As a matter of fact, the moment m.cavallerin made that post and got my attention, I started to consider the possibility of making "implicit elements". I am actually testing the idea this very moment.
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
Zolko
Posts: 257
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3 preview

Postby Zolko » Fri Jan 11, 2019 1:05 pm

realthunder wrote:
Fri Jan 11, 2019 9:20 am
The Elements declared in the "Part" are to publish those features.
realthunder wrote:
Fri Jan 11, 2019 11:43 am
I started to consider the possibility of making "implicit elements". I am actually testing the idea this very moment.
I'm confused now: is this the same as saso said earlier ?

saso wrote:
Wed Jan 09, 2019 3:27 pm
Yes, but the best way is to have both. In assembly you set the "normal" links, I guess we could call them implicit, and in Part you set the "preferred" (explicit) linking elements
I think that we should have several things:
  • all solid 3D geometries of all Parts should be visible and accessible in the top-level assembly
  • no reference (Datum) should be available in parent assembly by default, exactly like construction elements in a Sketch are not visible/available in the parent Part. This also concerns 2D sketches on planes.
  • ... except explicitly declared as a such by the Part itself

therefore, in order to place a part in an assembly (with solver or not, unimportant here), there are 2 possibilities:
  • use any 3D geometry, for a quick-n'dirty model this might be practical. But if that geometry is deleted or otherwise made unusable in the part by the part designer, tough, have my sympathies, you're on your own now. That's what Catia v5 does.
  • use explicitly declared reference objects. If the part designer tries to delete that reference in the part, even without any assembly open, he gets a WARNING that this is an external reference and deleting it MAY break some assemblies, is he really REALLY REALLY sure he wants to proceed ? That's what I would like FreeCAD to do.
Last edited by Zolko on Fri Jan 11, 2019 10:41 pm, edited 1 time in total.
User avatar
OakLD
Posts: 97
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Fri Jan 11, 2019 4:19 pm

realthunder wrote:
Fri Jan 11, 2019 11:43 am
As a matter of fact, the moment m.cavallerin made that post and got my attention, I started to consider the possibility of making "implicit elements". I am actually testing the idea this very moment.
Good, you know best the current design. Let us know about the outcome, please :-)

I didn't want to complicate anything, I simply worry that some elementary questions might not be fully unanswered and perhaps it's better to clear them now, so that you don't have wrinkles later...

One of those elementary question still remain unanswered - why the files are opened in the first place? I.e. you don't show a configuration text file to user, when you're reading configuration lines from it. Neither when you write a configuration. Is it because you're writing into the part files the links and this is the most convenient way to do it? The reading must be feasible in FC, even the old A2 was able to that. Also you said "freezed" assys don't need parts to be opened, but they are displayed. So I guess the writing is the problem?

As for the links between assemblies and parts - If you say you're storing the part's geometry representation in the link, another important question pops-up: Why can't you store this same representation in the assembly link at the time of inserting or updating part?
I think this is the way other CAE do it, because you get rid of the complexity when it gets "big" (large and complex files, many references to different assemblies, etc.). They probably add a MD5 property to it too and check at assembly loading event, whether the parts files changed or not by coparing with current MD5 hash (if yes, they typically pop up YesNoCancel dialogue about updating it, or otherwise guide the user through this).

Also, could you please explain, which event is used to update the part element links currently? Is it fired at any change in the part?
Regards,

Oak
realthunder
Posts: 1011
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jan 11, 2019 10:59 pm

OakLD wrote:
Fri Jan 11, 2019 4:19 pm
One of those elementary question still remain unanswered - why the files are opened in the first place? I.e. you don't show a configuration text file to user, when you're reading configuration lines from it. Neither when you write a configuration. Is it because you're writing into the part files the links and this is the most convenient way to do it? The reading must be feasible in FC, even the old A2 was able to that. Also you said "freezed" assys don't need parts to be opened, but they are displayed. So I guess the writing is the problem?
So, you are essentially complain about a UI problem? Too many tabs, is that it? If you look at the screencast of the freeze demo, there is only one tab for the top level assembly at the end. The treeview representation of the frozen part documents are greyed out, and auto collapsed on loading.

As for the links between assemblies and parts - If you say you're storing the part's geometry representation in the link, another important question pops-up: Why can't you store this same representation in the assembly link at the time of inserting or updating part?
No, I didn't say I am storing the part's geometry representation. I said storing the element's geometry, i.e. those used for constraining. The fundamental difference between A3 and A2 is that A3 does not store part's geometry, it use a link to look for the part's geometry, possibly in other files. In this sense, the assembly file is a configuration file, and the parts that contain the actual models are the data files, that's why it has to be loaded.

Also, could you please explain, which event is used to update the part element links currently? Is it fired at any change in the part?
Although I did a lot of modification to FC's core, it is still a modification, not a complete rework. I did not change FC's document model. It is just that with Link, multiple documents can act like one. Objects inside those documents can be computed together with proper dependency sorting. In addition, objects located in one document can be edited at the linking document at a difference placement, which opens up lots of new possibilities.

There is the document partial loading feature, which "Freeze" is based on, to reduce the number of loading files. When a frozen part is used in an upper assembly, none of its child files is loaded at all, but that frozen part's file is still needed. Like I said, the assembly is a configuration, the part with the geometry is the data. When a part is frozen, it stores a flattened geometry copy of its children.
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
OakLD
Posts: 97
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Sun Jan 13, 2019 11:19 am

realthunder wrote:
Fri Jan 11, 2019 10:59 pm
So, you are essentially complain about a UI problem?
Oh, I wouldn't dare to complain :-).
It's the way I look at decision making. I don't think a good althorithm is about what I or someone else want. It's about placing the right questions and getting objective answers - they show the correct way out of the problem. And I only ask, because I'm suspecting the links are more complicated then they can be, forcing some workarounds to be implemented to overcome troubles. If that was true, in long term this would generate a lot of extra work.
realthunder wrote:
Fri Jan 11, 2019 10:59 pm
Too many tabs, is that it? If you look at the screencast of the freeze demo, there is only one tab for the top level assembly at the end. The treeview representation of the frozen part documents are greyed out, and auto collapsed on loading.
I'll test it once a new release with the feature appears, because suspect I won't find time to compile the code (or more specifically to resolve all the dependencies and such troubles during the first compilation, it could take hours to me).

realthunder wrote:
Fri Jan 11, 2019 10:59 pm
No, I didn't say I am storing the part's geometry representation. I said storing the element's geometry, i.e. those used for constraining. The fundamental difference between A3 and A2 is that A3 does not store part's geometry, it use a link to look for the part's geometry, possibly in other files. In this sense, the assembly file is a configuration file, and the parts that contain the actual models are the data files, that's why it has to be loaded.
I'm not picky, but purely logically speaking (which is important in coding), what you state does not implicate neither why the geometry is stored in part and not the assembly, neither (if in part) why the part has to be opened (as an ordinary file in FC, as oposed to reading the link and possibly other relevant data alone into memmory).
Really, don't take it wrong, this is not a criticism at all. It's just questions that should have a potential to help. If you're 100% sure of what your doing is the best, than you should say so and we can cut down this discussion, which is taking you precious time.
realthunder wrote:
Fri Jan 11, 2019 10:59 pm
Although I did a lot of modification to FC's core, it is still a modification, not a complete rework. I did not change FC's document model. It is just that with Link, multiple documents can act like one. Objects inside those documents can be computed together with proper dependency sorting. In addition, objects located in one document can be edited at the linking document at a difference placement, which opens up lots of new possibilities.
Interesting, I'll try to find time to look into the code, so that I could better evaluate what you wrote.
realthunder wrote:
Fri Jan 11, 2019 10:59 pm
There is the document partial loading feature, which "Freeze" is based on, to reduce the number of loading files... When a part is frozen, it stores a flattened geometry copy of its children.
Thank you for explanation. Likewise I said above, I'll test it when I have binaries with the new featuers.
Regards,

Oak
realthunder
Posts: 1011
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Jan 21, 2019 3:24 am

New asm3 version are released.

One thing to take NOTE. This version will auto migrate your assembly files, and you will not be able to open those migrated files in my older release. Please remember to BACKUP your files first!

Please checkout the release note and the demo video links inside.

There are quite a lot changes in this version, code wise, which is why it is delayed for so long. Feel free to report any problem you have.
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
nemesis
Posts: 342
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 preview

Postby nemesis » Mon Jan 21, 2019 7:48 am

realthunder wrote:
Mon Jan 21, 2019 3:24 am
New asm3 version are released.
Thanks a lot !!!
going to test it ASAP
Mark Szlazak
Posts: 402
Joined: Tue Apr 04, 2017 6:06 pm
Location: Edmonton, Canada

Re: Assembly3 preview

Postby Mark Szlazak » Mon Jan 21, 2019 7:59 am

realthunder wrote:
Mon Jan 21, 2019 3:24 am
New asm3 version are released.
Thank you Lei !
User avatar
jpg87
Posts: 278
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Mon Jan 21, 2019 9:03 am

realthunder wrote:
Mon Jan 21, 2019 3:24 am
New asm3 version are released.
Thank you again for this work. I will start testing again as soon as possible.
My website : http://help-freecad-jpg87.fr updated 2018/10/17