DXF - 3D-Solid import

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
jmplonka
Posts: 98
Joined: Tue Dec 20, 2016 7:47 am
Location: Vaihingen (Enz), Germany

DXF - 3D-Solid import

Postby jmplonka » Mon May 18, 2020 6:44 am

Hello to all of you,

Marco C had the idea of importing 3D-SOLIDS from DXF files as the blob a SAB.
Since May 17th 2020 it is now possible to import either DXF drawings or 3D-Solids.
Check out at InventorLoader.

cheers and stay well
Jens
Last edited by Kunda1 on Mon May 18, 2020 1:19 pm, edited 1 time in total.
Reason: fixed some typos for clarity
User avatar
Kunda1
Posts: 7334
Joined: Thu Jan 05, 2017 9:03 pm

Re: DXF - 3D-Solid import

Postby Kunda1 » Mon May 18, 2020 1:19 pm

Nice, can you make a screencast or showcase of this so we understand better? Also what is the utility of this? What is a 'SAB' ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
jmplonka
Posts: 98
Joined: Tue Dec 20, 2016 7:47 am
Location: Vaihingen (Enz), Germany

Re: DXF - 3D-Solid import

Postby jmplonka » Mon May 18, 2020 1:53 pm

Sorry, stuck too deep in the details. :oops:
Beside the drawings, DXF-files (AutoCAD Drawing eXchange Format) can also contain complete 3D objects. These objects are stored internally (3D-Solids sections) as SAB content. SAB (Standard ACIS Binary) itself, is the binary representation of ACIS model. The ACIS exchange format is normally SAT (Standard ACIS Text).
Until now FC was only able to import the 2D drawing.
Now the 3D representation of the drawing can be imported as well.
User avatar
Roy_043
Posts: 1229
Joined: Thu Dec 27, 2018 12:28 pm

Re: DXF - 3D-Solid import

Postby Roy_043 » Tue May 19, 2020 1:08 pm

When trying to install InventorLoader via the Std_AddonMgr I get the following error message:
Some errors were found that prevent to install this workbench: Missing python module: xlutils, Missing python module: xlrd, Missing python module: xlwt, Missing python module: olefile , . Please install the missing components first.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21097 (Git)
Build type: Release
Branch: master
Hash: a5ab09aa0941cc945e59848897b160f8cbfc0831
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Dutch/Netherlands (nl_NL)
kisolre
Posts: 2108
Joined: Wed Nov 21, 2018 1:13 pm

Re: DXF - 3D-Solid import

Postby kisolre » Tue May 19, 2020 1:17 pm

Roy_043 wrote:
Tue May 19, 2020 1:08 pm
When trying
From https://github.com/jmplonka/InventorLoader
Solving installation problems
Sometimes it can happen that the packages can't be installed.

Navigate to the InventorLoader plugin (ILP) folder with your file-browser (e.g. Windows-Explorer)
Extract the libs.zip into the ILP's folder (a new subfolder libs should be created).
Open a command shell (e.g. cmd on windows or sh on linux)
Adapt the PATH variable to point to FreeCAD's python: set PATH="<PATH-TO-FREECAD>\bin";%PATH% (on linux you have to export the PATH variable). Note: Linux and MAC users should use '/' instead of ''!
Change the working folder to ILP's libs folder (e.g. cd <PATH-TO-FREECAD>\Mod\InventorLoader-master\libs)
Run the installation script: python ./installLibs.py This should install the required packages.
Restart FreeCAD
Had not actually tried myself..
jmplonka
Posts: 98
Joined: Tue Dec 20, 2016 7:47 am
Location: Vaihingen (Enz), Germany

Re: DXF - 3D-Solid import

Postby jmplonka » Tue May 19, 2020 1:25 pm

Hi,

@kisolre: thanks for helping.

maybe a little bit more detailed: viewtopic...p377256
and be careful with the path where freecad.exe is located normal installation ist "C:\Program files (x86)\FreeCAD\bin" or "C:\Programme\FreeCAD\bin

Kind Regards
Jens
User avatar
Roy_043
Posts: 1229
Joined: Thu Dec 27, 2018 12:28 pm

Re: DXF - 3D-Solid import

Postby Roy_043 » Tue May 19, 2020 1:57 pm

The plugin did not install. There is no libs.zip file. But I can of course download it (https://github.com/jmplonka/InventorLoa ... r/libs.zip). The next step for me (Windows user) would be to install Python? Or can I run the setup.py files from the FreeCAD Python console?
kisolre
Posts: 2108
Joined: Wed Nov 21, 2018 1:13 pm

Re: DXF - 3D-Solid import

Postby kisolre » Tue May 19, 2020 2:10 pm

There is Python inside FreeCADs Bin folder.
jmplonka
Posts: 98
Joined: Tue Dec 20, 2016 7:47 am
Location: Vaihingen (Enz), Germany

Re: DXF - 3D-Solid import

Postby jmplonka » Tue May 19, 2020 2:24 pm

Unfortunately it is not possible to run the setup.py directly from FC's python console.
So you have to open the comnand line window by pressing [Win]+[R] -> this will open a dialog box where you simply enter "cmd" followed by [Enter] key.
Now you can follow the step by step guide in the above mentioned topic.
Alternatively you can extract the content of libs.zip in the InventorLoader dir. Than you can need to reopen FreeCAD. When the libraries are missing, IL tries to install the on its own.
User avatar
Roy_043
Posts: 1229
Joined: Thu Dec 27, 2018 12:28 pm

Re: DXF - 3D-Solid import

Postby Roy_043 » Tue May 19, 2020 2:40 pm

kisolre wrote:
Tue May 19, 2020 2:10 pm
There is Python inside FreeCADs Bin folder.
Thanks. That explains why PATH must be changed.

jmplonka wrote:
Tue May 19, 2020 2:24 pm
Now you can follow the step by step guide
Yes I am now able to follow the procedure.

jmplonka wrote:
Tue May 19, 2020 2:24 pm
InventorLoader dir.
That does not make sense: If the Addon did not install the InventorLoader folder does not exist.

Running into some other stuff. But I'll post that in the other topic.