Physion

  • Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Username Password: Remember me

(Re: Improved Graphics) Temporary Gears Files
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: (Re: Improved Graphics) Temporary Gears Files

(Re: Improved Graphics) Temporary Gears Files 6 years, 3 months ago #519

As stated before, I am still working on the new graphics sets, and how to incorporate
them within Physion. Still sorting out all the maths, but here is a collection that I've
created externally, and manually ported into Physion scenes for now, to play with!

At the moment, within Physion, you create a 'gear' by dragging a circle-size. Apart
from the temp bug where the teeth pitch/size etc do not save/load correctly, you
end up with an unknown number of teeth, which mucks up ratios you might want.
Also, the faces of the teeth have one flat plane, causing jittering/meshing problems.

Real gears have a curved tooth face, producing a 'pressure-angle', where one tooth
presses against another meshing tooth, at the pitch circle, which is aprox 1/2 way
up the tooth face. To simplify, with polygons, I've produced only a few flat facets
up the tooth-face, but this alone, produces much better contact & movement.

Because they are polygons, you can now perform boolean ops on them too, and
use the erase (slice) tool, and the 'bomb' tool too if you like!! For now, I've made
a range of gears, using different tooth-widths, to play with. (And Rack & Pinion!).
These gears are based on tooth-count, & tooth-size, and the size 'circle' that
results, is just a product of that. A 'P1' gear, (tooth .1" wide), is only a quarter
of the diameter of a 'P4' (tooth .4" wide) gear, with the same number of teeth.
(The thickness of the teeth is at its widest part, being about 1/2 way up).

All the gears are named. Eg: 'GearT24P2', (Has 24 teeth, & .2" thick teeth).
This is all just temporary, until I finish sorting out proper script auto-create/import.
(See example info in sub-posts below...)
1x1 square diag = root-2. Cube diag = root-3. Beautiful !

Re: (Re: Improved Graphics) Temporary Gears Files 6 years, 3 months ago #520

This scene, contains all gears, (samples for now), with different teeth sizes.
Scene is heavy on polygon count, so delete the ones you don't want for now,
and re-save it as another name. Then build on it, by using the great tools
created by Nait & Lynxx, to clone & move etc. (Next sub-post shows an example).
Scene file... Glenn-AllGears-Temp-SeeForum-Glenn555.scene
This image is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
1x1 square diag = root-2. Cube diag = root-3. Beautiful !

Re: (Re: Improved Graphics) Temporary Gears Files 6 years, 3 months ago #521

(Sorry! Keep stuffing up the pictures...)
This image is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
1x1 square diag = root-2. Cube diag = root-3. Beautiful !
Last Edit: 6 years, 3 months ago by Glenn555. Reason: (Wrong image file)

Re: (Re: Improved Graphics) Temporary Gears Files 6 years, 3 months ago #522

This contains just the .4" tooth-width gears, and some racks.
The z-order, and collision filtering in the example is important!
This image is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
1x1 square diag = root-2. Cube diag = root-3. Beautiful !
Last Edit: 6 years, 3 months ago by Glenn555. Reason: Corrected picture text file-ref.

Re: (Re: Improved Graphics) Temporary Gears Files 6 years, 3 months ago #525

  • Lynxx
  • OFFLINE
  • Gold Boarder
  • Java/C#-Developer
  • Posts: 223
Nice, i will check them out.
Infinity is vast, especially near end.
bye, Lynxx

Re: (Re: Improved Graphics) Temporary Gears Files 6 years, 3 months ago #530

  • Dimitris
  • OFFLINE
  • Administrator
  • Posts: 218
Nice work again Glen555,

I particularly liked the rack gears and I thought that maybe this option should also be supported natively.

I wrote a small javascript snippet which produces a widget which you may use to provide a GUI for your creations:

function onCreate()
{
var type = typeCombobox.currentText;
var param1 = param1Widget.value;
var param2 = param2Widget.value;
var param3 = param3Widget.checked;
 
var msg = "Going to create a " + type + " (" + param1 + ", " + param2 + ", " + param3 + ")";
app.debug(msg);
}
 
var widget = new QWidget(mainWindow);
widget.setWindowFlags(Qt.Tool);
 
var typeLabel = new QLabel("Select gear type", widget);
var typeCombobox = new QComboBox(widget);
typeCombobox.addItem("Normal gear");
typeCombobox.addItem("Rack");
typeCombobox.addItem("Pinion");
typeCombobox.addItem("...");
 
var param1Label = new QLabel("Parameter 1", widget);
var param2Label = new QLabel("Parameter 2", widget);
var param3Label = new QLabel("Parameter 3", widget);
 
var param1Widget = new QDoubleSpinBox(widget);
var param2Widget = new QSlider(Qt.Horizontal, widget);
var param3Widget = new QCheckBox(widget);
 
var button = new QPushButton("Create", widget);
button.clicked.connect(onCreate);
 
var layout = new QGridLayout(widget);
layout.addWidget(typeLabel, 0, 0);
layout.addWidget(typeCombobox, 0, 1);
layout.addWidget(param1Label, 1, 0);
layout.addWidget(param1Widget, 1, 1);
layout.addWidget(param2Label, 2, 0);
layout.addWidget(param2Widget, 2, 1);
layout.addWidget(param3Label, 3, 0);
layout.addWidget(param3Widget, 3, 1);
layout.addWidget(button, 4, 0, 1, 2);
 
widget.setLayout(layout);
widget.show();
 


I think that the above code is pretty much self-explanatory but if you have any questions, let me know. Looking forward to see your generator script.
  • Page:
  • 1
  • 2
Moderators: Glenn555
Time to create page: 0.23 seconds