Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to ensure that entities get a reasonable (i.e. non-zero) Z scale. #1429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

egilkv
Copy link

@egilkv egilkv commented Nov 23, 2021

While LibreCAD ignores Z scale on input, generating DXF with entities that has a Z scale of zero creates problems for others.
FreeCAD will for instance choke, see https://tracker.freecadweb.org/view.php?id=4791
An alternative way of dealing with this would be omitting writing Z scales (record 43) to the DXF in the first place.

This is a proposed fix for #1428

While LibreCAD ignores Z scale on input, generating DXF with entities that has a Z scale of zero creates problems for others.
FreeCAD will for instance choke.
An alternative way of dealing with this would be omitting writing Z scales (record 43) to the DXF in the first place.
@lordofbikes lordofbikes added PR small pull request, small diff size PR improvement pull request, changing an existing feature or behavior PR pending pull request, decision outstanding labels Apr 28, 2022
@lordofbikes lordofbikes added PR next release pull request, to be considered for next release and removed PR pending pull request, decision outstanding labels Jun 6, 2022
@@ -316,6 +316,7 @@ void Plugin_Entity::getData(QHash<int, QVariant> *data){
data->insert(DPI::STARTANGLE, d.angle );
data->insert(DPI::XSCALE, d.scaleFactor.x );
data->insert(DPI::YSCALE, d.scaleFactor.y );
data->insert(1.0, d.scaleFactor.z );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should at least be data->insert(DPI::ZSCALE, d.scaleFactor.z );

@lordofbikes
Copy link
Member

The comment in doc_plugin_interface.cpp is the deal breaker I found on a first sight.
It needs more time to review the other changes.
Also I want to check if it's possible to handle this inside libdxfrw and avoid changes in LibreCAD.
Anyhow many thanks for your efforts. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR improvement pull request, changing an existing feature or behavior PR next release pull request, to be considered for next release PR small pull request, small diff size
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants