cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic node connection in intersection of lines

Automatic node connection in intersection of lines

Hi FlexSim team,

This message is to propose the idea of connect a node automatic with an entire line.

Currently, is not possible to connect a node if the line does not finish in that specific point. The idea is, to automate the connection independently if there is a line created before, I mean, be possible the connection in the intersection.

76795-1701890760354.png

 

Thank you,

1 Comment

With a path highlighted in your 3D view this code will allow you to connect to a copy of one of the nodes it places at the midpoint.

Object view=views().find("active>Documents/Perspective/1+/~");
treenode path=selectedobject(view,0);
if (path.up.name=="connectionsout"){
Object nn1=findownerobject(path);
Object nn2=findownerobject(path.value);
Vec3 nn1loc=nn1.location.project(nn1.up,model());
Vec3 nn2loc=nn2.location.project(nn2.up,model());
Vec3 midloc=nn1loc+(nn2loc-nn1loc)/2;
Object newnode=nn2.copy();
path.value.up=connectionsout(newnode);
newnode.location=midloc.project(model(),nn2.up);
contextdragconnection(newnode,nn2,"A");
newnode.name=newnode.name+"_copy";
}

Attached is a model with that as a user command.

SplitNetworkPath.fsm

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea