In the api http://code.google.com/intl/sl-SI/apis/sketchup/docs/ourdoc/geom.html#intersect_line_plane
,this function should return point3d.
But it seems that return vector3d.
Is it a mistake in the documentation?
How to easier(less computation) convert vector3d to point3d?
p.s. does anybody know how to see api users comments?
I can not set my browser (chrome) to show the comments.
Posts made by voljanko
-
Geom.intersect_line_plane = point3d?
-
RE: [Code] How do you compute weighted vertex normals?
I'm trying to follow your conversation,but not sure to understand what are you trying to do.
Do you want to align faces that are nearly aligned? -
RE: [Code] How do you compute weighted vertex normals?
By computer you mean compute?
-
RE: Sketchup kind of 'stuck' after scripts
If you want to "close" a tool,you have to select another tool.
If you want to do it in code,trySketchup.send_action "selectSelectionTool;"
,or other tools you want.
-
RE: Messed up model
Ok,what about this one.It seems all clear,but is not.It has some irregularities.If you delete one edge,the face will be deleted and if you draw back the edge,the face will not come back.This means that the points of the edges are not on the same plane.
I don't want to remove coplanar edges but to detect this kind of models (or entities).What to do to detect it?
-
RE: Sketchup kind of 'stuck' after scripts
Nothing is wrong.You are just "in the tool".
When the tool is selected,you can do just what the tool let you do.So it can be like stuck.
You just have to select other tools to exit this tool. -
RE: Sketchup kind of 'stuck' after scripts
@ghandi said:
Mainly that are modified versions of Fillet.rb, Pipe_along_Path.rb.
First step would be to check if the original versions work ok for you.If yes,than find the differences.Than add every difference to the original(working) code.Then you will know what line makes your code not working. -
RE: Sketchup kind of 'stuck' after scripts
It all depends of the letters in your scripts
-
RE: Messed up model
Try to delete all the coplanar edges that are on this model and you will have only 1 face.
Then try to select all (edited) and make the intersect with selected (with the right button mouse menu).
The message will be that is nothing to intersect,but the face will be divided in many faces.
I think that this is because of the Sketchup tolerance of the coplanar faces(the points of the edges are not on the same plane).@tig said:
Why would you want to intersect it with itself?
Only to detect such deviations.
If it is all regular,nothing happen.
If the geometry will change,something was wrong.
If bugsplat occurs,the model has some serious problems and can affect other functions too. -
Messed up model
I would like to know ,what is wrong with this model.
It is causing me a bugsplat in some functions (self intersect function).group.entities.intersect_with false,transformation, group.entities,transformation, true, group.entities.to_a
Sometimes Sketchup detect it and offer to fix error,but I cannot repeat this situation.
This model is a part of bigger model and I have isolated the issue to this small piece.
I would like to detect this kind of errors without bugsplat.
-
RE: Self intersect
Grrr,I hate the "smart" pages.
There are no comments on my API pages.I will try to change setting in my browser.@unknownuser said:
But using the 'group.transformation' for both required transformations to ensure that the group's geometry intersects with itself, and it returns the intersection geometry in the same location should work ? Perhaps not if the group has been moved ??
I have tested it... and it is only ok, if both the transformations are "new".
-
RE: Self intersect
Yes,but transformations should be "new",otherwise the intersection lines are displaced.
p.s.where do you read the user comments of the API? -
RE: Self intersect
Now it is ok,thanks.Here is the code:
transformation = Geom;;Transformation.new faces=[] group.entities.each do |entity| if entity.is_a?( Sketchup;;Face) faces.push entity end end group.entities.intersect_with false, transformation, group.entities,transformation, true, faces
p.s.where do you read the user comments of the API?
-
Self intersect
I'm trying to intersect a group with itself like this:
group.entities.intersect_with false, group.transformation, group.entities, group.transformation, true, group.entities
but with a type mismatch error.
What is wrong,how to intersect a group with itself? -
RE: Entities.add_group bug?
Grrr,it is only working if the group is edited (so in the same context).
Otherwise strange behaviour and Bugsplat anytime. -
RE: Entities.add_group bug?
@thomthom said:
I always get uneasy when a code is run the first time without any errors...
Reading your code, the line
group.erase
makes me curious because the erase should be with the !.
So I discover that it was only half the code working.
But the result is ok.
So the working code is:def move_face(face, destination_entities ) source_entities = face.parent.entities entities = face.edges << face # I think you need to include all the edges related to the face group = source_entities.add_group( entities ) end
So the untested code theory remains
I will test it more,because of the Bugsplat fear. -
RE: Entities.add_group bug?
It's working!!
I cannot believe it.I have a theory that nothing can work without testing.You are breaking this theory -
RE: Entities.add_group bug?
@thomthom said:
To move the face, why not group it, get it's definition, then place a new instance in the destination context and erase the old.
Can you give the code sample,please(how to group it).I would like to test it.
-
RE: Entities.add_group bug?
Uff,a lot of work for "moving" a face.And still needs the material and back material and soften edges...
Almost easier to wait the Sketchup team to repair the Entities.add_group(other_entities) function@tig said:
How do YOU know [magically?] that e0=group1.entities[0] is a face?
The ruby console confirmed it.It is only for testing. -
RE: Entities.add_group bug?
Thank you for the "line" example,I have try to "move" a face,but it is not working.
group1=model.selection[0] e0=group1.entities[0] # a face group2=group1.entities.add_group() group2.entities.add_face(e0.edges) e0.erase!
What's wrong?
The error is : Edge has different parent