Commit Graph

50 Commits

Author SHA1 Message Date
luzpaz
96ecd57895 Arch: remove superfluous semi-colon in importWebGL.py 2023-04-25 15:27:33 +00:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Yorik van Havre
32bd87ff7d Arch: Removed six module 2023-02-24 13:15:46 +01:00
luz paz
dc5b3cb495 Arch: remove trailing whitespace 2022-11-17 23:54:03 +01:00
luz paz
cd0cd182c9 Arch: remove trailing whitespace in importWebGL.py 2022-11-09 08:49:17 -06:00
Chris Hennes
f6f1928cf8 Arch: Remove Py2 code 2022-11-09 14:08:54 +01:00
Roy-043
bafe141745 Arch: Housekeeping: import translate from correct file 2022-07-21 10:17:03 +02:00
Stephen Early
37e5942c9b Improve WebGL export javascript template
Several improvements to the javascript in the template:

 * Render on demand rather than continuously
 * Support high-DPI displays
 * Fix the frustum depth for both cameras
 * Deal correctly with the browser window being resized
 * Only show controls for objects with geometry

Also some changes made for code clarity:

 * Use 'const' and 'let' instead of 'var', as appropriate
 * Use for...of and .map() instead of iterating over arrays
   using a loop counter
2021-04-10 18:03:09 +01:00
Yorik van Havre
9b2dc76b63 Merge pull request #4631 from sde1000/webgl-export-camera-buttons
Fix camera position buttons in WebGL export
2021-03-26 11:29:03 +01:00
Stephen Early
75b4225d45 Fix camera position buttons in WebGL export
Fix the "View Top" and "View Front" buttons on pages generated with the
WebGL exporter to select the same views as the FreeCAD Navigation Cube.
2021-03-17 18:48:19 +00:00
Alex Young
79449b8ce9 Arch: removes unused imports
Removes unused imports as reported by LGTM.

There are exceptions: `import Arch_rc` is shown as an alert, but has side effects.  It's not clear what the best thing to do in those cases is, so I've left them for now.
2021-02-14 16:27:06 +00:00
luz paz
ff96cb301e Fix typos [skip ci]
Found via `codespell v2.1.dev0`
2020-12-23 14:32:38 -05:00
travisapple
6d065963d3 Merge branch 'master' into master 2020-12-14 11:47:09 -08:00
travisapple
65595c1b26 Update importWebGL.py 2020-12-07 12:57:53 -08:00
travisapple
9b1a8d6d69 Update importWebGL.py 2020-11-17 12:24:11 -08:00
luz paz
67381e9579 Arch: Fix header uniformity and remove trailing whitespace 2020-11-16 14:51:53 +01:00
travisapple
061c3f8fb7 Update importWebGL.py 2020-11-08 10:29:15 -08:00
travisapple
1f70e1b441 Update importWebGL.py 2020-11-08 10:25:30 -08:00
travisapple
4633e6e039 Update importWebGL.py 2020-11-07 13:42:16 -08:00
travisapple
c419371b5d New WebGL Exporter
This is a complete rewrite of this file.
2020-11-07 09:56:12 -08:00
Yorik van Havre
1aa5b755a9 Arch: Fixed non-GUI mode of exporters 2020-06-05 14:58:20 +02:00
luz.paz
8fb5c65736 Arch: [skip ci] fix header uniformity
This PR fixes header uniformity across all Arch files
2019-12-26 18:24:06 +01:00
Zheng, Lei
a3e88a399f Arch: relax Part::Feature type checking
For supporting Link inside Arch.
2019-11-17 13:03:42 -03:00
Daniel Angelov
b630dd7731 Remove extra indentation from webGL template. 2019-08-09 19:07:57 -03:00
Daniel Angelov
b6c8052bf8 Update translate in no GUIup case
If the `utf8_decode` is not added, when saving on server side, the following error occurs: 
```
  File "/usr/share/freecad/Mod/Arch/importWebGL.py", line 129, in export
    FreeCAD.Console.PrintMessage(translate("Arch","Successfully written", utf8_decode=True) + ' ' + filename + "\n")
TypeError: translate() got an unexpected keyword argument 'utf8_decode'
```
2019-08-09 18:54:11 -03:00
GeneGH
09da55e90f Repair pythonopen in line 126 for Python3
Python 3 is fussy about match of data type for a file open or write. Python 2 does not seem to care if a string is written with a 'wb' indicating a binary type, but Python 3 flags it as an error.
2019-02-08 11:06:05 -02:00
Yorik van Havre
e195f035cd Arch: Fixed bug in WebGL exporter 2018-04-02 13:43:29 -03:00
luzpaz
5107d86b60 Crowdin: Removing whitespace from widgets
Modified the code so that the whitespace was hardcoded since translators on Crowdin weren't adding the whitespace. Please review if correct. 
+ found some other typos/grammar issues along the way. 
CC @yorikvanhavre
2018-01-01 17:52:12 +01:00
looooo
d9d1e8640f py3: Draft: string / unicode:
issue 0000995
- use optional argument to get unicode from translation in python2
- add a utf8_decode function to get unicode from string, bytes, unicode
2017-06-20 12:18:01 +02:00
looooo
2bc1162193 py3: Arch: print fixes 2017-01-17 11:13:36 +01:00
Yorik van Havre
8ad2c699f8 py3: open function is in module 'io' in py3 instead of __builtin__ 2017-01-17 09:24:59 +01:00
Yorik van Havre
af97583026 Doc: Fixes in doxygen docs for Draft,Arch, FEM 2016-11-17 17:04:09 -02:00
Jonathan Wiedemann
a83e6f9b48 Fix webgl export for mesh based object 2016-10-29 00:01:03 +02:00
Jonathan Wiedemann
0f88536d42 add decode utf8 importWebGL.py 2016-05-18 17:25:54 +02:00
Yorik van Havre
91b2506ccc Changed all references to DraftGeomUtils.sortEdges to Part.__sortEdges__ 2015-09-04 11:54:57 -03:00
Johannes Reinhardt
941f7dae00 Use new curve discretization 2014-08-14 23:28:50 +02:00
Johannes Reinhardt
8189dddec1 Revert "Arch: Turned jreinhardt's fix to webGL into an option"
This reverts commit 90f2fc2034.

