View Issue Details

IDProjectCategoryView StatusLast Update
0003937FEMBugpublic2021-02-06 06:23
Reportersalmat Assigned Toberndhahnebach  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Platformx86-64OSubuntuOS Version18.04 LTS
Product Version0.18 
Target Version0.20 
Summary0003937: DataAlongLine Create Plot Always plot Magnitude
DescriptionIn DataAlongLine
The "Create Plot" Always plot only Magnitude. Witch ever Vector your are chosen to plot.
I need to have only X data for example.

I have seen the bug in any versions.

I have looks the code, it seems to me it is in :
src/Mod/Fem/App/FemPostFilter.cpp line 267

When not "if(pdata->GetNumberOfComponents() == 1)"
It always does the mean square, not looking selected Vector value
(Not sure I understand everything ...)

line 267 :
void FemPostDataAlongLineFilter::GetAxisData() {

    std::vector<double> coords;
    std::vector<double> values;

    vtkSmartPointer<vtkDataObject> data = m_probe->GetOutputDataObject(0);
    vtkDataSet* dset = vtkDataSet::SafeDownCast(data);
    vtkDataArray* pdata = dset->GetPointData()->GetArray(PlotData.getValue());
    vtkDataArray *tcoords = dset->GetPointData()->GetTCoords("Texture Coordinates");

    int component = 0;

    const Base::Vector3d& vec1 = Point1.getValue();
    const Base::Vector3d& vec2 = Point2.getValue();
    const Base::Vector3d diff = vec1 - vec2;
    double Len = diff.Length();

    for(int i=0; i<dset->GetNumberOfPoints(); ++i) {

        double value = 0;
        if(pdata->GetNumberOfComponents() == 1)
            value = pdata->GetComponent(i, component);
        else {
            for(int j=0; j<pdata->GetNumberOfComponents(); ++j)
                value += std::pow(pdata->GetComponent(i, j),2);

            value = std::sqrt(value);
        }
        values.push_back(value);
        double tcoord = tcoords->GetComponent(i, component);
        coords.push_back(tcoord*Len);
    }
    YAxisData.setValues(values);
    XAxisData.setValues(coords);
}
Steps To ReproduceAttached an project example, with the print screens showing the bug.

1: Open the example
2: double click on DataAlongLine in Pipeline
3: in Field, select StrainVectors
4: in Vector, select any value

In 3d Print, all seems to plot normaly along the line colors, but in AlonLine plot (curve) always shows mean square ...
Additional InformationOS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
TagsNo tags attached.
FreeCAD Information

Activities

salmat

2019-04-18 15:51

reporter  

Report Bug.FCStd (1,154,491 bytes)

Kunda1

2019-04-22 13:56

administrator   ~0013032

@salmat thank you for the report. We ask folks to first post on the forum before opening a ticket, especially in regards to FEM because it is heavily developed.

Also consider using the 0.19 development version when you're using FEM.

punting to bernd

salmat

2019-04-22 20:42

reporter   ~0013036

How to install 0.19 ?
I have looked : https://www.freecadweb.org/wiki/Install_on_Unix/id
Installed freecad-daily, and just tried to update now ... nothing new ?

Kunda1

2019-04-23 11:21

administrator   ~0013037

@salmat Try the appimages.
I guess I need to update the documentation to help folks understand this better. Here is the link to the latest dev release: https://github.com/FreeCAD/FreeCAD/releases/tag/0.19_pre
You can use the appimage update tool to stay up to date with the latest dev release. That is what the FEM dev recommends to have the FEM workbench working correctly.

yorik

2022-03-03 13:55

administrator   ~0016750

This ticket has been migrated to GitHub as issue 5916.

Issue History

Date Modified Username Field Change
2019-04-18 15:51 salmat New Issue
2019-04-18 15:51 salmat File Added: Freecad 3D strain X along line X.png
2019-04-18 15:51 salmat File Added: Freecad 3D strain X along line Y.png
2019-04-18 15:51 salmat File Added: Freecad 3D strain Y along line X.png
2019-04-18 15:51 salmat File Added: Freecad 3D strain Y along line Y.png
2019-04-18 15:51 salmat File Added: Report Bug.FCStd
2019-04-22 13:54 Kunda1 Description Updated
2019-04-22 13:56 Kunda1 Note Added: 0013032
2019-04-22 13:56 Kunda1 Assigned To => berndhahnebach
2019-04-22 13:56 Kunda1 Status new => assigned
2019-04-22 20:42 salmat Note Added: 0013036
2019-04-23 11:21 Kunda1 Note Added: 0013037
2021-02-06 06:23 abdullah Target Version => 0.20