small error when exporting to svg

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
juliend
Newbie Member
Posts: 5
Joined: Thu May 14, 2020 9:36 am

small error when exporting to svg

Post by juliend » Fri May 15, 2020 2:20 pm

An error when exporting to svg. The element (the small white circle) is hidden when it is exported (wrong position).

Qcad pro

Versions
QCAD version: 3.24.3.0
Date: Mar 17 2020
Qt version: 5.8.0
Compiler version: gcc 4.8.1
Build Date: Mar 17 2020
Revision: a3bef72c136d511dedc5c302e12acd72ff6cc243

Architecture: x86_64
OS: Linux
OS version: 14.04

Locale
QCAD locale: fr
Name: fr_FR
Country: 74
Country name: France
Language: 37
Language name: français
Script: 7
Script name: Latin
Decimal point: 44
Negative sign: 45
Positive sign: 43
Text direction: 0
System codec: UTF-8
Attachments
new2.svg
(2.82 KiB) Downloaded 475 times
new2.dxf
(132.56 KiB) Downloaded 447 times

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: small error when exporting to svg

Post by CVH » Fri May 15, 2020 3:25 pm

juliend wrote:
Fri May 15, 2020 2:20 pm
The element is exported in the wrong position.
Or
The element (the small white circle) is hidden when it is exported (wrong position).
The right lower open Circle and the free Points are not exported.
How did you export to SVG? Advanced, one can choose how to export Points.

Can't find anything hidden or at a wrong position.
I do detect a large amout of Points in your Blocks.
I did not detect non-zero Z values but did detect negative Block scales.
Not that long ago there where issues with negative scales too....
...and not that hard. A negative scale is simply a mirror.
Another danger sits in the use of lineweight 0.00 or default.

Further, there are some funny behaviours.
Like:
> Without a selection select one valve block.
- An off-center reference is visual. An Attribute reference.
- Simply reselect the same valve and the extra reference disappears.

> Select All and explode. The left Hatch swaps sides.

Once exploded and corrected the SVG export seems to be fine.
Probably again a block scale issue.

Due to Covid19 and the kids studying I have no PC time left to investigate that deeper.

Regards,
CVH
Last edited by CVH on Fri May 15, 2020 4:46 pm, edited 1 time in total.

juliend
Newbie Member
Posts: 5
Joined: Thu May 14, 2020 9:36 am

Re: small error when exporting to svg

Post by juliend » Fri May 15, 2020 4:24 pm

