Multi Shape object combined into a single shape

Multi Shape object combined into a single shape

rtsuge
Participant Participant
151 Views
5 Replies
Message 1 of 6

Multi Shape object combined into a single shape

rtsuge
Participant
Participant

I created an inline scan tunnel using SketchUp. In our simulation we want the internal surfaces of the tunnel to change colors from green to red. Red signifying when a scan occurs. The scan tunnel itself is a basic shape with the visual changed to the .skp model. The color changes are from 3 basic shapes that line the inside of the tunnel. The tunnel is positioned above a belt conveyor. All of this seems to be working through an Object Flow. 

 

The issue we're having is being able to use this in future models. There's a few things we don't know how to do:

  • "Welding" all of the basic shapes to the scan tunnel so that it's just a single shape
  • Keeping it attached to the conveyor and maintaining the logic that's built into photo eyes
  • Saving this into a user library so that we can reuse it in other models. 

Is any of this possible?

0 Likes
Accepted solutions (2)
152 Views
5 Replies
Replies (5)
Message 2 of 6

guiroehe
Advocate
Advocate
Accepted solution

Hi @rtsuge ,

I will not be able to give you a complete answer, but here are some ideas coming from my experience:

1. "Welding" the geometry : I would suggest to create a single geometry in your 3D tool (sketchup, ...). You could control which items change color or not based on the frames and meshes that are imported in FlexSim (picture 1 below); an alternative is to use a container object and add all geometry to it (picture 2 below). By adding the container, you are adding a new layer (new coordinate system, etc.) so you have to manage connections, transformations, and other aspects from the container level. Your flow would refer the container.find("Scanner1"), for instance...

guiroehe_0-1746761818127.png

guiroehe_1-1746761924794.png

2. Keeping all attached: this would be possible with the same container object mentioned above. Please remember you have to manage changes on the container geometry via onPreDraw event and make sure the object is attached to the conveyor after the changes, which can be a bit cumbersome if your conveyor has an incline/decline

3. Add to the library with the attached flow: once you have your object containerized and the flow working properly as you expect, you can start by clicking this option in the quick menu

guiroehe_2-1746762359073.png

If you want to do something fancier with the library, I suggest you scan through the forum; there are a few posts that will help you to connect objects and flows using droppath/dropscript.

I hope this helps!

 

Message 3 of 6

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

You could use the OnDraw trigger of a Photo Eye / Decision Point to draw the scan tunnel shape and the colored panels on top of it. I've attached an example. The draw code gets a little messy and you just have to play around with the numbers until you get it looking the way you want, but this way the shape automatically is locked to the photo eye. (Try dragging the photo eye to a new spot on the conveyor or adding it to a user library and then dragging a new one onto a conveyor)

 

Matthew_Gillespie_0-1746809418780.png

 



Matthew Gillespie
FlexSim Software Developer

Message 4 of 6

guiroehe
Advocate
Advocate

@Matthew_Gillespie,
this is an interesting approach.

I wonder whether you could explain if this would be the recommended approach to build a chute (essentialy, two conveyors with different inclinations, connected as a single object). If not, what would be your recommended approach, since FlexSim does not have polyline conveyors? Thank you.

0 Likes
Message 5 of 6

Matthew_Gillespie
Autodesk
Autodesk

@guiroehe I don't think adding custom draw code would help too much in that situation. You'd still want the functionality of both conveyors. You're probably best off using a container object to put two conveyors into it so you can treat it as a single object.



Matthew Gillespie
FlexSim Software Developer

Message 6 of 6

guiroehe
Advocate
Advocate

Thank you, @Matthew_Gillespie !
That is what I did, but I really liked your approach for other visuals and decorations!

0 Likes