HLR.parent BUG SPLAT!
-
HLR.parent BUG SPLAT!
The HLR.parent method does not have error handling to trap when the object is not yet attached to a collection or other object.
If .parent is called on any HLR class object before attachment, a BUG SPLAT! results.
The method should either return nil when it has no parent, or raise a proper Exception. In both cases the $! error message should be set to some meaningful string, ie: "Nesting Error. No parent object..." (or similar.)
Platform: Win32
Sketchup: 7.1.6087--report--
At Ruby Console:
var=Sketchup::HLR.new
var.parent
--> BUG SPLAT!I have no idea what an HLR entity subclass is used for! It inherits all the Entity baseclass methods, and adds 2 of it's own, .calculate and .num_faces
The Sketchup::HLR class is undocumented in the API. -
same problem on Mac as well. let's see what HLR stands for ? Hyper Lazy Render ?
-
@dan rathbun said:
HLR.parent BUG SPLAT!
I've brought this to the attention of Simone, our Ruby QA expert.
Andrew
-
When do you ever get an HLS class anyway?
-
@thomthom said:
When do you ever get an HLS class anyway?
You can make one using: var = Sketchup::HLR.new
But as I had said in the API forum:this post
@dan rathbun said:
The classSketchup::HLR is undocumented in the API.
It's an Entity subclass.
It inherits all the Entity baseclass methods, and adds 2 of it's own:- .calculate* .num_faces
If you create a HLR object at the console, and call .parent (when it has no parent) a BUG SPLAT! results. See post: (link to this Bug Reports thread.)
What is this class HLR used for? (.. as there is no .add_HLR method for the Entities collection object.)
The HLR question remains unanswered...
_ -
@unknownuser said:
... let's see what HLR stands for? Hyper Lazy Render ?
Apparently it stands for Hidden Line Renderer (or similar.)
If Sketchup::HLR is a private internal class, meant only to be used by Sketchup itself, it's constructor method should be made private (and/or renamed.) In addition, the API should probably tell us not to mess with it.
Advertisement