Leader arrow vanishing

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
CVH
Premier Member
Posts: 3415
Joined: Wed Sep 27, 2017 4:17 pm

Leader arrow vanishing

Post by CVH » Fri Jan 03, 2020 2:27 am

In Included dxf is a leader.
A small one.
Saved with, but probably without arrow.

Select, set Arrow on, save, revert.
... arrow gone. e_surprised


Regards,
CVH
Attachments
LeaderArrowVanish.dxf
(99.85 KiB) Downloaded 391 times
Last edited by CVH on Fri Jan 03, 2020 8:24 am, edited 1 time in total.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Leader arrow vanishing

Post by Husky » Fri Jan 03, 2020 5:50 am

The leader is scaled. Scale = 0.03
CVH wrote:
Fri Jan 03, 2020 2:27 am
Select, set Arrow on, save, revert.
... arrow gone. e_surprised
The poor leader doesn't know what to do with your settings ...
Your leader leg for the arrow is 0.282843 in length. Your leader setting below Drawing Preferences / Dimension Settings says the Arrow size has to be 2.5 long.

Conclusion:
Impossible = Arrow has to disappear = expected behavior. :wink:
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Leader arrow vanishing

Post by CVH » Fri Jan 03, 2020 8:24 am

The settings are correct IMHO.
Husky wrote:
Fri Jan 03, 2020 5:50 am
The leader is scaled. Scale = 0.03.
Your leader leg for the arrow is 0.282843 in length.
Your leader setting below Drawing Preferences / Dimension Settings says the Arrow size has to be 2.5 long.
2.5 times 0.03 = 0.075.
Plenty off space on the 0.282843 long leg.
And that is visualized when setting the arrow to on.
The arrow is then nicely 0.075 'long'.
Problem is: it doesn't stay set to on when saving it.

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Leader arrow vanishing

Post by Husky » Fri Jan 03, 2020 8:55 am

Sorry, your approach and explanation makes no sense to me.
CVH wrote:
Fri Jan 03, 2020 8:24 am
Problem is: it doesn't stay set to on when saving it.
If you really need to bend the tools over the common use limit then you can explode the leader and it will stay even when you save it.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Leader arrow vanishing

Post by CVH » Fri Jan 03, 2020 10:28 am

Bending nothing...

As provided

LeaderVanishing3.png
After Save & Revert
LeaderVanishing3.png (2.21 KiB) Viewed 6837 times

Question: Did you select the Leader and turned on the Arrow in the provided file?

LeaderVanishing1.png
File as given. Leader selected
LeaderVanishing1.png (16.34 KiB) Viewed 6837 times

Question: If you did this, does it render properly?

LeaderVanishing2.png
Set arrow on
LeaderVanishing2.png (21.99 KiB) Viewed 6837 times
Here the Arrow is rendered correct being 0.03 time 2.5 equals 0.075 long.
Having a 18.907607...°point or about 0.33 rads.
Being 0.024977 wide.

Question: Did you save and revert?

LeaderVanishing3.png
After Save & Revert
LeaderVanishing3.png (2.21 KiB) Viewed 6837 times

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

Re: Leader arrow vanishing

Post by CVH » Fri Jan 03, 2020 11:50 am

And the dimensions of an arrow wasn't far off:
0.165 rads at each side = 0.33 rads point angle.

Code: Select all

RTriangle RTriangle::createArrow(const RVector& position, double direction, double arrowSize) {
    double cosv1, sinv1, cosv2, sinv2;
    double arrowSide = arrowSize/cos(0.165);

    cosv1 = cos(direction+0.165)*arrowSide;
    sinv1 = sin(direction+0.165)*arrowSide;
    cosv2 = cos(direction-0.165)*arrowSide;
    sinv2 = sin(direction-0.165)*arrowSide;

    RVector p1(position.x - cosv1, position.y - sinv1);
    RVector p2(position.x - cosv2, position.y - sinv2);

    return RTriangle(position, p1, p2);
}

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Leader arrow vanishing

Post by Husky » Fri Jan 03, 2020 10:00 pm

CVH wrote:
Fri Jan 03, 2020 10:28 am
Bending nothing...
In my opinion - yes you did!
CVH wrote:
Fri Jan 03, 2020 10:28 am
Here the Arrow is rendered correct being 0.03 time 2.5 equals 0.075 long.

Questions:
1. If you need an arrow size witch has to be 0.075 long why you don't just put the size of 0.075 into the Dimension Settings / Arrow Size?
2. What for is this scaled Leader exercise good?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Leader arrow vanishing

Post by CVH » Fri Jan 03, 2020 10:46 pm

Every dimension type has this scale factor.
Just using it.
Another use would be several text size in dims on one drawing...