I removed the points. The file is now cleaner.
In the exported svg:
<?xml version="1.0" encoding="UTF-8"?>
<!-- 2020-05-15 16:51:10 Generated by QCAD 3.24.3 SVG Exporter -->
<svg width="22.6146mm" height="5.6mm" viewBox="179.2354 -84.9 22.6146 5.6" version="1.1" xmlns="http://www.w3.org/2000/svg" style="stroke-linecap:round;stroke-linejoin:round;fill:none">
<g transform="scale(1,-1)">
<!-- Référence de bloc: VC0000_18 / entities: 5 -->
<g>
<!-- Ligne -->
<path d="M180.1354,79.5 L180.1354,82.5 " style="stroke:#000000;stroke-width:0.13;"/>
<!-- Ligne -->
<path d="M180.1354,82.5 L186.1354,79.5 " style="stroke:#000000;stroke-width:0.13;"/>
<!-- Ligne -->
<path d="M186.1354,79.5 L186.1354,82.5 " style="stroke:#000000;stroke-width:0.13;"/>
<!-- Ligne -->
<path d="M186.1354,82.5 L180.1354,79.5 " style="stroke:#000000;stroke-width:0.13;"/>
</g>
<!-- Attribut -->
<!-- Référence de bloc: FC0324 / entities: 2 -->
<g>
<!-- Cercle -->
<!-- Hachure -->
<path d="M181.0354,84 A0.9,0.9 0 0 1 179.2354,84 A0.9,0.9 0 0 1 181.0354,84" style="fill:#000000;fill-rule:evenodd;"/> OK
</g>
<!-- Référence de bloc: FC0323 / entities: 1 -->
<g>
<!-- Cercle -->
<circle cx="186.1354156666667" cy="84" r="0.9" style="stroke:#000000;stroke-width:0.13;"/> OK
</g>
<!-- Référence de bloc: VC0000_18 / entities: 5 -->
<g>
<!-- Ligne -->
<path d="M194.95,84.7 L194.95,81.7 " style="stroke:#000000;stroke-width:0.13;"/>
<!-- Ligne -->
<path d="M194.95,81.7 L200.95,84.7 " style="stroke:#000000;stroke-width:0.13;"/>
<!-- Ligne -->
<path d="M200.95,84.7 L200.95,81.7 " style="stroke:#000000;stroke-width:0.13;"/>
<!-- Ligne -->
<path d="M200.95,81.7 L194.95,84.7 " style="stroke:#000000;stroke-width:0.13;"/>
</g>
<!-- Attribut -->
<!-- Référence de bloc: FC0324 / entities: 2 -->
<g>
<!-- Cercle -->
<circle cx="194.95" cy="80.2" r="0.9" style="stroke:#000000;stroke-width:0.13;"/> WRONG, that line should not be here
<!-- Hachure -->
<path d="M195.85,80.2 A0.9,0.9 0 0 1 194.05,80.2 A0.9,0.9 0 0 1 195.85,80.2" style="fill:#000000;fill-rule:evenodd;"/> OK
</g>
<!-- Référence de bloc: FC0323 / entities: 1 -->
<g>
<!-- Cercle -->missing line here
</g>
</g>
</svg>
Attachments
new2.svg
(2.45 KiB) Downloaded 457 times
new2.dxf
(127.03 KiB) Downloaded 451 times

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: small error when exporting to svg

Post by CVH » Fri May 15, 2020 5:28 pm

Its getting even better.
Where the explosion is failing the exporter consider the Hatch to be as equal as the Circle and drops one.
Where it didn't fail the Hatch and Circle are seperatly exported and you get an open and a filled circular path.
Quite Odd.

And indeed the second use of Block 'FC0323' is empty.
But then again the Circle may be missing too in the first use of Block 'FC0324'.
Depends the point of view....

What those have in common is Scale Y = -1
But 'VC0000_18' is present in both ways....

The idea is to check combinations of Block Angle and flipping or not by scale and see where the svg export fails.
Meanwhile check explosions too.

Regards,
CVH.

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: small error when exporting to svg

Post by CVH » Sun May 17, 2020 6:04 pm

Hi all,
Made up a test case.
Could someone test SVG export first and then the explosion with the latest snapshot.

As downloaded the file shows the 3.24.3.0 outcome.
Failing when only one of X or Y scales is negative (flip over or mirror)
Also see the SVG.

HOWTO:
1 Thaw 'Blocks'
2 Freeze 'Blocks exploded'
3 SVG export XS ('Remarks' is set not plottable)
4 Save the file
5 Select All TA (Selection should be 20 Block references)
6 Explode XP

Use the green echo's to verify.
An SVG can be viewed in any browser.
And please report back.

Thanks,
CVH
Attachments
Hatch in Block explosion & SVG 32430.svg
(105.42 KiB) Downloaded 462 times
Hatch in Block explosion & SVG test.dxf
(137.14 KiB) Downloaded 441 times

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: small error when exporting to svg

Post by CVH » Fri May 22, 2020 4:04 pm

Confirmed.
Andrew has made a bugreport on this:
https://www.ribbonsoft.com/bugtracker/i ... sk_id=2076
CVH

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: small error when exporting to svg

Post by andrew » Sat May 23, 2020 9:30 pm

This should be fixed in the latest snapshot release (3.24.3.6).

Post Reply

Return to “QCAD Troubleshooting and Problems”