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

Edge connection endpoint behaviour missing from GH #1104

Open
6 tasks
lorinczandrea opened this issue Oct 23, 2024 · 1 comment
Open
6 tasks

Edge connection endpoint behaviour missing from GH #1104

lorinczandrea opened this issue Oct 23, 2024 · 1 comment
Assignees
Labels
framework:grasshopper Issues specific to grasshopper request:user Request from a user type:feature New feature or request

Comments

@lorinczandrea
Copy link
Contributor

Note 1:

This feature exists in the API, but hasn't been implemented in the Grasshopper toolkit yet.

public partial class EdgeConnectionBase: EntityBase
{
[XmlAttribute("moving_local")]
public bool MovingLocal { get; set; } // bool. Default false according to strusoft.xsd but true in GUI?
[XmlAttribute("joined_start_point")]
public bool JoinedStartPoint { get; set; } // bool. Default false according to strusoft.xsd but true in GUI?
[XmlAttribute("joined_end_point")]
public bool JoinedEndPoint { get; set; } // bool. Default false according to strusoft.xsd but true in GUI?
}

Note 2:

EdgeConnection.JoinedStartPoint and EdgeConnection.JoinedEndPoint properties must be true by default, as they are in FEM-Design.

FEM-Design functionality:

image

Tasks

  • Add new parameters to the existing EdgeConnection constructor or create a new one or add a new method to the class to set the endpoint behaviour attributes.

private EdgeConnection(Releases.RigidityDataType3 rigidity, string libraryName = null)
{
this.EntityCreated();
this.MovingLocal = false;
this.JoinedStartPoint = true;
this.JoinedEndPoint = true;
if (libraryName is null)
this.Rigidity = rigidity;
else
this.PredefRigidity = new Releases.RigidityDataLibType3(rigidity, libraryName);
}

EdgeConnection.MovingLocal, EdgeConnection.JoinedStartPoint and EdgeConnection.JoinedEndPoint should be added to the constructor as input parameters. E.g.:

private EdgeConnection(Releases.RigidityDataType3 rigidity, string libraryName = null, bool movingLocal = false, bool joinedStartPoint = true, bool joinedEndPoint = true)
        {
            EntityCreated();
            MovingLocal = movingLocal;
            JoinedStartPoint = joinedStartPoint;
            JoinedEndPoint = joinedEndPoint;

            if (libraryName is null)
                this.Rigidity = rigidity;
            else
                this.PredefRigidity = new Releases.RigidityDataLibType3(rigidity, libraryName);
        }
  • The MovingLocal property controls the functionality shown in the picture below:

image

  • Create a new "EndPointBehaviour" GH component.

  • Update existing EdgeConnection GH components (EdgeConnection.Construct, EdgeConnection.Hinged, EdgeConnection.Rigid). Add "EndPointBehaviour" as an input parameter.

  • Update EdgeConnection.Deconstruct

  • Notify the user! Discourse ticket

@lorinczandrea lorinczandrea added type:feature New feature or request framework:grasshopper Issues specific to grasshopper request:user Request from a user labels Oct 23, 2024
@lorinczandrea lorinczandrea added this to the 23.8.0 milestone Oct 23, 2024
@lorinczandrea lorinczandrea self-assigned this Oct 23, 2024
@Marco-Pellegrino
Copy link
Contributor

Marco-Pellegrino commented Oct 23, 2024

@lorinczandrea

If the property is accessible in C#, we can give a user a simple c# or Python component to set the properties.

step:
Place a Python component and connect the edge edge connection into "x"

Inside the Python component you should be able to write:

x.JoinedStartPoint = True

@Marco-Pellegrino Marco-Pellegrino removed this from the 23.8.0 milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework:grasshopper Issues specific to grasshopper request:user Request from a user type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants