tarek wrote: ↑Thu Aug 29, 2019 6:54 am
Thanks for this. Interesting problem. I think at least it will work for some (I tested and it works on GNU/Linux), whereas with absolute paths it will work for none, right? Any other proposed solutions?
I expected it to work so probably something is buggy under windows. If @ChrisB could test under Mac it is probably worth reporting a bug.
eddriesen wrote: ↑Wed Aug 28, 2019 5:50 pm
Ow cr#p, there 'll be no fun left for me when I return home...
Hi Ed,
I think this is what we'd call a "good problem to have"
@eddriesen : you can ever review the models, do them better and throw stones to original designers...
In case it may be helpful to somebody, here how I "check" my FreeCAD models once done :
Open the .OBJ file of the original object as alias mesh and go to Part WB
Convert it to shape with Part -> Create shape from mesh
Convert shape to solid with Part -> Convert to solid
Refine the solid with Part -> Create a copy -> Refine shape
Align the refined solid with the FreeCAD model using the Aligner tools of the Manipulator WB
Use Inspection WB / Inspection -> Visual inspection. Select as "actual" the FreeCAD model and as "nominal" the refined solid. You can change the search range later in the property editor, starting with 100 or 200 µm is generally good.
Below are 2 examples obtained respectively with button lock part (20 µm search range) and handle cover one (50 µm search range, where the approximation of spline with arcs is visible in the groove) :
button_lock_20um.png (27.34 KiB) Viewed 2117 times
handle_cover_50um.png (24.81 KiB) Viewed 2117 times
kisolre wrote: ↑Thu Aug 29, 2019 9:02 am
I expected it to work so probably something is buggy under windows. If @ChrisB could test under Mac it is probably worth reporting a bug.
Relative paths don't work on the mac for the font selection; well, not if they are relative to the model. I faintly remember models back in 0.17 (or was it even 0.16?) where I used to pack models and fonts together in the same directory.
chrisb wrote: ↑Thu Aug 29, 2019 10:38 am
Relative paths don't work on the mac for the font selection
I meant if you select a file with file selection dialog and then recompute and font is Ok. Then you edit the font field by hand and change the path to be relative to the file (here there is assets 'sub folder where font is located so "assets/asimov.otf") and recompute the document does it pick the font again or throws an error?
TheMarkster wrote: ↑Wed Aug 28, 2019 4:34 pm
Those are the 3 I did
In the file "name_plate" the two shape strings have different paths - one is relative other is Windows absolute. Since the list shows you as the author does relative path work under your windows install? Here I tried several FreeCAD versions and several font locations (freecad bin folder, Draft.py folder, relative to freecad file path, ...) and nothing works as relative path.
kisolre wrote: ↑Thu Aug 29, 2019 1:48 pmThen you edit the font field by hand and change the path to be relative to the file (here there is assets 'sub folder where font is located so "assets/asimov.otf") and recompute the document does it pick the font again or throws an error?
That's exactly what I had done, relative to the model, and it throwed an error. If you are interested I can do it again and post the error.
Ok, so we have indeed a regression. I tested with the slightly outdated version below and it can handle a font path of the form myFontDirectory/fontfile.ttf which uses myFontDirectory below the current directory of the FreeCAD file.
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
The maintainers at github in charge of the project are the ones who changed it to a relative path. I had it in e:\downloads\fonts when I made the model.
TheMarkster wrote: ↑Thu Aug 29, 2019 4:30 pm
The maintainers at github in charge of the project are the ones who changed it to a relative path. I had it in e:\downloads\fonts when I made the model.
kisolre wrote: ↑Wed Aug 28, 2019 2:29 pm
Also relative path to font file does not work under windows. I tried "assets/asimov.otf" and "./assets/asimov.otf"
Thanks for this. Interesting problem. I think at least it will work for some (I tested and it works on GNU/Linux), whereas with absolute paths it will work for none, right? Any other proposed solutions?
chrisb wrote: ↑Thu Aug 29, 2019 3:21 pm
Ok, so we have indeed a regression. I tested with the slightly outdated version below and it can handle a font path of the form
myFontDirectory/fontfile.ttf which uses myFontDirectory below the current directory of the FreeCAD file.
This is all related to: issue #3254 Wrong paths to fonts occur when you exchange models between different systems. An 'Embed' option would be useful
In June 2018 I had written that font files respect relative paths. I don't remember if I had written so after a new test or if I wrote so from previous experience. So maybe the regression occurred between June last year and now.