Dimension "Snap Points" in Draft WB in Imported STEP File

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
cflin
Posts: 56
Joined: Sun May 14, 2017 10:21 pm

Dimension "Snap Points" in Draft WB in Imported STEP File

Post by cflin »

This is my first post on the FreeCAD forum. I did search too make sure I am not repeating here somebody else's finding.

I have observed that in recent versions of FC17 (as of about the past month or so), when I try to snap at endpoints, midpoints, etc., to get a linear dimension in Draft WB in a model imported as a STEP file, FC17 cannot find them. However, FC17 is aware of the edges because it highlights them, so why can't it lock on their endpoints? If I open (import) the very same STEP file with FC16, the Draft WB dimensioning tool has no problem snapping on the same endpoints, etc. This did not use to be a problem with FC17. No errors are reported in the report window and no extra CPU load is observed.

If, in the same file in FC17 I pick the vertices of a face and I upgrade them, then the problems with dimensioning snapping disappear (but I have a new shell object created). In all cases, the linear dimensioning tool of the Part WB works without problems. It must be also noted that if I force FC17 to save the imported STEP file as fcstd, shut down FC17 and then open the fcstd file with FC17, the problems described above also disappear.

For reference, here is what "about" tells me:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11084 (Git)
Build type: None
Branch: master
Hash: fa00b4f06a0c96de57a777d6532467dfd8e5d141
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by yorik »

Are you sure the "snap to working plane" button is not enabled? That would snap not to the actual point but on the perpendicular point on the working plane, which can be quite far away...
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by easyw-fc »

yorik wrote:Are you sure the "snap to working plane" button is not enabled? That would snap not to the actual point but on the perpendicular point on the working plane, which can be quite far away...
Hi @yorik,
I think @cflin is having problems with snap points only if the STEP model loaded has a hierarchy or is a multipart object...
(Would @cflin please confirm that your problem is present only when an App::Part STEP model is involved?)
In these cases the STEP in recent build of FC0.17 will be assembled in an App::Part container...
This new container doesn't work correctly with the Draft Snap points, but it does work fine with Part Measure tools...
You can test simply loading this Hierarchical STEP file (as1-oc-214.stp) and try to place dimensions to the model...
Everything is working fine instead if a single object STEP file is loaded (io1-cm-214.stp)
I don't know if the issue is related to the new App::Part container or to the Draft Snap routines versus the new container...
here a warning I get in Report View when I try to place a point over a multipart obj
('[Draft.todo.commit] Unexpected error:', <type 'exceptions.NameError'>, 'in ', <built-in method closeDialog of tuple object at 0x0000011CD909F888>, '(', None, ')')
Maurice
cflin
Posts: 56
Joined: Sun May 14, 2017 10:21 pm

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by cflin »

Yes, I think easy-fw is correct. The problems occur on imported multi-part .step files. I would like to issue a small correction to my initial post. The problem persists after I save the imported multi-part .step file as fcstd and load it as such.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by easyw-fc »

yorik wrote:...
should @cflin or me file a bug at mantis?

Maurice
cflin
Posts: 56
Joined: Sun May 14, 2017 10:21 pm

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by cflin »

Some updates to this. It seems that in the past couple of versions the problem was corrected. But after I updated last night, the problem is recurring. Here are the data after the latest update last night:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11122 (Git)
Build type: None
Branch: master
Hash: a0da4b16a8768779ce32480046d3c0109595d5e5
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by NormandC »

Hello cflin,

A long shot, could you try this: in your .FreeCAD folder (it's a hidden folder, CTRL+H in your file browser will make it visible) located in your Home folder, move out (or rename) the files system.cfg and user.cfg and restart FreeCAD. These configuration files get sometimes corrupted and create odd problems. By removing them, FreeCAD creates fresh ones at restart. Please note that all settings (including toolbars) will return to default.

If this does not solve the issue, you can restore your original system.cfg and user.cfg files to get back to your customized settings.
cflin
Posts: 56
Joined: Sun May 14, 2017 10:21 pm

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by cflin »

Well, NormanC, long shot or not, it worked! Or so it seems so far, at least. There is an additional file which seems to be autogenerated by FC, '~/.config/FreeCAD/FreeCAD.conf'. I cleaned that file, too, for good measure.

Now, the only kind of weird thing is that for the diameter (or radius—with SHIFT pressed) Draft dimensioning tool to work, I have to select the circular edge of interest prior to clicking on the dimensioning tool! If I do that, diameter/radius dimensioning works like a charm. This, however, has not changed from version to version.

Thank you, NormandC, for your insightful suggestion! Not that I know everything, but it never crossed my mind to clean up the configuration files. Now, I don't have to go back to FC16 any more.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by NormandC »

Glad it did! :)
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Dimension "Snap Points" in Draft WB in Imported STEP File

Post by easyw-fc »

cflin wrote:Well, NormanC, long shot or not, it worked!
very strange... for me it still doesn't work after cleaning the configuration files...
Are you sure you are loading a hierarchical STEP file?
This bug is only affecting STEP models that have a hierarchy...
Would you mind to test it loading this Hierarchical STEP file (as1-oc-214.stp) and try to place dimensions to the model?

thx
Maurice
Post Reply