GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fixed missing big step file · hovedguy/pythonocc-demos@0e264a8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • examples
    • core_webgl_threejs_bigfile_multipleshapes.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎examples/core_webgl_threejs_bigfile_multipleshapes.py‎

Copy file name to clipboardExpand all lines: examples/core_webgl_threejs_bigfile_multipleshapes.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>.
1919

2020
import os
21+
import sys
2122

2223
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeTorus
2324

@@ -27,7 +28,12 @@
2728

2829
# opens a big step file
2930
# render each part of the assembly as a shape
30-
big_shp = read_step_file(os.path.join('..', 'assets', 'models', '3864470050F1.stp'))
31+
stp_file = os.path.join('..', 'assets', 'models', '3864470050F1.stp')
32+
if not os.path.isfile(stp_file):
33+
print("File 3864470050F1.stp not found. First unzip 3864470050F1.zip file from the assets folder")
34+
sys.exit(0)
35+
# file exist, we can load the file
36+
big_shp = read_step_file(stp_file)
3137

3238
all_subshapes = TopologyExplorer(big_shp).solids()
3339

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.