Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Tecnomatix
- Forums
- Blogs
- Knowledge Bases
- Groups

- Siemens PLM Community
- Tecnomatix
- Plant Simulation
- Line : Reverse Segments

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-08-2016 06:31 AM

Hello everyone,

I'm trying to reverse segments in a line with SimTalk. How can I handle it ?

We can do it manually like that : Right Click -> Segments -> Reverse !

But how can we do it witgh SimTalk ?

Thank you very much

BR

O.C

Solved! Go to Solution.

15 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-08-2016 07:40 AM - edited 08-08-2016 07:42 AM

something similar was discussed here

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-08-2016 06:46 PM

Thank you for your comment ! The conversation is quite interesting !

What I'm trying to do is to make two parallel lines spin around a point (black point as shown on the picture).

I didn't find the formula to describe the rotation !

Thank you very much !

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 03:07 AM

Create a transporter like here:

http://www.bangsow.de/detail_en.php?id=716

Add two transporter to the "turntable" with the loading bay type line. Works well.

Steffen Bangsowfreelance simulation specialist web: www.bangsow.eu mail: steffen@bangsow.net |

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 03:56 AM

Hello.

Have got me thinking a bit more, through drawing out a few conditions and plotting their coordinates in excel and then finding a circular fourmlar that passes through these points the equation needed can be found to do this. I always find it useful to place into excel the values you got to work with at the top so you know what is available and then test your fourmlar on multiple conditions at the same time to check for the results.

Attached you will find the excel sheet I produced to solve this, I solved it for one of them only and then once I had tested and got that working in plant sim I then inverted the 'distance' component and used that for the other line.

var midPointX : real := 300 var midPointY : real := 300 var x : Real var y : Real var distance : real := 40 for var angle := 0 to 360 Line.ObjectAngle := angle x := midPointX - (distance * sin((Line.ObjectAngle / 180) * Pi)) - (0.5 * Line.Length * (1 / ScalingFactor) * cos((Line.ObjectAngle / 180) * Pi)) y := midPointY + (distance * cos((Line.ObjectAngle / 180) * Pi)) - (0.5 * Line.Length * (1 / ScalingFactor) * sin((Line.ObjectAngle / 180) * Pi)) Line.SetPosition(round(x), round(y), false) Line1.ObjectAngle := angle x := midPointX + (distance * sin((Line.ObjectAngle / 180) * Pi)) - (0.5 * Line.Length * (1 / ScalingFactor) * cos((Line1.ObjectAngle / 180) * Pi)) y := midPointY - (distance * cos((Line.ObjectAngle / 180) * Pi)) - (0.5 * Line.Length * (1 / ScalingFactor) * sin((Line1.ObjectAngle / 180) * Pi)) Line1.SetPosition(round(x), round(y), false) wait 0.1 next

Hope you like it. As stated in the other thread, a lot can be done with a bit of code

JamesM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 04:01 AM

I have a question about the paramaters "Distance" and "ScalingFactor" what are they corresponding too ?

Thank you !

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 04:03 AM

Thank you Steffen !

I had a look on your model, it's a genius way to handle the problem !

Thank you

I had a look on your model, it's a genius way to handle the problem !

Thank you

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 04:06 AM

Hello

In this case, 'distance' is one of the varaibles within the method, it is the distance of your line from the mid point. Think of your line as a triangle, rotation point is 1 corner and the other is the referance point of the line with the hypotonose between them, the distance from the rotation point to the middle of the line is 1 side and the other is half the length of the line object. This should help you to also see how the furmlar is constructed using these 2 components.

The 'ScallingFactor' is a part of the frame, it is the attribute that links the pixels in the 2D frame to your length unit (most likely meters) and by default is 0.05, meaning 1 pixel is 5cm, as the grid spacing is 20 pixels apart then it means each grip spacing is 1m apart.

JamesM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 04:11 AM

Thank you again, I'll write it today and keep you in touch !

Have a nice day !

BR

O.C

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-09-2016 06:15 AM

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc