BIM Workbench

A forum dedicated to the Draft, Arch and BIM workbenches development.
carlopav
Posts: 1450
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: BIM Workbench

Postby carlopav » Tue Jun 09, 2020 10:52 am

oops, i realized it was my fault, soooorry :oops:
follow my experiments on BIM modelling for architecture design
NightEarth
Posts: 3
Joined: Sun Jun 07, 2020 1:45 pm

Re: BIM Workbench

Postby NightEarth » Thu Jun 11, 2020 6:22 pm

Thank you , works now!

Best regards,
H
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: BIM Workbench

Postby mikeprice99 » Sat Jun 27, 2020 9:10 am

Just a minor bug (and fix!)
BimLibrary.py, line 74 needs "import FreeCADGui"

I'm not quite ready to get involved directly with making fixes via github and PRs, so excuse this post!
(Its also such a minor bug, not worth doing a bug report)
User avatar
Kunda1
Posts: 7679
Joined: Thu Jan 05, 2017 9:03 pm

Re: BIM Workbench

Postby Kunda1 » Sat Jun 27, 2020 2:24 pm

mikeprice99 wrote:
Sat Jun 27, 2020 9:10 am
Just a minor bug (and fix!)
BimLibrary.py, line 74 needs "import FreeCADGui"

I'm not quite ready to get involved directly with making fixes via github and PRs, so excuse this post!
(Its also such a minor bug, not worth doing a bug report)
Are you using the most up to date version of BIM Workbench ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: BIM Workbench

Postby mikeprice99 » Sat Jun 27, 2020 4:45 pm

Kunda1 wrote:
Sat Jun 27, 2020 2:24 pm
Are you using the most up to date version of BIM Workbench ?
Checked on github, master branch. (https://github.com/yorikvanhavre/BIM_Wo ... Library.py)
Without the line I suggest, parts library doesn't appear.

BTW...
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21775 (Git)
Build type: Release
Branch: master
Hash: 1f741aa511e898849e46ed14515fce416fe32acb
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
carlopav
Posts: 1450
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: BIM Workbench

Postby carlopav » Sat Jun 27, 2020 4:57 pm

mikeprice99 wrote:
Sat Jun 27, 2020 9:10 am
Just a minor bug (and fix!)
BimLibrary.py, line 74 needs "import FreeCADGui"

I'm not quite ready to get involved directly with making fixes via github and PRs, so excuse this post!
(Its also such a minor bug, not worth doing a bug report)
Thx Mike! https://github.com/yorikvanhavre/BIM_Wo ... 887deeb5ca

I got you involved in the commit comment :P
follow my experiments on BIM modelling for architecture design
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: BIM Workbench

Postby mikeprice99 » Sat Jun 27, 2020 7:49 pm

carlopav wrote:
Sat Jun 27, 2020 4:57 pm

I got you involved in the commit comment :P
Thanks! Once I get to know the whole code base better I'll offer my help to do more bug fixes. This morning was the first time I have attempted to compile from source and it went very smoothly. I am using BIM for a project at the moment so will concentrate there. (I am a bit rusty on C++ and python, but should get up to speed fairly quickly.)
carlopav
Posts: 1450
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: BIM Workbench

Postby carlopav » Sat Jun 27, 2020 8:02 pm

mikeprice99 wrote:
Sat Jun 27, 2020 7:49 pm
Thanks! Once I get to know the whole code base better I'll offer my help to do more bug fixes. This morning was the first time I have attempted to compile from source and it went very smoothly. I am using BIM for a project at the moment so will concentrate there. (I am a bit rusty on C++ and python, but should get up to speed fairly quickly.)
Wow! you are really welcome here :)
If you can compile from source you are really on the right track! And if you have the chance to try the new experimental wall and opening tools let me know how do you feel with them ;)
follow my experiments on BIM modelling for architecture design
mikeprice99
Posts: 78
Joined: Sat Jun 27, 2020 9:06 am
Location: Dorset, England

Re: BIM Workbench

Postby mikeprice99 » Sun Jun 28, 2020 2:38 pm

Here's another little problem, but not being current in Python I haven't yet got a solution.

When i attempt to use the parts library I get an error when importing, say, a window.
It seems to be a unicode error: ArchWindow.py gets a list of library windows and keeps track of the paths to them.
In Windows, When you attempt to use one, the path is normally
C:\Users\<username>\AppData\Roaming\FreeCAD\Mod\parts_library\

The \U throws an error (as in "C:\Users")

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

I've tried encoding the path with path.encode('unicode_escape')

Whats the solution?

EDITED to say... I think I solved it but will have to go back and rip out a load of debug stuff Ive written in and see if the solution is viable - and maybe fire it up on a linux box to make sure it doesn't break the linux version.

OKAY... I think that line 253 of ArchWindow.py should be changed from
path = self.librarypresets[self.Preset-len(WindowPresets)][1]
to
path = self.librarypresets[self.Preset-len(WindowPresets)][1].encode('unicode_escape').decode()

but if someone else could confirm on both windows and linux platforms, that would be good!
User avatar
Roy_043
Posts: 1555
Joined: Thu Dec 27, 2018 12:28 pm

Re: BIM Workbench

Postby Roy_043 » Mon Jul 20, 2020 3:41 pm

@mikeprice99: Haven't we already discussed this?:
https://forum.freecadweb.org/viewtopic.php?f=23&t=48410