Testing the Drawing Module

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Testing the Drawing Module

Post by yorik »

Hi Luke,

Just (finally!) tested your work on the drawing module, excellent! Things are getting pretty cool. It breaks compatibility with Draft->Drawing tools unfortunately, but I'll have a look at it, maybe it's easy to fix on my part. "older" view objects are still supported, right?

I also saw issues with my custom templates, texts are not at the correct place on the sheet (apparently there is some Y-axis flipping) I'll investigate more too.

Other than that I guess there is only a couple of tools from the current Drawing WB to include...

Great work anyway, things seem pretty stable already!
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Testing the Drawing Module

Post by yorik »

Hm apparently the older Drawing::FeatureView and Drawing::FeatureViewPython don't work anymore... (They don't have a ViewResult property anymore and cannot be added to a page). This breaks the Draft and Arch drawing stuff... But I suppose you'll fix that at some point...

Other thing a bit difficult is that your branch is currently not mergeable into the master code, which makes it hard to try for example latest Draft code on it, or even to adapt it to work with both versions of the drawing WB...

Ah, here is an image showing the template problem (I also attached the template, if you want to have a look):
screenshot.jpg
screenshot.jpg (14.43 KiB) Viewed 3056 times
Attachments
A3.svg
(4.96 KiB) Downloaded 58 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Post by triplus »

I also saw issues with my custom templates, texts are not at the correct place on the sheet (apparently there is some Y-axis flipping) I'll investigate more too.
Yes i do believe this was done:

viewtopic.php?f=8&t=3361&start=20#p49823
viewtopic.php?f=8&t=3361&start=30#p49895
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: Testing the Drawing Module

Post by mrlukeparry »

yorik wrote:Hm apparently the older Drawing::FeatureView and Drawing::FeatureViewPython don't work anymore... (They don't have a ViewResult property anymore and cannot be added to a page). This breaks the Draft and Arch drawing stuff... But I suppose you'll fix that at some point...

Other thing a bit difficult is that your branch is currently not mergeable into the master code, which makes it hard to try for example latest Draft code on it, or even to adapt it to work with both versions of the drawing WB...

Ah, here is an image showing the template problem (I also attached the template, if you want to have a look):
screenshot.jpg
Cool. I'll take a look at the template, but I think it's because there are no units specified for the page width and height.

Drawing::FeatureView and Drawing::FeatureViewPython

I haven't yet looked at the python side of it. I am undecided if it would be best to keep the legacy code and use that or try and adapt the draft and arch module to use the new features? What do you think?

Sadly there was a huge change that messed up my repository two month ago and to merge required lots of manual overrides to resolve conflicts. I still have no idea why. I'm not sure what we can do to keep the branch history but it might have to add it through a single commit. jriegel might have some ideas...
ulrich1a wrote:Other issues:
- When changing the scale of a view, FreeCAD crashes, when the view has a dimension!
- There is a regression regarding the template: The template is not anymore to scale. And the white drawing area and the template are not aligned.
Ulrich, I cannot reproduce these problems, can you provide me an example I can test with?
ulrich1a wrote:I have not much experience with CAD-drawings, so I looked it up in book about how to make drawings. It says, dimension should only added to that edges, where its true lenght is shown in the view. This is equivalent to: all drawn dimensions are perpendicular to the projection direction. So I would say, the default dimension setting should be "Projected" and not "True"!
On this matter, orthographic projections are locked to always have projected dimensions. In 3D views I have set the option for the user to be able to choose this, because projected type for me doesn't make much sense. I cannot find a standard for drawings made in 3D even in my reference book. Although you are right for 2D drawings.
ulrich1a wrote:My test case is the wedge from the part workbench. Adding a view of it gives a z-axis projection. So I tried to add the distance between a bottom and a top edge. This worked by selecting the left sloping edge and adding a dimension with settings "Distance" and "Projected". I then tried to add a dimension of the hights of the wedge. I selected a top edge and a bottom edge. After adding a dimension with the settings "Distance" and "Projected", I am getting the right distance, but a wrong angle of the added dimension. (See image, right dimension). I know, that I could get the needed result in this case with the setting "distancey", but it should also work in a general case, where the needed dimension is not aligned to any of the main axis.
I don't understand what the problems, ,maybe I'm tired tonight...
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Testing the Drawing Module

