question

Cindy Azuero avatar image
1 Like"
Cindy Azuero asked Brenton King commented

¿Is there a way in which you can give color to travel networks?

I want to create two different travel networks. One for operators and the other one for transporters and I want to visually identify them when I'm modeling. Can I do this? how?

FlexSim 16.0.1
network nodesnetwork settings
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

LeGrand Gold avatar image
3 Likes"
LeGrand Gold answered Brenton King commented

networknode-colors.fsmYou could draw your own spheres by putting the following in the Custom Draw trigger of each NetworkNode:

/**Draw Colored Sphere*/
treenode current = ownerobject(c);
treenode view = param(1);

drawsphere(0, 0, 0, get(viewpointradius(view)), 255, 0, 0);

The get(viewpointradius(view)) command used as the fourth parameter of drawsphere is a variable of the 3D view that indicates how zoomed in/out you are. This just changes the size of the sphere so you can always see it, similar to the default functionality of the NetworkNode.

If you want the sphere to be smaller or bigger, multiply the viewpointradius by a sizing factor. This will decrease the size of the sphere by 10%:

drawsphere(0, 0, 0, get(viewpointradius(view)) * 0.9, 255, 0, 0);

And this will increase the size by 10%:

drawsphere(0, 0, 0, get(viewpointradius(view)) * 1.1, 255, 0, 0);

Going one step further, you can create some user defined Global Macros that specify colors, which will ensure that all the nodes on the same network are the same color. Also, you can change the color of all nodes by just by changing the macros instead of each individual Custom Draw trigger.

A model is attached that demonstrates this.


global-macros.png (157.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Brenton King avatar image Brenton King ♦ commented ·

Haha, great work around LeGrand. This can't be a difficult feature for FlexSim to add. I'll send it in as a feature request. (I think the line should be able to change too)

0 Likes 0 ·
Brenton King avatar image
2 Likes"
Brenton King answered Cindy Azuero commented

AGV paths can have unique colors. If you can get away with using them. Unfortunately, you can't give network node paths custom colors.

I have put my network nodes in containers before to group them.(placing them inside of an object like a Visual Plane) This allows you to hide the contents of a container which would hide all your network nodes that are inside of that container. You could also move them all together as one by dragging the container. Another benefit is that your tree looks WAY nicer. I created a model showing what I mean. 2-separate-network-paths.fsm

Yuck

Ahhhh, much better. :)


· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

@Brenton King is there a method to get the spline geometry of the paths to draw the splines separately as gl-code?

1 Like 1 ·
Cindy Azuero avatar image Cindy Azuero commented ·

It's a good idea. Thanks!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.