What happens is that the arrow flag is killed while saving to dxf.
And this if an arrow with scale 1 doesn't fit the first leader leg.
But a scaled arrow would fit...

SOIT, like usual, intended behaviour.
But what is then the purpose of the scale property??
:?:
If none, I would remove the scale property.

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Leader arrow vanishing

Post by Husky » Sat Jan 04, 2020 12:20 am

Ok, now we're on the same page ...
CVH wrote:
Fri Jan 03, 2020 10:46 pm
Every dimension type has this scale factor.
Just using it.
Another use would be several text size in dims on one drawing...
That is the idea behind the scale factor ...
CVH wrote:
Fri Jan 03, 2020 10:46 pm
What happens is that the arrow flag is killed while saving to dxf.
And this if an arrow with scale 1 doesn't fit the first leader leg.
But a scaled arrow would fit...
Yes and no. The Arrow has to follow math rules to decide the orientation or even to be present or not. In your case the first leader leg has to be at least twice the length of the arrow. If shorter - QCAD turns the arrow off.

This example shows an arrow with a lengths of 3.5. The first leader leg needs to be = or > 7 to show the arrow.

Husky-2020.01.03-01.png
Husky-2020.01.03-01.png (9.73 KiB) Viewed 6789 times

If you use this example and change the scale of the leader to 1.1 then the first leader leg is not anymore twice the length of the arrow. It looks like QCAD fails to refresh the calculation immediate but it is triggered again after saving/reloading.

test.dxf
(111.23 KiB) Downloaded 381 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Leader arrow vanishing

Post by CVH » Sat Jan 04, 2020 1:02 pm

Husky,

Your example is if a scaled arrow won't fit twice.
That we can call intended behaviour.
Mine was if the scaled arrow will fit but not if the scale factor would be 1.
Apart from that it isnt 1.

Fiddling arround it get more strager.
You can not set an arrow if the scale is too large.
(I see Qcad undo the setting a blink of an eye later)
But you can set a too large scale if the arrow is already on.
(eg. set scale to 10 in your example)

Apart from that, now that it got my attention.
Scale 0 stands here for 'none' and mathematically that means scale = 1.
Why not simlpy scale 1.
Like Linear Factor = 1 for linear dims.
And not Linear Factor = 0, because anything times zero is zero.
Scaling is multiplying with a factor.
Then scale 0 would equally stand for scale factor 0.

I think I got enough to file a trivial bugreport. :wink:

Regards,
CVH

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

Re: Leader arrow vanishing

Post by CVH » Sat Jan 04, 2020 2:14 pm

Husky wrote:
Fri Jan 03, 2020 10:00 pm
Questions:
1. ...
2. What for is this scaled Leader exercise good?
If you really want to know:
The Tile2Hatch addon interpolates all selected within a Tile to bare line-segment, Dots or Xlines.
Something we generally do by repeated explosions apart from that Arcs get interpolated too.
For that I am rewriting the "Explode" script in an "Interpolate" script.
>> All in one action exploded to line-segments.

There are tolerance settings in different parts of Qcad.
App.prefs is one that most common users will know about.
But even the explode function has some or uses some functions that have a build in tolerance.
Point-tolerance and Angle-tolerance in fuzzy-compare, fixed op parsed.
But I came by fixed 1e-6 and 1e-4 and 0.01 lately.

What I was doing was still in a unit tile 1x1 going to very small to test it at the limits.
I have to exclude that it might throws an uncaught error somehow.
1x1 tiles are common in imperial mode.
Live testing is the only way.

An Arrow with my Draw.Preffs was x times larger as my tile.
Changing my Draw.Preffs, the dim texts were dots what doesn't render to lines segments.
So I used the Specific Property Scale.

After a reload of the testcase it seemed that my Leader arrow was gone....

I really did not knew that that was prohibited. :oops:
Husky wrote:
Fri Jan 03, 2020 10:00 pm
CVH wrote:
Fri Jan 03, 2020 10:28 am
Bending nothing...
In my opinion - yes you did!
My fault :oops: , my bad :roll:
Can't figure out what an other use would be....

I see the question comming... Leaders, dims... in hatch patterns?
Why not? Why no text?
Why no hatch itself?
Is there a way to extract hatches from drawnings?


That's the story.
Regards,
CVH

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

Re: Leader arrow vanishing

Post by CVH » Fri Mar 05, 2021 11:46 am

Posted a feature request.
Picked up as bug and fixed. :P
https://www.qcad.org/bugtracker/index.p ... sk_id=2196

Thanks Andrew.
Regards
CVH

Post Reply

Return to “QCAD Troubleshooting and Problems”