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 #6 from Rayfoundry/position_and_color · hovedguy/pythonocc-demos@28cd772

File tree

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

‎examples/core_load_step_with_colors.py‎

Copy file name to clipboardExpand all lines: examples/core_load_step_with_colors.py
+9-7Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,20 +190,20 @@ def getSubShapes(lab, loc):
190190
# n = c.Name(c.Red(), c.Green(), c.Blue())
191191
# print(' color Name & RGB: ', c, n, c.Red(), c.Green(), c.Blue())
192192
# Display shape
193-
display.DisplayColoredShape(shape, c)
193+
# display.DisplayColoredShape(shape, c)
194194

195195
for i in range(l_subss.Length()):
196196
lab = l_subss.Value(i+1)
197197
print("\n######## simpleshape subshape label :", lab)
198-
shape = shape_tool.GetShape(lab)
198+
shape_sub = shape_tool.GetShape(lab)
199199

200200
c = Quantity_Color()
201201
colorSet = False
202-
if (color_tool.GetInstanceColor(shape, 0, c) or
203-
color_tool.GetInstanceColor(shape, 1, c) or
204-
color_tool.GetInstanceColor(shape, 2, c)):
202+
if (color_tool.GetInstanceColor(shape_sub, 0, c) or
203+
color_tool.GetInstanceColor(shape_sub, 1, c) or
204+
color_tool.GetInstanceColor(shape_sub, 2, c)):
205205
for i in (0, 1, 2):
206-
color_tool.SetInstanceColor(shape, i, c)
206+
color_tool.SetInstanceColor(shape_sub, i, c)
207207
colorSet = True
208208
n = c.Name(c.Red(), c.Green(), c.Blue())
209209
print(' instance color Name & RGB: ', c, n, c.Red(), c.Green(), c.Blue())
@@ -221,7 +221,9 @@ def getSubShapes(lab, loc):
221221
# n = c.Name(c.Red(), c.Green(), c.Blue())
222222
# print(' color Name & RGB: ', c, n, c.Red(), c.Green(), c.Blue())
223223
# Display shape
224-
display.DisplayColoredShape(shape, c)
224+
# display.DisplayColoredShape(shape, c)
225+
226+
display.DisplayColoredShape(shape, c)
225227

226228
def getShapes():
227229
labels = TDF_LabelSequence()

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.