SectionPlane Active Cut in Ruby

sectionplanes

#1

I am unable to set the active cut in Ruby and have it display in a Scene (Page). I have tried both the active_section_plane(sec_plane) method and the activate method and neither seem to set the active cut. If I use menu View/Hidden Geometry, tool Display Section Planes, Display Section Cuts and the context menu Active Cut with the desired plane selected all works. But I am unable to code this in Ruby and get the same results.

I have the style used by the page set to display the Section Cuts. Which of the above methods is the correct one to use or is there another method, or options I need to set?

Joe…


Bug? - model.pages.show_frame_at - section planes
#2

Firstly, I myself have had funky problems with active section planes and scene pages (especially trying to animate the movement of section planes.)

Perhaps this might help:
page.use_section_planes= true

Did you call page.update(127), and then perhaps view.refresh, after your previous code ?


Other then that, when you want help with code, it’s best to post a method that attempts to do what you wish. Wrap the code snippet in lines of triple backticks (key left of the 1 key) and add the word ruby on the first line of backticks with no intervening space, ie : ```ruby


#3

Hi Dan,

Yes, I did call page.update(127) and view.refresh. But I did not call page.use_section_planes= true. I will give that a try. Thanks for the help and suggestion re:future code help.

Joe…


#4

Hi Dan,

I tried calling page.use_section_planes= true and also page.use_rendering_options = true. Neither helped. I am tied up right at the moment, but as soon as I get some time I will post some code snippets for all to see. Rendering a section cut should be simple and straight forward, but I am running out of ideas. Frustrating!

Joe…