Attaching complex assemblies

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Attaching complex assemblies

Greg Frost
I have been looking at the inmoov project http://www.inmoov.fr and was thinking that a similar project in OpenSCAD would be awesome. Like many complex projects, being able to visualize assemblies in OpenSCAD would be nice, but it can be a pain to create a scene with lots of individual parts having to rotate and translate them all into place.

Looking around at what others have done, I stumbled across the attach library http://www.iearobotics.com/blog/2012/09/10/enhancing-openscad-with-the-attach-library/ But it seems to only supports one level of attachment.

Can anyone point me at any other examples that might be a bit more extensible (i.e. Being able to attach parts to other parts that are already attached to other parts)?

Is there a best practice way to do this?
Reply | Threaded
Open this post in threaded view
|

Re: Attaching complex assemblies

nophead
I don't find this a pain or feel the need for a library. It is trivial to make assemblies in OpenScad using modules.

I choose convenient origins for my vitamins, for example:

For screws, nuts and washers the origin is the centre of the surface that meets the work piece, i.e. under the head.

For stepper motors it is the centre of the mounting face, etc.

All my printed parts are oriented flat for printing but have sensible XY origins. For example a motor bracket would have the same origin as the motor that mounts on it. You then place them together simply by calling both modules in a motor assembly module.

To place the screws I have modules that translate a child to the screw positions. That is used both to drill the holes and place all the fasteners. You then rotate and translate the whole motor bracket assembly that to where it needs to be.

Some modules have an optional child that is placed relative to itself. So for example washer() translates by its thickness so you can do screw_positions() washer() screw() place washers under screws.

If an object has lots of mounting points then it has a collection of modules to translate to those positions and place children there.

Attaching parts to parts already attached is rarely an issue with a hierarchical design. You just have nested assemblies and each positions its child assemblies relative to itself. Exceptions are things like belts and cables that span between assemblies. In which case I just make the positions of the assemblies a variable or a function that can be reused to both position the assemblies and size and position the object that spans and connects to them.




On 10 August 2014 09:30, Greg Frost <[hidden email]> wrote:
I have been looking at the inmoov project  http://www.inmoov.fr
<http://www.inmoov.fr>   and was thinking that a similar project in OpenSCAD
would be awesome. Like many complex projects, being able to visualize
assemblies in OpenSCAD would be nice, but it can be a pain to create a scene
with lots of individual parts having to rotate and translate them all into
place.

Looking around at what others have done, I stumbled across the attach
library
http://www.iearobotics.com/blog/2012/09/10/enhancing-openscad-with-the-attach-library/
<http://www.iearobotics.com/blog/2012/09/10/enhancing-openscad-with-the-attach-library/>
But it seems to only supports one level of attachment.

Can anyone point me at any other examples that might be a bit more
extensible (i.e. Being able to attach parts to other parts that are already
attached to other parts)?

Is there a best practice way to do this?



--
View this message in context: http://forum.openscad.org/Attaching-complex-assemblies-tp9275.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566