Shadow bug to be fixed (@TIG(?))
-
Hi! Here is some ruby idea:
To fix shadow bug I use to add a section plane cutting the model via camera's point and facing the vista. But very often it's hard to add it manually.
So why TIG you may ask? Optionally I'd like to unite sec plane creation with TIG's elevation_45_shadow.rb (as if some plane on 'face me' component in front of camera was preselected).
P.S. And it should turn off 'view section plane'!
Many thanks in advance. -
A shadow camera section.. super idea
-
This is brilliant. If it really works, you should get the Google Nobel Prize. They have been suffering with it for 5 years now!
-
There is one snag here: we got virtually no control over section planes via the API:
http://code.google.com/apis/sketchup/docs/ourdoc/sectionplane.htmlWe can only get and set the direction of the plane.
No way method to add one (though one can work around this by putting a section plane inside a component and store that in the plugin's folder - that can then be used to add a plane)
And there is no way to make a plane the active one. So we can get a nearly automatic process, but you'd have to set the active plane manually.
-
@thomthom said:
There is one snag here: we got virtually no control over section planes via the API:
http://code.google.com/apis/sketchup/docs/ourdoc/sectionplane.htmlWe can only get and set the direction of the plane.
No way method to add one (though one can work around this by putting a section plane inside a component and store that in the plugin's folder - that can then be used to add a plane)
And there is no way to make a plane the active one. So we can get a nearly automatic process, but you'd have to set the active plane manually.
Oh nooo.. Sometimes SU make me sh!t bricks
-
well, i have full confidence in our ruby masters (while i open my prayer book..)
-
@cadfather said:
well, i have full confidence in our ruby masters (while i open my prayer book..)
Me too. But if Thom is right, could it be a 3-stage script:
- it'd hide entire model and creates 'face me' face say 100cm from the cameras point.
- user sets sec plane manually and makes it active.
- script continues: moves 101 cm to the camera, , unhides model, set 45 degeree shadows,deletes temp face, creates scene. Pervertive?
-
One can make the script do everything except activating the section plane.
-
Since a SectionPlane is a DrawingElelment you should be able to do most things with it like Move, Rotate etc. You also have two extra methods to 'set' and 'get' a SectionPlane's 'plane'...
You can't make a SectionPlane - unfortunately there is not equivalent method toentities.add_section_plane(plane)
- though the trick of importing an 'empty' component that contains only a SectionPlane and then exploding it works - you can get it's id and then change it's location/plane...
The BIG problem is that there is noentities.active_section_plane
[returning a SectionPlane or nil if none is active] orentities.active_section_plane=SectionPlane
[setting that active and all others not - equivalent tomodel.active_layers/=
but entities based as there can be one active SectionPlane in each set], alsoSectionPlane.active?
to see if a particular one is active andSectionPlane.deactivate
to switch it 'off', would be good. Note that hiding/showing active/visible SectionPlanes can already be done though Display settings... and you can already search through an entities set and make an array of its SectionPlanes - though then you can't do that much to them...
If these simple methods were added to the Ruby API it would open up loads of possibilities...
It's beyond a mere scripter to hack into the SKP format and get/set the entities's active SectionPlane BUT it must be possible -
@tig said:
Since a SectionPlane is a DrawingElelment you should be able to do most things with it like Move, Rotate etc. You also have two extra methods to 'set' and 'get' a SectionPlane's 'plane'...
You can't make a SectionPlane - unfortunately there is not equivalent method toentities.add_section_plane(plane)
- though the trick of importing an 'empty' component that contains only a SectionPlane and then exploding it works - you can get it's id and then change it's location/plane...
The BIG problem is that there is noentities.active_section_plane
[returning a SectionPlane or nil if none is active] orentities.active_section_plane=SectionPlane
[setting that active and all others not - equivalent tomodel.active_layers/=
but entities based as there can be one active SectionPlane in each set], alsoSectionPlane.active?
to see if a particular one is active andSectionPlane.deactivate
to switch it 'off', would be good. Note that hiding/showing active/visible SectionPlanes can already be done though Display settings... and you can already search through an entities set and make an array of its SectionPlanes - though then you can't do that much to them...
If these simple methods were added to the Ruby API it would open up loads of possibilities...
It's beyond a mere scripter to hack into the SKP format and get/set the entities's active SectionPlane BUT it must be possible
Why does the green color lenses of your geek sunglasses shine like light at the tunnel's end?
Advertisement