Reversing folies

Just another WordPress.com weblog

Here comes the MDI October 6, 2011

Filed under: Uncategorized — Giammarco Ferrari @ 9:40 pm

Hallo!
I have just released the v1.30 of Disc Spring Solver, and the most important feature is the new MDI (Multiple Document Interface) gui, with this kind of inteface it is now possible to create and compare different springs more comfortably, look at the screenshots to have an idea.

 

 

 

 

See you in the next post!

 

Disc Spring Solver v1.29, a perfect visualizer! August 1, 2011

Filed under: Belleville,Coding,Disc Spring Solver,Qt,Software — Giammarco Ferrari @ 10:14 pm
Tags: ,

I have improved again the 3D visualizer, now it is possible to arrange up to 10 different series of packets and it is possible to save the arrangements and reload them in future sessions.

 

 

    

 

I really want to thank the customer who suggested me this improvement, now the visualizer is really perfect (more or less =))

 

Disc Spring Solver v1.27! June 7, 2011

Filed under: Belleville,Coding,Disc Spring Solver,Qt,Software — Giammarco Ferrari @ 8:48 pm
Tags: ,

Hallo there, it’s been a long time since last posting but I am very busy with my real life job and it seems that I find the time to post only updates of Disc Spring Solver.
By the way…a new version is out, v1.27.
The 3D visualizer has been very improved and the “Explode” feature has been added, in this way it is possible to create a 3D view of the exploded spring and to set manually the distance between the spring.

It is really amusing for me to code in OpenGL, I have never known this API very well so.. it is really cool to experiment when I have the time to do it and the 3D visualizer is becoming very cool! 🙂

Here is an example of what I am talking about:

Well, it is all for now!
See you in the next post!

 

Disc Spring Solver v1.25: now it can create your spring! March 13, 2011

Filed under: Belleville,Bug,Coding,Disc Spring Solver,Fixing,Software — Giammarco Ferrari @ 8:44 pm
Tags: , ,

A lot of news in the last versione of Disc Spring Solver!

Several minor bugs have been fixed, but, above all Disc Spring Solver can now help you in choosing the best packets combination to satisfy at your requests. By using the “Suggestions” function and inserting the value of requested fields, you can make Disc Spring Solver create the best combination by choosing disc springs from databases included in the setup file and containing more than 850 different kinds of disc springs or from another selected database.

As shown in the picture, in addition to some usual fields you can also set the value of the maximum value of the inside diameter, note that if it is not manually set, that value is automatically considered equal to the guide diameter more 10%.
Note also that you must also set the maximum number of disc springs per packet.
In “Results” it is shown the disc spring that, with its performances, is the nearest to your requests.

When you have found the right spring, you can also show its “Load vs deflection” plot and export the springs data in the Disc Spring Solver main window.

In the following video tutorial you can see an example of how to use this new feature:

 

 

Disc Spring Solver v1.06 is out! November 5, 2010

Starting from this version I have added the possibility to create CAD files of the spring stack. I have decided to add conversions to DXF and IGES formats.
These are the format definitions directly from Wikipedia:

 

“AutoCAD DXF (Drawing Interchange Format, or Drawing Exchange Format) is a CAD data file format developed by Autodesk for enabling data interoperability between AutoCAD and other programs.”

“The Initial Graphics Exchange Specification (IGES) (pronounced eye-jess) defines a neutral data format that allows the digital exchange of information among Computer-aided design (CAD) systems.”

“Using IGES, a CAD user can exchange product data models in the form of circuit diagrams, wireframe, freeform surface or solid modeling representations. Applications supported by IGES include traditional engineering drawings, models for analysis, and other manufacturing functions.”

 

The picture shows two .dxf files created with Disc Spring Solver and loaded with a DXF viewer. You can decide, during the creation of the file, if you want a 2D or a 3D file.

 

 

Looking at the following picture you can see instead the IGES files, 2D or 3D, created by Disc Spring Solver load with a common iges viewer.

 

 

Looking at the converted files, for instance the .dxf ones, it is possibile to see how Disc Spring Solver is more precise than other softwares or excel sheets concerning disc springs and Belleville washers.
Looking at the picture (just click on it to enlarge it in another tab) you can see that, in order to respect all the construction constraints (parallelism, perpendicularity and dimensions), the spring base angle must be obligatorely 12,04° wide.
Trying to insert the same values for diameters, etc.. in other softwares (I don’t know if I can say the name 🙂 ) you will see that the returned value of the base angle is a little less than 12°, this can appear as a small difference but the effect on the resulting CAD models (and not only) can be very bad, above all if you are using spring packets made by more than one spring.

 

Enlarge this picture and look at the base angle value.

 

I hope you will like this new feature =)

See you next time!

 

Disc Spring Solver v1.05 is out! October 10, 2010

Filed under: Belleville,Bug,Coding,Disc Spring Solver,Fixing,Software — Giammarco Ferrari @ 8:46 pm

