Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct_api: Joint.connected_to is now a set(), not singleton #138

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ezrec
Copy link
Contributor

@ezrec ezrec commented Feb 16, 2023

  • Make Joint.connected_to a set(), instead of a singleton

This permits multiple attachments to a single joint; for example a common 'origin' virtual mounting point; or multiple attachments to a slot in 2020 aluminum extrusion.

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (8209624) 95.72% compared to head (f336813) 95.72%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #138   +/-   ##
=======================================
  Coverage   95.72%   95.72%           
=======================================
  Files          21       21           
  Lines        6455     6455           
=======================================
  Hits         6179     6179           
  Misses        276      276           
Files Changed Coverage Δ
src/build123d/topology.py 95.52% <100.00%> (ø)

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@ezrec ezrec force-pushed the issue-0-joint-multiple-attach branch from d7fff77 to f10763a Compare February 20, 2023 02:03
@gumyr
Copy link
Owner

gumyr commented Feb 22, 2023

Although I can see why this would be useful for linear joints like those on extrusions, it doesn't make sense to me generally. A ball and socket joint can't have two balls in the socket. Rigid joints would be confusing as two parts are likely to overlap.

Given that any part can have as many joints as desired, this seems like redundant functionality that just makes everything more difficult to understand. Is there a compelling reason by this approach is required?

@ezrec
Copy link
Contributor Author

ezrec commented Feb 26, 2023

A ball and socket can't have two balls, but a ball can connect to two sockets (double-ball joint in claymation armatures) https://www.animationtoolkit.co.uk/12mm-double-ball-joint/

And with respect to Linear Rails, I'm working on a hardware library for my workflow, and it makes more sense to me to have a single linear joint for each side that I can attach multiple to, instead of having to instance with each specific rail with a unique joint set, ie something like:

class VSlot2020(Compound):
  def __init__(self, north_slot_joint_names = set(), south_slot_joint_name=set(), ....)
  ...
  
rail = VSlot2020(east_slot_joint_names = { "endstop", "carriage", "idler_block" })

@ezrec ezrec force-pushed the issue-0-joint-multiple-attach branch from f10763a to 1639dab Compare March 9, 2023 01:25
@ezrec ezrec force-pushed the issue-0-joint-multiple-attach branch from 1639dab to 3d8f3e7 Compare April 22, 2023 00:22
@ezrec ezrec force-pushed the issue-0-joint-multiple-attach branch from 3d8f3e7 to f336813 Compare September 8, 2023 02:40
@roman-dvorak
Copy link
Contributor

I strongly support the proposal to allow multiple objects to be attached to a single joint, as it adds significant value and flexibility across various joint types:

  1. LinearJoint: Essential for scenarios where multiple carriages need to move along a single linear guide. Splitting into multiple segments or using multiple linear joints is not sustainable, as it complicates object generation and maintenance. This approach would streamline designs and improve long-term manageability.

  2. BallJoint: Simulating situations where multiple objects are suspended from a single point, akin to a "rope" attachment, is a practical application of this feature.

  3. CylindricalJoint: Useful for scenarios such as a threaded rod with multiple independent nuts. While having two cylindrical joints on either side makes sense in some cases, the ability to have a single rod with multiple nuts is invaluable for other configurations.

  4. RigidJoint: I suggest that attaching multiple elements to a single rigid joint simplifies complex assemblies. For instance, fixing both a thin part and a screw into the same joint can reduce the need for additional joints and simplify the design.

While this approach may introduce some inaccuracies in real things, it offers significant practical benefits for creating assemblies and similar tasks. I'm curious if this modification, from a single element to a set, necessitates changes in related areas such as assembly processing. Understanding the potential downstream impacts would be important for fully assessing this proposal.

Thank you for considering this enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants