cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Why rotatemesh is in red?

-MFra-
21-Topaz II

Why rotatemesh is in red?

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

rotate.jpg

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:-MFra-)


@-MFra- wrote:

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

 


Because rotate operates upon the whole 3D mesh (3x(BoundxBound)) whereas rotatemesh only operates upon an individual mesh (eg, x-y or z-x (BoundxBound)).  Try vectorizing the rotatemesh expression in Frotate.

 

Stuart 

View solution in original post

11 REPLIES 11
VladimirN
24-Ruby II
(To:-MFra-)

 Hi,

 

Please upload your worksheet.

StuartBruff
23-Emerald III
(To:-MFra-)


@-MFra- wrote:

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

 


Because rotate operates upon the whole 3D mesh (3x(BoundxBound)) whereas rotatemesh only operates upon an individual mesh (eg, x-y or z-x (BoundxBound)).  Try vectorizing the rotatemesh expression in Frotate.

 

Stuart 

-MFra-
21-Topaz II
(To:StuartBruff)

Thank you very much!

rotate+.jpg

StuartBruff
23-Emerald III
(To:-MFra-)

Nessun problema.

StuartBruff
23-Emerald III
(To:StuartBruff)


@StuartBruff wrote:

@-MFra- wrote:

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

 


Because rotate operates upon the whole 3D mesh (3x(BoundxBound)) whereas rotatemesh only operates upon an individual mesh (eg, x-y or z-x (BoundxBound)).  Try vectorizing the rotatemesh expression in Frotate.

 

Stuart 


Arrgggh!  Ignore the above.  That's not what's happening. 

 

A 3D-mesh is a 3x{mxn} nested array.  rotatemesh is designed to rotate a 3D-mesh.

 

Createmesh returns a nested 3D-mesh. In your instance, Createmesh returns a 1x1 array containing a 3D-mesh.   To handle nested 3D-meshes, you should use rotate, which is designed to rotate a set of 3D-meshes.   rotate will also handle a 3D-mesh and should, therefore, be used in preference to rotatemesh.

 

The reason vectorize works on rotatemesh(Fmesh, ...) is because the sole element of Fmesh is a 3D-mesh.   If you'd written rotatemesh(Fmesh,...) that would have worked as well.

 

2021 12 29 a.png

 

Apologies for the confusion.  I'm going to blame my responding just after I'd woken up and not having had a cup of tea. Either that or I'm just an idiot ... ☹️ 

 

Stuart

StuartBruff
23-Emerald III
(To:StuartBruff)


@StuartBruff wrote:

A 3D-mesh is a 3x{mxn} nested array.  rotatemesh is designed to rotate a 3D-mesh.

 

Createmesh returns a nested 3D-mesh. In your instance, Createmesh returns a 1x1 array containing a 3D-mesh.   


Note that, for some reason or other(*), this is not the case in Prime.   

 

CreateMesh now returns a 3D-mesh and the 3D Plot component no longer accepts a nested array of meshes.  This messed up a lot of my worksheets.

 

2021 12 29 b.png

 

M15 ...

 

2021 12 29 c.png

2021 12 29 d.png

 

MP7 ...

 

2021 12 29 e.png

2021 12 29 f.png

 

Stuart

 

(*)  I struggle to see a technical or philosophical reason why PTC felt the need to change Prime's behaviour in this respect.

ttokoro
20-Turquoise
(To:StuartBruff)

image.png

StuartBruff
23-Emerald III
(To:ttokoro)

Yes, but, unfortunately, Prime's no longer capable of treating a set of related meshes as one object ... and I don't feel enamoured of the idea of typing in each and every one of the meshes to display several such objects.

 

I can't do the below in Prime.  I have to scale & translate outside of the plot then manually input each mesh into the 3D Plot.  Or, at least, AFAIA.

 

2021 12 30 a.png

 

Unless, ... just a minute ...

 

Doesn't solve all the problems, but ...

 

2021 12 30 b.png

 

where 

2021 12 30 c.png

 

Stuart

-MFra-
21-Topaz II
(To:StuartBruff)

The graphics are not clear, that is: since Fmesh represents a surface, applying a rotation to Fmesh should produce the same surface but rotated. Instead rotatemesh produces two sections rotated at ninety degrees, why? it seems wrong to me.

rotate 1.jpg

StuartBruff
23-Emerald III
(To:-MFra-)


@-MFra- wrote:

The graphics are not clear, that is: since Fmesh represents a surface, applying a rotation to Fmesh should produce the same surface but rotated. Instead rotatemesh produces two sections rotated at ninety degrees, why? it seems wrong to me.


Sorry, which graphics are you referring to?  There's no rotation in the message you're replying to, as far as I can see.

 

Stuart

-MFra-
21-Topaz II
(To:StuartBruff)

Announcements

Top Tags