Cancel
Showing results for 
Search instead for 
Did you mean: 

3D Changing Track object graphics.

Creator
Creator

Hello everyone,

I need to develop a new model for demonstration in 3D. Model should show Track with Different cross-sectional area of existing options. How do I create TRACK with new cross-sectional area? Attached pic.

 

Thank you,

Shimon

TrackGraphic.png

5 REPLIES

Re: 3D Changing Track object graphics.

Siemens Phenom Siemens Phenom
Siemens Phenom

There are two ways to accomplish that.

 

Every object that is length-oriented in 3D has an attribute _3D.ExtConfiguration. This attribute holds most of the settings you find in the "Extrusion" property page in the 3D properties dialog.

However, these settings here come in a more "basic" form. The extrusion definition of every object consists of several configurations which each define an extrusion profile.

 

Now, to edit those profiles. you can either read out and set the attribute with SimTalk (that's the way I would prefer) or click on the "Advanced..." button in the property page.

 

SimTalk:

local t : table := _3D.ExtConfiguration;

debug; -- Add your code here or use the break to modify the table by hand

_3D.ExtConfiguration : t;

 

UI:

1.) Click on "Advanced..." (a sub-dialog opens)

2.) Select the profile you want to modify or add a new one

3.) Click on "Edit..."

4.) Edit the profile

5.) Close the sub-dialog

 

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: 3D Changing Track object graphics.

Creator
Creator

Hello Peter,

Thanks for your reply. I tried to change the cross-sectional shape of extrusion without success. I need to know the principle of setting XY coordinate when edit the profile of new extrusion shape. Is there an example or detailed help?

 

Thank you

Shimon

Re: 3D Changing Track object graphics.

Siemens Phenom Siemens Phenom
Siemens Phenom

I'm afraid there is no adequate help topic or example at the moment.

 

I assembled a little example that hopefully helps you:

 

1.) Editing with the UI.

* Open the 3D Properties dialog of the length oriented object that you want to modify. In my example, let this be an instance of .MaterialFlow.Line in .Models.Frame: .Models.Frame.Line

* Switch to the tab "Extrusion". By default, the extrusion of the line is configured to be a belt conveyor which consist of two frames, two rows of legs and one lane (the belt itself). Each of those parts has an extrusion profile.

* Click on the button "Advanced" and delete all profiles except "Lane". Now renme the profile "Lane" to e.g. "MyProfile".

* Click on the button "Edit...". In the dialog that opens,enter the values you can see in the attached screenshot. You can edit an anchor by selecting it and clicking on "Edit Values...". Notice that to work as expected, a profile must consist of a set of anchors that surround an area - no intersecting lines are allowed!
* Click on "OK" - you return the "Advanced" sub dialog. Close that dialog by clicking on "X". Now you're back in the 3D properties dialog. Click in that on "OK", too.
* The result should more or less look like the second attached picture.

2.) Editing with SimTalk.

I already mentioned that I prefer that way and that is for a reason. While the "Advanced" dialog allows you to modify a profile, SimTalk allows you to modify other settings, such as the multiplicity, offsets etc., too.

If you paste the following code into a method and run it, you will get the same result as above.

However, this way you can easily make your profile depend on parameters or change further settings, too. To learn more about how our built-in extrusions work, simply apply a setting you want to use as a template, read it with _3D.ExtConfiguration (see below) and analyze how the configurations are built.

 

Method code:

 is
do
 local configs : table := Line._3D.ExtConfiguration;
 debug;
 configs.delete({0, 2}..{*, *});
 debug;
 configs[0, 1] := "MyProfile";
 local profile : table := configs[1, 1];
 profile.delete;
 profile[1, 1]  := -0.07;
 profile[2, 1]  := -0.10;
 profile[1, 2]  := -0.07;
 profile[2, 2]  := -0.09;
 profile[1, 3]  := -0.01;
 profile[2, 3]  := -0.08;
 profile[1, 4]  := -0.01;
 profile[2, 4]  :=  0.08;
 profile[1, 5]  := -0.07;
 profile[2, 5]  :=  0.09;
 profile[1, 6]  := -0.07;
 profile[2, 6]  :=  0.10;
 profile[1, 7]  :=  0.07;
 profile[2, 7]  :=  0.09;
 profile[1, 8]  :=  0.01;
 profile[2, 8]  :=  0.08;
 profile[1, 9]  :=  0.01;
 profile[2, 9]  := -0.08;
 profile[1, 10] :=  0.07;
 profile[2, 10] := -0.09;
 profile[1, 11] :=  0.07;
 profile[2, 11] := -0.10;
 profile[1, 12] := -0.07;
 profile[2, 12] := -0.10;
 configs[2, 1] := 0; -- Extrude forwards
 configs[3, 1] := 1;
 configs[4, 1] := 0;
 configs[5, 1] := 2;
 configs[6, 1] := 0;
 configs[7, 1] := 0; -- Create one extruded graphic
 configs[8, 1] := 0;
 configs[9, 1] := 0; -- Omit that line if your version is lower than 11TR3
 Line._3D.ExtConfiguration := configs;
end;

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: 3D Changing Track object graphics.

Creator
Creator

Hello Peter
Thanks for the answer, I checked the creation of a new profile and it works. I have a misunderstanding of the orientation of the axes X and Y. I think I'm getting a reverse position of RAIL_1 and 2 See attached model.

 

Thank you,

Shimon.

Re: 3D Changing Track object graphics.

Siemens Phenom Siemens Phenom
Siemens Phenom

I think I know what you mean.

 

These profiles can not only be used to define the forward extrusion, e.g. for your rails or your profile, or for a lane as in some of our predefined configurations, but also for automatically created graphics that don't follow the actual extrusion path. These configurations e.g. are responsible for the legs, rollers, rail crossbars etc.

In order to make that work, the X/Y axis definition is not fixed.

As a result, the axis definition for the forward extrusions rotate the profile along the path and every anchor defines its own theoretical local coordinate system.

To illustrate that, lets assume a conveyor that has been inserted from left (-Y) to right (+Y) along a grid line. In that case a positive X value in the profile becomes a negative Y value in the scene, and a positive Y value in the profile becomes a positive Z value in the scene.

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution