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!
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

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

Post by adrianinsaval »

hmmm I wonder if that isn't just outdated :? before posting I tried attaching a body to a sketch endpoint and then move that endpoint and the body moved with it. Play around with the constraints in the sketch in this file (created with 0.19.3) and see for yourself how the body and part move with their corresponding vertex, I don't know what is that is not supported? :?: can any dev confirm?
Attachments
attachment example.FCStd
(13.87 KiB) Downloaded 11 times
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

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

Post by TheMarkster »

Rotating the attachment offset of the part container has no effect for me. I was thinking to link it to the angle constraint with an expression to keep it oriented with one edge of the box always parallel to the line from the sketch. But if you add a circle and attach to the circle concentrically, then the attachment offset angle adjustment works as expected.
freedman
Veteran
Posts: 3466
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

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

Post by freedman »

I've been doing vertex attachment for a couple weeks, I call my macro "ConX". The act of doing it is pretty easy but implementing it for the user has been a challenge. The macro and FreeCAD software is rock solid at keeping things attached no matter if objects are in Part containers. The original code that started all this is in this post: https://forum.freecadweb.org/viewtopic.php?f=22&t=64143, it shows how to get and place objects globally.

After I got the macro working I needed to know some angles for a stepping motor project so I took the macro in the direction of simulation (real rotation numbers).

You can see that I am rotating the pulleys by angle (the belt isn't moving). I then change the angle (by transform) of the Part base plate and all the objects follow. This is using a 1 millisec. timer to update. I made two models, pulley and base, then used simple copy for the duplication. All the objects are attached to vertex that are placed on the plate. I modify the sketch name to start with "LZ_" (landing zone) to denote a sketch with attachment vertex. All objects are placed using sketch vertex index values. This is very efficient if you have many object to place, for instance if I wanted to model a long stretch of wood rail fence.

There is no recompute during the sim, all it needs is a updateGui. I will post the macro as soon as I can resolve the user issues. It needs to be simple enough to use and explain. :)
Attachments
try_6.gif
try_6.gif (900.66 KiB) Viewed 682 times
Post Reply