Today I have released a new vesrion of my dsic springs related softwar: Disc Spring Solver.

In this new version some bugs have been fixed and a new useful feature has been added.
Some of my users asked me a way to save the report layout that they create while editing the standard layout report in order to have the possibility to use again that layout, this is the reason of the new feature:  the possibility to create, save and load a personal report layout.

To load a template you just need to load an html file selecting “Load a template” from the “Report” menu.

To let Disc Spring Solver know where to put the wanted data into the template, you need to insert, during the html report template (you can use the included html editor or your favorite editor), some special strings that will be replaced with the wanted value (or picture) once that the template has been loaded in Disc Spring Solver.
You need also to insert some special comments inside the report html code in order to let Disc Spring Solver know which components of the report are desired.

In the included example template, that you can also find here (of course you can not see picturs because link are at the moment replaced by the strings that you can find in the list “Strings for pictures”), all the strings and all the comments that you need are shown, you can see here the list of all the elements (strings and comments) and the values used to replace them (if the value to replace has not been calculated, the string will be replaced with “N/A”).

Here are some video tutorials concerning the use of Disc Spring Solver:

 

 

 

 

Regards!

 

An OpenThread little question July 22, 2010

Filed under: Qt,Reversing,Uncategorized — Giammarco Ferrari @ 8:21 pm
Tags: , , ,

Hallo,
In several coding forums I have seen a lot of people facing this problem while using the OpenThread API in a Qt application:

 

