Example of using form input for two numbers and selection of one of nine possible arithmetic operation or function.
Our php application frontend is on next picture:
Our code is located in one index.php file and consist from:
HTML part with input form – obtain data from user, contain submit button and last part show result in two posiblle way. If there is no error message and result ist generated, then well formatted number (2 decimal numbers) is shown. Else (if number was not calculated and result is not prepared or error output message was set) warning text of red color take output (formating is created with alert message of bootstrap linked style).
PHP code – obtain numbers from submitted post form, controll if data available with filter_has_var(); prevent for injecting sql with simple htmlspecialchars($_POST[‚nr1‘]); and calculate result along submitted $operator = htmlspecialchars($_POST[‚operation‘]); . As demonstration for controll of user inputed data dividing by zero check take place.
<button type=“submit“ name=“submit“ class=“btn btn-primary“> Calculate result </button>
<?php //($is_result == „true“) ? {
if ($is_result && $msg == “) {
$result = number_format($result, 2, ‚,‘, ‚ ‚); // formating number refer to https://www.php.net/manual/en/function.number-format.php
echo „<br> <br>“;
echo “ <table class=\“table table-success\“> „;
echo “ <tr>
<td><h3> = $result</h3> <td>
</tr> „;
echo “ </table> „;
} ;
?>
<br>
<?php if($msg != “): ?> <!– This part show error or warning message if one of the operand does not meet calculations requirements – dividing by zero –>
Small altering is created by own style.css that follow
.navbar {
background-color: #325d88;
margin-bottom: 25px ;
}
.navbar-brand {
color: white;
}
/* set midle container to width 580px */
.container {
width: 580px;
margin-left: 240px;
}
/* add margin to both sides in calculator input fields */
.inputSelector {
margin-left: 20px;
margin-right: 15px;
}
/* colorizing backround and change font-size of input number fields n1 and n2 partialy alter bootstrap css */
.form-control {
background-color: rgb(250, 250, 131);
font-size:25px
}
/* aboolute positioning of image on calc frontend – on left side */
#calcimage {
position: absolute;
top: 80px;
left: 20px;
right: 0;
}
/* change wight of label text before input field of form */
label {
font-weight: bold;
}
.footer {
background-color: #325d88;
margin-top: 25px;
padding-left: 15px;
height: auto;
}
Full code for further study can be obtained from github here.
MMU models slicing with PrusaSlicer and Prusa MMU2S
|
This article go step by step in proces of slicing Multi Material 3D model with PrusaSlicer with focus on appropriate extruder assignment, objects placement and check for correct layer placement.
First tips for MMU prints
After some time of using multimaterial upgrade MMU2S for Prusa i3 MK3S printer i can offer this example workflow for seamless MMU prints.
Best MMU material for MMU print for me is PETG. Filament is tought and mechanical resistant, gears does not demage it during permanent loading and unloading proces. Number of outer intervence is minimal. Something worse ist ABS but because it thermal sensitivity is appropriate for almost 2D prints (bookmarks, logos, …). Worst material is PLA, is beter dont use it because it low melting point and bad mechanical resistance (gears can easy demage it).
At the begining we can prepare our own model (this for interesting bookmarks or another logos can describe in another article) or download one from web.
Very important is, that full model must be divided in separate parts of appropriate colors that lays on on top of another or on one basement object. Very important is that they dont interfere one by another. And they must lay in way that one objects layer is on the top of another layer. There can not be any one free layer, because all final print will be demaged.
After download unpack .zip file and run PrusaSlicer (this description use version 2.2).
For basic setup must be done:
Selected quality – for good results select 0.15mm QUALITY
In section Printer select Original Prusa i3 MK3S MMU2S – if not awayable, please go through printer add wizard and instal printer with MMU upgrade (now we have option for MMU single or MMU as we selected on our next picture)
For all filaments select appropriate type and color of filament for visualisation (keep in mind that on the top is filament 1 and bottom filament 5, in this order with correct color they must be loaded into MMU2S upgrade on the printer)
Optionaly select supports or brim for better setling of the model
Before next step, we must look at our model and recognize what part is base on top of their are other parts added. In our exmple it is orange part. This part can be drag and drop into space of slicer. Other parts are added on the top and tne create final MMU composit.
After import of first (base) orange part, we must rightclick on the object and select extruder with appropriate filament, in our case it is extruder 5 with orange filament.
In next step we must switch on expert settings and on object pane (right bottom layered part) we click on add option (with sign + in circle). Next select add part and load one of remaining parts from disk. Our downloaded files are named by color in spanish, but it can be recognized or translated and refered with picture of modell on thingiverse.
After adding first part, use rightclick on selected part and change extruder to appropriate color. Repeat his steps – add, change extruder to appropriate color until last part of model.
Optionaly you can change position of wipe tower. You can also rotate and change width of tower for better workflow of objects on headbed.
Tips and tricks
Important notice: Before final slicing, look at tab Filament settings and check if corect type of filament is selected. After initial opening od PrusaSlicer default settings was for PLA. We changet filaments for appropriate extruders but this selection does not automaticaly changed type of filaments. You must do it manualy, it was one of me big mistakes with new MMU upgrade.
Important things to check after slicing: Slide with layer selector an check all color layer changes. On one layer can not be two or more materials with different colors in same place. Also one layer by another there can not be a free layer.
If you work on simple objects as bookmark or another promotional item it can by calculated that 4 layer with width of 0.15mm are together high 0.6mm. next added objedct (logo or text) must have their z axis on 0.6mm. And if this text or logo will have 3 layers it must have 0.45mm high because 0.45/0.15 is number 3.
Next picture show fully prepared MMU objects.
Prepared PrusaSlicer file can be downoladed for further study from here.
Tip for you: MMU can produce large waste of material when is used for large 3D ojects but it can be economical if you use it for some marketing things as bookmarks and logos of a company. Think about it before preparing model. Wery good scenario is singlecolor base and next logos and text with only few layer.
This article contains fotogallery and youtube videos from backlighting plastic model of Revell Titanic 100th aniversary.
Next video depicts process of assembling plastig model with appropriate stages of electronics assembling.
Preview of finaly assemled model with remote IR control show next video.
Final version of program code is available for download here.
Submit form – example php code
|
This article contains example of simple submit form with control of fulfilment of all fields and valdation. For proper testing of our code is used mercury e-mail server build in in XAMPP environment.
Next picture show visual look of submit form frontend that use bootstrap stylesheet downloaded from https://bootswatch.com/.
<a class=“navbar-brand“ href=“https://cdesigner.eu“> Visit us on CDesigner.eu </a>
</div>
</body>
</html>
PHP code grab $_POST[] submited variables, assign them into php code variables and test its content against filtering rules. First test detect content of all needed values as name, e-mail and mesage text. Next verifies e-mail against rules expected from valid e-mails.
If something is missing or e-mail is incorrect red (bootstrap alerted style) highlight in outputed text is used.
Also our code test sucessfull e-mail sending, if sendig finished correct green message display with text
$msg = ‚Your e-mail has been sent‘; $msgClass = ‚alert-success‘;
if sending was unsuccessful red message is displayed
$msg = ‚Your e-mail was not sent‘; $msgClass = ‚alert-danger‘;
For proper work of this code you must use appropriate webhosting or use XAMPP with runing mercury e-mail server. After enabling mercury through xamp control-panel go to administration and add new user. In our case we used account with name ciljak. local domain aliases that are posible to use are localhost (can not be validate with this code), localhost.net or localhost.org. Next picture show example of mercury enabled features in XAMPP server
For versioning of our code can be used git with github service. Mouch simpler graphical tool for commiting changes and share your code with team is gitkraken https://www.gitkraken.com/. For further reading please wisit next tutorial.
Our project setup screen in gitkraken looks like next picture
Križík T565 – vacuum tube analog oscilloscope
|
The T565A oscilloscope is a universal device for observing voltage waveforms from the lowest frequencies (DC voltages) up to 2 MHz. It can monitor periodic and non-periodic (transient) events with a voltage of 10 mV to 500 V. The large frequency range of amplifiers and time base allows extensive use of the T565A oscilloscope in various fields, such as. in radio engineering, low-current and high-current electrical engineering, in physics, chemistry, biology, both in research and in operation. In all these applications, the possibility of measuring the observed voltages is fully applied.
Schematic and device description in czech language can be obtained from here.
Krátka videoukážka zobrazuje odkrytované zariadenie v prevádzkovom stave.
Vacuum tube tester Tesla BM215
|
Vacuum tube tester Tesla BM215 is well know testing device used in supply shops in socialistic Czechoslovakia. For further reading you can visit pages http://www.oldradio.cz/meraky/bm215.htm .
Photogallery of my device during cleaning process and first mesaurment:
Next video show mesaurment device in partialy disasembled state.
Showcase of multimaterial 3D prints
|
MMU2S kit assembling
|
This article contains photogallery from building the prusa MMU2S multimaterial upgrade kit.
Whole building process can be refered from official site here and consist from these main parts:
existing printer extruder upgrade
filament selector part assembly
final binding and electronics interconnection between printer prusa i3 MK3S and multimaterial upgrade prusa MMU2S
Multimaterial upgrade MMU2S for 3D printer prusa i3 MK3S
|
Creating a color model can be accomplished using several methods. In amateur work, the simplest but also the most workable solution is to print the original from white material and then paint it with a brush or airbrush.
In the case of fully automated machine 3D printing, two possible solutions are possible. The first, more expensive solution is to use several separate extruders. In this case, we eliminate the jamming of the filament in the feed path of the extruder, the perfection of the registration is problematic as well as in conventional offset printing.
The second cheaper solution uses a single extruder and a system for feeding print filaments from multiple sources. The second category also includes the so-called multimaterial upgrade for 3D printer Prusa i3 MK3S with designation MMU2.
MMU2S – the second generation of multimaterial printing extensions from Prusa research to the Prusa i3 MK3S printer. The homepage with the option to order via the e-shop is here.
It is clear from the previous video that we can use a total of 5 different materials for printing. As an interesting additional feature, the upgrade allows:
effective printing of water-soluble support materials (they will be used due to their price only on a thin layer, which will ensure a smooth separation of the support),
pressing of material residues on individual printing spools.
The procedure of assembling the supplied kit can be seen e.g. on video:
We have to prepare the model for printing so that each color will represent a separate .stl model. Before the first import, we must call up the option in PrusaSlicer (download here) via the Printer menu of the option to add a printer according to the following image:
First we add and place the first model, then all the others. A brief procedure can be seen in the video from the upgrade creator in the following video:
Gallery of 3D prints
|
Schowcase of my scuccessfull 3d prints contain next photogallery. As inspiration for my prints was used: