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 — Merge pull request #12 from tpaviot/review/codacy-fixes · hovedguy/pythonocc-demos@7fd7a5e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • examples
    • core_boolean_fuzzy_cut_emmenthaler.py
    • core_classic_occ_bottle.py
    • core_display_line_properties.py
    • core_display_overlayered_text.py
    • core_display_raytracing.py
    • core_export_step_ap203.py
    • core_export_stl.py
    • core_geometry_airfoil.py
    • core_geometry_bisector.py
    • core_geometry_bounding_box.py
    • core_geometry_ellipsoid.py
    • core_geometry_geomplate.py
    • core_geometry_surface_from_curves.py
    • core_mesh_traverse.py
    • core_modeling_sprocket.py
    • core_shape_properties.py
    • core_tesselation_vertices_list.py
    • core_topology_face.py
    • core_topology_local_ops.py
    • core_visualization_camera.py
    • core_webgl_mesh_quality.py
    • core_webgl_threejs_helix.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/tpaviot/pythonocc-demos.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/tpaviot/pythonocc-demos/context:python)
2+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6a7ad7d29ff44acea40ef5f130249557)](https://www.codacy.com/app/tpaviot/pythonocc-demos?utm_source=github.com&utm_medium=referral&utm_content=tpaviot/pythonocc-demos&utm_campaign=Badge_Grade)
23

34
Some pythonocc related code snippets, examples, jupter notebooks etc.
45

Collapse file

‎examples/core_boolean_fuzzy_cut_emmenthaler.py‎

Copy file name to clipboardExpand all lines: examples/core_boolean_fuzzy_cut_emmenthaler.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import time
2222
import sys
2323

24-
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinder, BRepPrimAPI_MakeCone
24+
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox, BRepPrimAPI_MakeCylinder
2525
from OCC.Core.gp import gp_Pnt, gp_Vec, gp_Ax2, gp_Dir
2626
from OCC.Core.BRepAlgoAPI import BRepAlgoAPI_Cut
2727
from OCC.Core.TopTools import TopTools_ListOfShape
Collapse file

‎examples/core_classic_occ_bottle.py‎

Copy file name to clipboardExpand all lines: examples/core_classic_occ_bottle.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from OCC.Core.gp import gp_Pnt, gp_OX, gp_Vec, gp_Trsf, gp_DZ, gp_Ax2, gp_Ax3, gp_Pnt2d, gp_Dir2d, gp_Ax2d
2323
from OCC.Core.GC import GC_MakeArcOfCircle, GC_MakeSegment
2424
from OCC.Core.GCE2d import GCE2d_MakeSegment
25-
from OCC.Core.Geom import Geom_Plane, Geom_CylindricalSurface, Geom_Plane
25+
from OCC.Core.Geom import Geom_Plane, Geom_CylindricalSurface
2626
from OCC.Core.Geom2d import Geom2d_Ellipse, Geom2d_TrimmedCurve
2727
from OCC.Core.BRepBuilderAPI import (BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire,
2828
BRepBuilderAPI_MakeFace, BRepBuilderAPI_Transform)
Collapse file

‎examples/core_display_line_properties.py‎

Copy file name to clipboardExpand all lines: examples/core_display_line_properties.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def line():
5454
line2 = Geom_Line(p2, d2)
5555

5656
ais_line2 = AIS_Line(line2)
57-
57+
5858
width = float(i)
5959
drawer = ais_line2.Attributes()
6060
# asp : first parameter color, second type, last width
Collapse file

‎examples/core_display_overlayered_text.py‎

Copy file name to clipboardExpand all lines: examples/core_display_overlayered_text.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from math import pi
2020

2121
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox
22-
from OCC.Core.Aspect import Aspect_TODT_NORMAL, Aspect_TODT_DEKALE
22+
from OCC.Core.Aspect import Aspect_TODT_NORMAL, Aspect_TODT_DEKALE
2323
from OCC.Core.Quantity import Quantity_Color, Quantity_NOC_BLACK, Quantity_NOC_ORANGE
2424
from OCC.Core.TCollection import TCollection_AsciiString
2525
from OCC.Core.gp import gp_Ax1, gp_Pnt, gp_Dir, gp_Trsf
Collapse file

‎examples/core_display_raytracing.py‎

Copy file name to clipboardExpand all lines: examples/core_display_raytracing.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def raytracing_default_depth(event=None):
5858

5959
def raytracing_depth_8(event=None):
6060
display.SetRaytracingMode(depth=8)
61-
61+
6262
def rasterization(event=None):
6363
display.SetRasterizationMode()
6464

Collapse file

‎examples/core_export_step_ap203.py‎

Copy file name to clipboardExpand all lines: examples/core_export_step_ap203.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@
3636
step_writer.Transfer(box_s, STEPControl_AsIs)
3737
status = step_writer.Write("box.stp")
3838

39-
assert status == IFSelect_RetDone
39+
if status != IFSelect_RetDone:
40+
raise AssertionError("load failed")
Collapse file

‎examples/core_export_stl.py‎

Copy file name to clipboardExpand all lines: examples/core_export_stl.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
stl_output_dir = os.path.abspath(os.path.join("..", "assets", "models"))
2828

2929
# make sure the path exists otherwise OCE get confused
30-
assert os.path.isdir(stl_output_dir)
30+
if not os.path.isdir(stl_output_dir):
31+
raise AssertionError("wrong path provided")
3132
stl_low_resolution_file = os.path.join(stl_output_dir, "torus_default_resolution.stl")
3233
write_stl_file(my_torus, stl_low_resolution_file)
3334

Collapse file

‎examples/core_geometry_airfoil.py‎

Copy file name to clipboardExpand all lines: examples/core_geometry_airfoil.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from OCC.Core.gp import gp_Pnt, gp_Vec, gp_Pnt2d, gp_Pln, gp_Dir
3434
from OCC.Core.TColgp import TColgp_Array1OfPnt2d
3535
from OCC.Display.SimpleGui import init_display
36-
36+
3737
from OCC.Extend.ShapeFactory import make_wire, make_edge
3838

3939

Collapse file

‎examples/core_geometry_bisector.py‎

Copy file name to clipboardExpand all lines: examples/core_geometry_bisector.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def bisect_linecircle(event=None):
4848
ci1 = gp_Circ2d(gp_Ax22d(), 10000)
4949
li1 = gp_Lin2d(gp_Pnt2d(2000000, 20), gp_Dir2d(0, 1))
5050
bi = GccAna_CircLin2dBisec(ci1, li1)
51-
assert bi.IsDone()
51+
if not bi.IsDone():
52+
raise AssertionError("Bisec is not Done")
5253
bisec = bi.ThisSolution(1)
5354
pb = bisec.Parabola()
5455
display.DisplayShape([make_edge2d(ci1), make_edge2d(li1)])

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.