Virole avec un volume constant diamètre et hauteur variable.

Virole avec un volume constant diamètre et hauteur variable.

Darragi
Community Visitor Community Visitor
604 Views
3 Replies
Message 1 of 4

Virole avec un volume constant diamètre et hauteur variable.

Darragi
Community Visitor
Community Visitor

Bonjour, 

Je voudrais faire une cuve en 3d avec une seule constante qui est le volume, lors de la mise a l'échelle.

0 Likes
605 Views
3 Replies
Replies (3)
Message 2 of 4

RobH2
Advisor
Advisor

Google Translation:

Je ne pense pas que vous puissiez faire ça dans Max. Ce n'est pas un programme paramétrique comme un programme de CAD. Il y a peut-être un script quelque part.

 

Il serait peut-être bon de poster cette question sur le forum Programmation 3ds Max et de voir si quelqu'un peut écrire un petit script pour vous.

 

English:
I don't think you can do that in Max. It's not a parametric program like a CAD program. There might be a script somewhere.

 

It might be good to post this question on the 3ds Max Programming forum and see if someone can write a little script for you.


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2025-2027), V-Ray 7, Ryzen 9 9950X3D Processor, DDR5 128MB, Gigabyte Aorus X870E Master motherboard, Sabrent Rocket NVMe Gen5 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 3 of 4

wernienst
Collaborator
Collaborator

If your 3d tank can be represented by a Cylinder primitive, then it's quite simple:

1. Select the cylinder. Using the Parameter Editor (Animation menu), create a parameter "Volume", set Type to Float and Range from 0.01 to maybe 10000.

wernienst_0-1730469861232.png

The parameter Volume will appear in the Modify panel.

wernienst_1-1730470029221.png

Now open the Parameter Wire Dialog (also Aniamtion menu).

In the left list, search and select Radius : Float Wire, in the right list, Height : Float Wire. Click --->.

wernienst_2-1730470502837.png

In the right Expression window, enter

$.volume/(Radius*Radius*pi)

Click Connect.

wernienst_4-1730470897197.png

Now the radius of the cylinder determines its height according to its volume.

If you change the volume, you must also reenter a radius before the height gets updated.

 

 

Message 4 of 4

RobH2
Advisor
Advisor

@wernienst   Thanks for that. I knew someone might be able to educate us both on this. I'll utilize this as well. 


Rob Holmes

EESignature

------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2025-2027), V-Ray 7, Ryzen 9 9950X3D Processor, DDR5 128MB, Gigabyte Aorus X870E Master motherboard, Sabrent Rocket NVMe Gen5 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------
0 Likes