开源CAD——从源代码安装到依赖关系分析 __02
开源CAD——从源代码安装到依赖关系分析__02
首分成4大类,
1,FreeCAD+openCASCADE
2,LibreCADorQcad,
3,OpenSCAD
4,gCAD3D
othersPythonCAD,salome,varkon,CADvas,etc...(资料相对不太完善)
关于文件格式的介绍: 二维软件主要以dxf,xxx.py为主,autodeskCADformat. 三维的格式主要以stl为主。3Dsystemformat.
且都可以输出图片格式。
本节主要介绍第一类FreeCAD+OpenCASCADE,
OpenCASCADE&&FreeCAD说明书pdf下载地址:
http://ishare.iask.sina.com.cn/f/34233319.html
http://ishare.iask.sina.com.cn/f/33416712.html
FreeCAD+OpenCASCADE依赖关系分析
OpenCASCADE
LinuxIntel
OperatingSystem
32/64-bit:
Debian:4.0
Mandriva:2010*
Minimummemory
512Mb,1Gbrecommended
Freediskspace
(completeinstallation)
ForfullinstallationOpenCASCADETechnologyrequires600Mbofdiskspace.
Minimumswapspace
500Mb
Videocard
GeForce
ThefollowingversionsofGeForcedriversarerecommended:
64-bitVersion:100.14.19orlaterhttp://www.nvidia.com/object/linux_display_amd64_100.14.19.html
32-bitVersion:100.14.19orlaterhttp://www.nvidia.com/object/linux_display_ia32_100.14.19.html
Guideforbuildingthird-partyproductsonLinux CONTENTS 1.INTRODUCTION___________________________________________________________2 2.BUILDINGMANDATORYTHIRD-PARTYPRODUCTS__________________________________2 2.1.Tcl/Tk8.5____________________________________________________________________ 2.1.1.installationfrombinaries_____________________________________________________ 2.1.2.Installationfromsources:Tcl8.5_______________________________________________ 2.1.3.Installationfromsources:Tk8.5_______________________________________________
2.2.FreeType2.3.7________________________________________________________________3 2.3.Ftgl2.1.2_____________________________________________________________________3
3.BUILDINGOPTIONALTHIRD-PARTYPRODUCTS____________________________________3 3.1.TBB3.0-018__________________________________________________________________3 3.2.gl2ps1.3.5___________________________________________________________________4 3.3.FreeImage3.14.1______________________________________________________________4 4.REFERENCES____________________________________________________________5
1.INTRODUCTION Thisdocumentpresentsadditionalguidelinesforbuildingthird-partyproductsusedbyOpen CASCADETechnologyandsamplesonLinuxplatform(Mandriva2008andDebian4.0). Thelinksfordownloadingthethird-partyproductsareavailableonthewebsiteofOPENCASCADE S.A.Sathttp://www.opencascade.org/getocc/require/. Therearetwotypesofthird-partyproducts,whicharenecessarytobuildOCCT: a)Mandatoryproducts:Tcl8.5,Tk8.5,FreeType2.3.7,Ftgl2.1.2 b)Optionalproducts:gl2ps1.3.5,FreeImage3.14.1,TBB30-018
2.BUILDINGMANDATORYTHIRD-PARTYPRODUCTS
2.1.Tcl/Tk8.5
Tcl/TkisrequiredforDRAWtestharness. 2.1.1.installationfrombinaries Itispossibletodownloadready-to-installbinariesfrom http://www.activestate.com/activetcl/downloads 1.Downloadbinariesarchiveandunpackitintosome<TCL_SRC_DIR>. 2.Enterthedirectory<TCL_SRC_DIR>. cd<TCL_SRC_DIR> 3.Runtheinstallcommand install.sh andfollowinstructions. 2.1.2.Installationfromsources:Tcl8.5 Downloadnecessaryarchivefromhttp://www.tcl.tk/software/tcltk/download.htmlandunpackit. 1.Entertheunixsub-directoryofthedirectorywheresourcefilesofTclarelocated (<TCL_SRC_DIR>). cd<TCL_SRC_DIR>/unix 2.Runtheconfigurecommand configure--enable-gcc--enable-shared--enable-threads--prefix=<TCL_INSTALL_DIR> For64bitplatformaddalso--enable-64bitoptiontothecommandline. 3.Iftheconfigurecommandisfinishedsuccessfully,startthebuildingprocess make 4.Ifbuildingisfinishedsuccessfully,startinstallationofTcl.Allbinaryandservicefilesoftheproduct willbecopiedtothedirectorydefinedby<TCL_INSTALL_DIR> makeinstall 2.1.3.Installationfromsources:Tk8.5 Downloadnecessaryarchivefromhttp://www.tcl.tk/software/tcltk/download.htmlandunpackit. 1.Entertheunixsub-directoryofthedirectorywheresourcefilesofTkarelocated(<TK_SRC_DIR>). cd<TK_SRC_DIR>/unix 2.Runtheconfigurecommand,where<TCL_LIB_DIR>is<TCL_INSTALL_DIR>/lib configure --enable-gcc --enable-shared --enable-threads --with-tcl=<TCL_LIB_DIR> -- prefix=<TK_INSTALL_DIR> where<TCL_LIB_DIR>is<TCL_INSTALL_DIR>/lib For64bitplatformaddalso--enable-64bitoptiontothecommandline. 3.Iftheconfigurecommandisfinishedsuccessfully,startthebuildingprocess make
4.Ifbuildingisfinishedsuccessfully,startinstallationofTk.Allbinaryandservicefilesoftheproduct willbecopiedtothedirectorydefinedby<TK_INSTALL_DIR>(usually<TK_INSTALL_DIR>is <TCL_INSTALL_DIR>) makeinstall
2.2.FreeType2.3.7 FreeTypeisrequiredforFtglwhichlinksitasstaticlibrary. Downloadnecessaryarchivefromhttp://sourceforge.net/projects/freetype/files/andunpackit. 1.EnterthedirectorywheresourcefilesofFreeTypearelocated(<FREETYPE_SRC_DIR>). cd<FREETYPE_SRC_DIR> 2.Runtheconfigurecommand configure--prefix=<FREETYPE_INSTALL_DIR> For64bitplatformaddalsoCFLAGS="-fPIC-m64"optiontothecommandline. 3.Iftheconfigurecommandisfinishedsuccessfully,startinstallationofFreeType.Allbinaryandservicefilesofthe productwillbecopiedtothedirectorydefinedby<FREETYPE_INSTALL_DIR> makeinstall
2.3.Ftgl2.1.2 FtglisrequiredforOCCTVisualizationlibraries. Downloadnecessaryarchivefromhttp://sourceforge.net/projects/ftgl/files/andunpackit.Thedirectory withunpackedsourcesisnamedfurtheras<FTGL_SRC_DIR>. 1.Modify<FTGL_SRC_DIR>/include/FTTextureGlyph.h: changeline55 from:staticvoidFTTextureGlyph::ResetActiveTexture(){activeTextureID=0;} to: staticvoidResetActiveTexture(){activeTextureID=0;} 2.Entertheunixsub-directoryof<FTGL_SRC_DIR>. cd<FTGL_SRC_DIR>/unix 3.Runtheconfigurecommand configure --enable-shared=yes --with-freetype-prefix=<FREETYPE_INSTALL_DIR> -- prefix=<FTGL_INSTALL_DIR> 4.Iftheconfigurecommandisfinishedsuccessfully,startthebuildingprocess make 5.Ifbuildingisfinishedsuccessfully,startinstallationofFtgl.Allbinaryandservicefilesoftheproduct willbecopiedtothedirectorydefinedby<FTGL_INSTALL_DIR> makeinstall
3.BUILDINGOPTIONALTHIRD-PARTYPRODUCTS
3.1.TBB3.0-018 Thisthird-partyproductisinstalledwithbinariesfromthearchivethatcouldbedownloaded fromhttp://threadingbuildingblocks.org/.Goto“Downloads/CommercialAlignedRelease“, findtheneededreleaseversion(tbb30_018oss)andpickthearchiveforLinuxplatform. Theinstallationprocessisthefollowing: ? UnpackthedownloadedarchiveofTBB3.0product(tbb30_018oss_lin.tgz).
3.2.gl2ps1.3.5 Downloadnecessaryarchivefromhttp://geuz.org/gl2ps/andunpackit. 1.Installorbuildcmakeproductfromsourcefile. 2.StartcmakeinGUImodewiththedirectorywheresourcefilesoffl2psarelocated ccmake<GL2PS_SRC_DIR> 2.1.Press[c]tomaketheinitialconfiguration 2.2.DefinenecessaryoptionsCMAKE_INSTALL_PREFIX 2.3.Press[c]tomakethefinalconfiguration 2.4.Press[g]togenerateMakefileandexit orjustrunthefollowingcommand: cmake–DCMAKE_INSTALL_PREFIX=<GL2PS_INSTALL_DIR>–DCMAKE_BUILD_TYPE=Release 3.Startbuildingofgl2ps make 4.Starttheinstallationofgl2ps.BinarieswillbeinstalledaccordingtotheCMAKE_INSTALL_PREFIX option makeinstall
3.3.FreeImage3.14.1
Downloadnecessaryarchivefrom http://sourceforge.net/projects/freeimage/files/Source%20Distribution/ andunpackit.Thedirectorywithunpackedsourcesisnamedfurtheras<FREEIMAGE_SRC_DIR>. 1.Modify<FREEIMAGE_SRC_DIR>/Source/OpenEXR/Imath/ImathMatrix.h: Intheline60insertthefollowing: #include<string.h> 2.EnterthedirectorywheresourcefilesofFreeImagearelocated(<FREEIMAGE_SRC_DIR>). cd<FREEIMAGE_SRC_DIR> 3.Runthebuildingprocess make 4.Runtheinstallationprocess 4.1.Ifyouhavepermissionstowriteinto/usr/includeand/usr/libdirectoriesthenrunthefollowing command: makeinstall 4.2.Ifyouhavenotpermissionstowriteinto/usr/includeand/usr/libdirectoriesthenyouhaveto modifythefile<FREEIMAGE_SRC_DIR>/Makefile.gnu: Replacelines7-9 from: DESTDIR?=/ INCDIR?=$(DESTDIR)/usr/include INSTALLDIR?=$(DESTDIR)/usr/lib to: DESTDIR?=$(DESTDIR) INCDIR?=$(DESTDIR)/include INSTALLDIR?=$(DESTDIR)/lib Replacelines65-67 from: install-m644-oroot-groot$(HEADER)$(INCDIR) install-m644-oroot-groot$(STATICLIB)$(INSTALLDIR) install-m755-oroot-groot$(SHAREDLIB)$(INSTALLDIR) to: install-m755$(HEADER)$(INCDIR) install-m755$(STATICLIB)$(INSTALLDIR) install-m755$(SHAREDLIB)$(INSTALLDIR) from: to: Replaceline70 ldconfig # ldconfig Thenruntheinstallationprocessbythefollowingcommand: makeDESTDIR=<FREEIMAGE_INSTALL_DIR>install 5.Cleantemporaryfiles makeclean 6.IfFreeImagelibraryiscreatedsuccessfully,thenbuilditsC++wrapper(FreeImagePluslibrary). StartbuildingofFreeImagePlus make–fMakefile.fip 7.StartinstallationofFreeImagePlus 7.1.Ifyouhavepermissionstowriteinto/usr/includeand/usr/libdirectoriesthenrunthefollowing command: make–fMakefile.fipinstall 7.2.Ifyouhavenotpermissionstowriteinto/usr/includeand/usr/libdirectoriesthenyouhaveto modifythefile<FREEIMAGE_SRC_DIR>/Makefile.fip: Replacelines7-9 from: DESTDIR?=/ INCDIR?=$(DESTDIR)/usr/include INSTALLDIR?=$(DESTDIR)/usr/lib to: DESTDIR?=$(DESTDIR) INCDIR?=$(DESTDIR)/include INSTALLDIR?=$(DESTDIR)/lib Replacelines66-69 from: install-m644-oroot-groot$(HEADER)$(INCDIR) install-m644-oroot-groot$(HEADERFIP)$(INCDIR) install-m644-oroot-groot$(STATICLIB)$(INSTALLDIR) install-m755-oroot-groot$(SHAREDLIB)$(INSTALLDIR) to: install-m755$(HEADER)$(INCDIR) install-m755$(HEADERFIP)$(INCDIR) install-m755$(STATICLIB)$(INSTALLDIR) install-m755$(SHAREDLIB)$(INSTALLDIR) ln-sf$(SHAREDLIB)$(INSTALLDIR)/$(VERLIBNAME) ln-sf$(VERLIBNAME)$(INSTALLDIR)/$(LIBNAME) Thenruntheinstallationprocessbythefollowingcommand: make–fMakefile.fipDESTDIR=<FREEIMAGE_INSTALL_DIR>install 10.Removetemporaryfiles make–fMakefile.fipclean
4.REFERENCES [1] OpenCASCADETechnologywebsite:http://www.opencascade.org OPENCASCADESAS Page5/5
FreeCAD
http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=CompileOnUnix
sourcelevelcompile HowtobuildandrunFreeCADunderLinux ======================================== Prerequisites ------------- TocompileFreeCADyouwillneed,besidesfunctioningLinux andprogrammingtools(likecompiler),thefollowinglibraries: oPython(http://www.python.org),>=2.5.x oboost(http://www.boost.org),>=1.33.1 oQt(http://www.qtsoftware.com),>=4.1.x oCoin3D(http://www.coin3d.org),>=2.4.x oSoQt(http://www.coin3d.org),>=1.2.x oXerces-C++(http://xml.apache.org/dist/xerces-c/),>=2.6 ozlib(http://www.zlib.net/) AndforthesomeFreeCADmodulestheadditionallibraries oOpenCascade(http://www.opencascade.org),>=5.2 oEigen2(http://eigen.tuxfamily.org/index.php?title=Main_Page),>=2.0.5 oODE(http://www.ode.org),>=0.10.x arerequired. (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|