Post by yorik »

mrlukeparry wrote:Drawing::FeatureView and Drawing::FeatureViewPython
I haven't yet looked at the python side of it. I am undecided if it would be best to keep the legacy code and use that or try and adapt the draft and arch module to use the new features? What do you think?
I would anyway keep the old ones, because they are "dumb" (they basically just insert a piece of SVG code). Of course we can try to make arch and draft use the new stuff (it's obviously much more interesting), but, apart from maintaining compatibility with existing stuff (draft, arch, a couple of macros, and the annotation, symbol and clip tools), I can think of many situation which where such dumb (but very easily controllable) objects are handy...
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Post by triplus »

Would that keep compatibility with older .FCstd files containing drawings? If that is true and it does not interfere with new DW i would say keep it too.

And if i understand then tools like importing SVG symbol would still work? Would that interfere with new DW or could work without much hassle in parallel? I am not after "definitive answer". Just thinking out loud.
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Testing the Drawing Module

Post by ulrich1a »

mrlukeparry wrote:Ulrich, I cannot reproduce these problems, can you provide me an example I can test with?
Here is the testcase with the wedge. I hope it shows also the problem with the template.
The left dimension is right and has a length of 10.2 mm, the right dimension has the correct high of 10.0 mm, but the drawn dimension is not aligned as correct to the view.

Ulrich
Attachments
wedge2.fcstd
drawing with template and wrong aligned hight (right dimension)
(21.45 KiB) Downloaded 45 times
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: Testing the Drawing Module

Post by ulrich1a »

I made some tests with templates.
The following version of the drawing branch is using templates in a reasonable way:
OS: Debian GNU/Linux 7.4 (wheezy)
Platform: 32-bit
Version: 0.14.3177 (Git)
Branch: drawing
Hash: daf2620a232cb0b969bffda51796c4f2133df373
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
template in drawing branch 0.14.3177
template in drawing branch 0.14.3177
Template_positioned_right.png (98.85 KiB) Viewed 2990 times
Later versions position the template outside of the white area and apply a different scale to the template. So added views with a scale 1:1 do not have the original dimensions on the paper.
OS: Debian GNU/Linux 7.4 (wheezy)
Platform: 32-bit
Version: 0.14.3183 (Git)
Branch: drawing
Hash: e02793ba96b057b00c50c2b165e529462e723014
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
template in drawing branch 0.14.3183
template in drawing branch 0.14.3183
template_wrong_scale.png (88.05 KiB) Viewed 2990 times
Saved documents with a template in a drawing can not open the drawing at opening the document. I am getting the following error message:
Unhandled std::exception caught in GUIApplication::notify.
The error message is: The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that take an indefinite period time to locate.
Unhandled std::exception caught in GUIApplication::notify.
The error message is: The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that take an indefinite period time to locate.
Coin error in SoEventManager::processEvent(): Recursive invocation detected. Delay processing event until the current event is finished processing.
Coin error in SoEventManager::processEvent(): Recursive invocation detected. Delay processing event until the current event is finished processing.
I see, you are adding new patches. I wish you success at hunting the bugs.

Ulrich
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Testing the Drawing Module

Post by triplus »

I can confirm the template outside white area issue accrued:

viewtopic.php?f=8&t=6216&start=10#p49922

After i guess this landed:
After initial round of testing, we discovered a re-occurring crash when you tried to open a newly created page. The result of last nights work this is now fixed. For those unfamiliar, in the FreeCAD_sf_master directory run 'git pull'.
http://freecadamusements.blogspot.com/2 ... art-1.html

First test on Ubuntu 13.10 didn't have that issue but after i read the announcement on the blog i compiled again and the issue was there (both times i used the same PC).
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Testing the Drawing Module

Post by jmaustpc »

With this version I can get a crash by deleting the Page while the drawing page is not open.

OS: Ubuntu 12.04.4 LTS
Platform: 64-bit
Version: 0.14.3183 (Git)
Branch: drawing
Hash: e02793ba96b057b00c50c2b165e529462e723014
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0


For example, go to Part, default Part Box and Cylinder, Drawing wb, create new drawing with A3 icon. The delete "page inthe tree. Crashes FreeCAD

Jim
Post Reply