Conflicts:
	src/Mod/Arch/Arch_rc.py
	src/Mod/Arch/Resources/ui/archprefs-import.ui
2014-08-14 23:28:50 +02:00
Yorik van Havre
90f2fc2034 Arch: Turned jreinhardt's fix to webGL into an option 2014-05-02 17:20:17 -03:00
Johannes Reinhardt
1479765154 fix export of circular edges 2014-04-29 16:00:42 -03:00
Johannes Reinhardt
30ef37715f added webGL export option for faceloop linewidth 2014-04-29 16:00:42 -03:00
Yorik van Havre
c64b169164 Arch: fixed importWebGL to work from command line 2014-04-27 10:49:46 -03:00
Yorik van Havre
ccde13acd9 Arch: allow to set a custom camera position in webgl export 2014-04-27 00:00:10 -03:00
Yorik van Havre
710882d2a4 Arch: Place polylines in the XY plane by default in IFC export 2014-04-26 13:37:31 -03:00
Yorik van Havre
8f469bfd03 Arch: made importWebGL easier to use in python scripts 2014-04-26 13:09:43 -03:00
Yorik van Havre
19865c252b Fixed translation system in Arch & Draft 2014-01-07 11:17:31 -02:00
Yorik van Havre
932040bd90 Arch: Better wireframe material for the webgl exporter 2013-04-13 18:57:35 -03:00
Yorik van Havre
970889a655 Arch: Simplified webgl exporter 2013-04-13 00:29:05 -03:00
Yorik van Havre
e335a4348c Arch: WebGL exporter now has mouse controls 2013-04-12 15:37:10 -03:00
Yorik van Havre
9d067e5e88 Arch: fixed errors in webgl exporter 2013-04-11 11:23:39 -03:00
Yorik van Havre
7e11f28866 0001035: WebGL exporter
The Arch module now features a webgl exporter that produces an all-included
HTML file that displays the exported objects in WebGL-capable web browsers.
Many enhancements are still necessary, especially with lights and materials.

At time of export, the exporter downloads the three.js library from github
and includes it in the HTML file, so it has no other dependencies.
2013-04-09 19:43:45 -03:00