Macro Apothem Based Prism GUI/hr

Opis
Ova makronaredba će korisniku pružiti dijalog koji će pružiti udaljenost između centara, broj strana i visinu i stvorit će prizmu temeljenu na apothemu ili inradiusu poligona. To može biti vrlo zgodno kada se zna samo udaljenost između stanova. Primjer za to bi bila šesterokutna zaliha plastike ili metala koju pružaju dobavljači. Većina dobavljača takve dionice definiraju prema udaljenosti između stanova. Ako netko koristi takve zalihe u svojim projektima, ovaj makro može uštedjeti u stvarnom vremenu.

Kako koristiti
Copy the Macro into your FreeCAD Macro directory. Then either run the macro from the Execute Macro dialog or create a shortcut to use from your custom toolbar.

When run, the Macro wil present the user with a dialog like seen below. First enter the desired distance between flats. This can be any number and can include a decimal value, it will not take fractional input. Next enter the number of sides. This number is a whole number and should be an even number as well for proper results. Lastly enter the height you wish the prism to be. Again, this can be any number and can include a decimal value. Click OK and the prism will be created in your document.

The Macro
Macro_Apothem_Based_Prism_GUI.FCMacro

QtGui.QDialogButtonBox.Ok)      la.addWidget(okbox)        QtCore.QObject.connect(okbox, QtCore.SIGNAL("accepted"), self.priSm)        QtCore.QObject.connect(okbox, QtCore.SIGNAL("rejected"), self.close)        QtCore.QMetaObject.connectSlotsByName(self.dialog)        self.dialog.show        self.dialog.exec_ p

Additions
SVG icon for use in custom toolbar shortcut.

Acknowledgements
A thanks to FreeCAD main developer shoogen and FreeCAD programmer wandererfan for their invaluable help and advice in constructing this Macro.