error: `OpenThread’ was not declared in this scope

 

“This is strange”, they say,“I have included windows.h where the OpenThread function in declared!”

Hehe here is the problem, in the headers! Looking at windows.h we realize that OpenThread is declared in winbase.h and here is the exact peace of code from winbase.h:

 

#if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
WINBASEAPI HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
#endif

 

We can’t obviously change the header in this case so we need to modify our .cpp file by writing this line before all the #include:

 

#define _WIN32_WINNT 0x0500

 

In this way all will work fine, OpenThread included 🙂

See you in the next post!

 

Disc Spring Solver v1.0 is born! May 22, 2010

Filed under: Belleville,Coding,Disc Spring Solver,Software,Uncategorized — Giammarco Ferrari @ 12:16 am
Tags: , , , ,

Hallo there,
today I want to announce the birth of Disc Spring Solver v1.0!
This is the software I coded for all the last two months and it is definitely the most complete software for disc springs and that really easy to see if compared to others disc springs related app, you can find it here: http://www.springsolver.com, here are listed some of its most important features (some of them have been requested me by customers) with two screenshots:

 

# Possibility to create every kind of spring stack (including stacks where the packets have a different numbers of disc springs)
# Possibility to choose between two kind of algorithms: the standard one and a new and more precise algorithm
# Load calculation for a given single spring or spring stack deflection
# Deflection calculation for a given load
# Spring rate and the spring work calculation including the chance of specify a work range
# Stress calculation for a spring under a given load or a given deflection
# Fatigue resistance calculation including the possibility to see the Goodmann diagram for the fatigue resistance
# Dimensions under an applied load calculation
# Evaluation of the friction effects on the spring performances
# Possibility to save your work in a .spr file
# Evaluation of the load application way (circular rings, etc..) on the spring performances
# Possibility to load a spring from a database (Microsoft database .mdb or Sqlite 3 database .s3db)
# Possibility to load a list of material from a database (Microsoft database .mdb or Sqlite 3 database .s3db) or to use the internal database.
# Plot designer for the spring characteristic curve
# Plot designer for the stress curves
# Plot designer for the single spring and the spring stack “Load vs Deflection” curve
# 3D Visualizer for the single spring and for the spring stack
# 3D Visualizer for the simulation of the spring behaviour under the applied load
# Report editor and generator including an html editor that makes the report fully customizable

 

 

Disc Spring Solver GUI

 

 

The GUI with some plots

 

 

Now that I’ve finished to code this software for the moment, I can go back to look at some interesting malwares 😉
See you to the next post.

 

XP Sp3 bug : The hidden files bug December 16, 2009

Filed under: Bug,Coding,Fixing,Hidden files,Reversing — Giammarco Ferrari @ 12:04 am

Hallo people!
Today I will show you how to solve a bug affecting some Windows XP versions upgraded to SP3: if you try to look at the “Show hidden files” option in the “Options” menu of the File Manager, you will not find it, no more!
There is also another “version” of this bug: you can see the “Show hidden files” option but if you check it and click “Ok” you will not see any change in your folders (that’s to say, no hidden files/folders shown) and looking again at that option you will find it unchecked.

 

This problem could appear as a trick of a malware: malwares sometime uncheck that option automatically in order to make a little bit harder to discover them.

 

Well..that’s not the case, it’s just a bug: a missing registry key.
To solve the bug you need to create a simple text file using an editor like Notepad and to change its extension in (or save it as..) .reg .
This is what you have to write in your .reg file:

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL]

“RegPath”=”Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced”

“Text”=”@shell32.dll,-30500”

“Type”=”radio”

“CheckedValue”=dword:00000001

“ValueName”=”Hidden”

“DefaultValue”=dword:00000002

“HKeyRoot”=dword:80000001

“HelpID”=”shell.hlp#51105”


 

Once you have created the .reg file just double click on it and answer “Yes” to the question that will appear 🙂

In this way you will fix both the “versions” of the bug.

 

See you in the next post 🙂

 

QwtPlotZoomer: the question of the default axis value November 7, 2009

Filed under: Coding,Qt,Qwt — Giammarco Ferrari @ 9:53 am
Tags: , , , ,

Hi all,

I’m still working with Qwt and looking at some forums I found various questions about the default value of the axis of a plot, something like “the problem is when i click on zoom button it is adjusted to 1000 automatically“.
This is really a not easy question for a new Qwt user because the example reported in the Qwt pack are not so clear about it (in my opinion, of course).

In this post I will try to make some examples to solve this problem.

This is the code of the zoomer created and used in bode.cpp, the main file of the bode project (an example of the Qwt pack):

class Zoomer: public QwtPlotZoomer
{
public:
Zoomer(int xAxis, int yAxis, QwtPlotCanvas *canvas):
QwtPlotZoomer(xAxis, yAxis, canvas)
{
setSelectionFlags(QwtPicker::DragSelection | QwtPicker::CornerToCorner);
setTrackerMode(QwtPicker::AlwaysOff);
setRubberBand(QwtPicker::NoRubberBand);

// RightButton: zoom out by 1
// Ctrl+RightButton: zoom out to full size

#if QT_VERSION < 0x040000
setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlButton);
#else
setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier);
#endif
setMousePattern(QwtEventPattern::MouseSelect3,
Qt::RightButton);
}
};

MainWin::MainWin(QWidget *parent):
QMainWindow(parent)
{
d_plot = new BodePlot(this);
d_plot->setMargin(5);

#if QT_VERSION >= 0x040000
setContextMenuPolicy(Qt::NoContextMenu);
#endif

d_zoomer[0] = new Zoomer (QwtPlot::xBottom, QwtPlot::yLeft,
d_plot->canvas());
d_zoomer[0]->setRubberBand(QwtPicker::RectRubberBand);
d_zoomer[0]->setRubberBandPen(QColor(Qt::green));
d_zoomer[0]->setTrackerMode(QwtPicker::ActiveOnly);
d_zoomer[0]->setTrackerPen(QColor(Qt::white));

d_zoomer[1] = new Zoomer(QwtPlot::xTop, QwtPlot::yRight,
d_plot->canvas());
….
void MainWin::enableZoomMode(bool on)
{
d_panner->setEnabled(on);

d_zoomer[0]->setEnabled(on);
d_zoomer[0]->zoom(0);

d_zoomer[1]->setEnabled(on);
d_zoomer[1]->zoom(0);

d_picker->setEnabled(!on);

showInfo();
}
….
The class is defined inside the main file, not in an header.

The only thing about the zoomer that you can find in bode.h is:

private:

QwtPlotZoomer *d_zoomer[2];

So, if you run the bode example, you do not have to face the problem of the default value.

Let’s look at what happens if you use this code in your programs when the zoomer class and the plot constructor are in plot.cpp and a plot object (with a curve)  is created in the main.cpp with a code like this:

Plot *CFPlot = new Plot;

CFPlot->setWindowTitle(“F vs s”);

CFPlot->setTitle(“F vs S”);

CFPlot->setAxisTitle(2, “s (mm) –>”);

CFPlot->setAxisTitle(0, “F (N) –>”);

// Insert new curves

QwtPlotCurve *cFS = new QwtPlotCurve(“F (N)”);

#if QT_VERSION >= 0x040000

cFS->setRenderHint(QwtPlotItem::RenderAntialiased);

cFS->setRenderHint(QwtPlotItem::RenderAntialiased);

#endif

cFS->setPen(QPen(Qt::red));

cFS->attach(CFPlot);

cFS->setData(MyX,MyY, 101);

The plot A is what you obtain at the beginning, while the B and the C is what you obtain by clicking the right button when the zoom level is 0 or by zoomin on a region where y (or x) is alway >1000 (the default axis value):

 

 

As you can see,  in the first case the plot is still working while in the second case the plot is not working at all: the axis markers and the grid are completely off and also the picker indicates always (0.00, 0.00).

To avoid this behavour you just have to remove the “private:” definition from the plot.h file making *d_zoomer[2] public and to use setZoomBase in this way:

cFS->setData(corsax,caricoy, 101);

CFPlot->d_zoomer[0]->setZoomBase();

CFPlot->d_zoomer[1]->setZoomBase();

In some particular cases you will also need to do replot using CFPlot->RePlot();.

So, after the date setting of the curve you have to re-set the zoom base, if you have added more than one curve to your  plot you just have to wirte those rows after the data setting of the last added curve.

In this way your zoomer will be full working!