Vertex Assembly, any ideas about attempting this.....

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!
freedman
Veteran
Posts: 3478
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Vertex Assembly, any ideas about attempting this.....

Post by freedman »

Thought I would write a few words about Vertex Assembly (V-Assy), maybe get some response, either positive or negative. :)

The goal, to make a new Assembly tool that has less dependency on building a complicated tool, something that integrates into the current standard FreeCAD work process. I will start with PartDesign as a base. The assembly process will be handled by a macro currently, if it works maybe it can be other. Everything I'm writing is subject to change but here are the first rules I see.

1) The assembly connection point of an object to an object (i.e. an Assembly) is by object(1) a stand-alone sketch vertex to (2) object origin. All connections are placed as Normal-to the sketch plane.

2) Bodies don't get to move in axis X,Y , they will be scanned and Zeroed if moved, rotation still works as normal. The placed object origin is held at X,Y,Z per the vertex, the z-offset and rotation will be applied after placement. To move an object XY, you move the associated vertex.

3) Objects are placed per their origin so they will need to be drawn with their origin in-mind, as it should be.

4) An assembled object will have new properties added that describe what sketch and vertex it is attached to.

5) To make an assembly all Bodies need to be in a part container, this will define the assembly and how the entire assembly can move.

A test assembly, a piece of wood and a screwed-on coat hook. The wood block sketched on the XY plane and padded negative, the block sketch has a vertex added for the coat hanger placement which will be the coat hanger origin. The coat hanger base sketch will have two vertex for the screws, these will be in the hole centers. I guess this would be four Bodies; wood, hanger, screw1, screw2. All this in a Part so it could be placed on a wall.

So how does the assembly stay as an assembly as things are changed?
I see the macro scanning the added properties and then verifying the placement of the assembled objects. For instance if a sketch is moved in the Z axis the macro would see the two placements are not the same and either a dialog or auto placement would take place. I currently plan to use global coords to initially place/move objects, then monitor changes with local coords.

Thanks
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Vertex Assembly, any ideas about attempting this.....

Post by chrisb »

This sounds to me rather familiar. Can't all this be achieved by attachments? Where are the differences? If it's done by macro, is it parametric?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
drmacro
Veteran
Posts: 9010
Joined: Sun Mar 02, 2014 4:35 pm

Re: Vertex Assembly, any ideas about attempting this.....

Post by drmacro »

I agree with @chrisb, this can be accomplished pretty much with a combination of existing tools. Plenty of folks do it now and never use the assembly workbenches.

And IMHO (read the rest of this sentence as if I have the caps lock on and am screaming... :mrgreen: ), we don't need another assembly tool; there is enough confusion with the existing 3, 1 deprecated, and Std_Part tools as is.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
chrisb
Veteran
Posts: 54313
Joined: Tue Mar 17, 2015 9:14 am

Re: Vertex Assembly, any ideas about attempting this.....

Post by chrisb »

drmacro wrote: Mon Dec 13, 2021 11:26 am we don't need another assembly tool
+1.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bambuko
Veteran
Posts: 2185
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Vertex Assembly, any ideas about attempting this.....

Post by bambuko »

I would much rather have complex assembly workbench capable of being used for simple things as well as the complicated stuff,
than "dumbed down" tool incapable of anything but the simplest stuff.
As for idea of macro "to do everything" - would never use it, prefer to be in control manually.
Assembly workbench I use, is doing great job and I definitely don't need another one...
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
freedman
Veteran
Posts: 3478
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Vertex Assembly, any ideas about attempting this.....

Post by freedman »

Obviously, we don't want another Assembly. :)

I'm building a macro, I want this for myself and my future FreeCAD. The concept is pretty simple; I glue two objects together with a Sketch vertex and object origin. The macro will monitor these two placements and if they move apart the macro will re-align them. That's it!
There won't be dependencies, if the macro isn't running when changes are made the user will need to makes the adjustments manually.

My target is for the user that has built a couple objects and they would like to build them into an assembly. They aren't really interested in learning a whole new concept (Workbench) to connect a couple objects. I also think this was the goal of building PartDesign, it was supposed to simplify the user experience but it currently has no simple assembling tools.

I'm really just adding some automation to what would normally be done as an Expression. Expressions work great but they are a hard to follow if you have more than a few pieces.

Thanks for feedback
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Vertex Assembly, any ideas about attempting this.....

Post by Zolko »

freedman wrote: Tue Dec 14, 2021 4:02 pm I'm building a macro ...

I'm really just adding some automation to what would normally be done as an Expression. Expressions work great but they are a hard to follow if you have more than a few pieces.
this looks like what Assembly4 does, and this is exactly how it started.
try the Assembly4 workbench for FreCAD — tutorials here and here
freedman
Veteran
Posts: 3478
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Vertex Assembly, any ideas about attempting this.....

Post by freedman »

Zolko wrote, this looks like what Assembly4 does, and this is exactly how it started.
You could probably do what I'm working on in your sleep. :)

I'm really just trying to build the minimal code engine that does placing via a vertex and then bind that connection, hoping it can be used for many different things, that's as far as I'm going. Using Sketch vertex means I don't need to do anything special and that's my kind of code because I'm not that good with python. I think it will find a use case of some kind.

I like Assembly4, it is a full featured assembler.
User avatar
adrianinsaval
Veteran
Posts: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: Vertex Assembly, any ideas about attempting this.....

Post by adrianinsaval »

isn't what you say what Part_EditAttachment does?
freedman
Veteran
Posts: 3478
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Vertex Assembly, any ideas about attempting this.....

Post by freedman »

isn't what you say what Part_EditAttachment does?
If you look at the bottom of the page "Limitations", it has some.
Post Reply