Odd results from add_circle/add_face combo
-
As you probably know, add_circle does not automatically create a face so typically you would follow it with an add_face using the edges produced by the add_circle. However, if the added circle is be totally within the bounds of and on the same plane as an existing face, neither the circle or face is created.
Example 1: Circle is placed at center of selected face. Nothing is added to the model.
Example 2: Circle is placed at the corner of the selected face. New edges and face is added to the model.
Oddly enough, the corner of the original face that falls within the circle, appears to be part of both faces as it is part of the selection when the face within the circle but outside the original face is selected or the original face is selected.
-
Odd indeed! I can't reproduce example 1. Here's what I got
-
@slbaumgartner said:
Odd indeed! I can't reproduce example 1. Here's what I got
[attachment=0:2xx35ukp]<!-- ia0 -->Screen Shot 2015-03-30 at 12.17.58 PM.png<!-- ia0 -->[/attachment:2xx35ukp]
Did you use my code or some of your own?
mod = Sketchup.active_model ent = mod.active_entities sel = mod.selection f=sel.first c=f.bounds.center n=f.normal e=ent.add_circle c,n,24,12 f=ent.add_face(e)
-
works for me using your code...
I'm using SUv15 on a mac and so is Steve...
also tested v8, v13, v14 and it works on all...
john -
Win7, SU15.
-
Well I don't know what to say. I have tried this on both v8 and v2014 and it fails every time. Perhaps it has something to do with Windows Vista. I would appreciate any other Vista users out there to try this and report their results.
-
-
Doesent work for me either when running in SU8 and Alex Ruby code editor. BUT it does work from the Ruby consol pasted as a oneliner(semicolons).
So... maybe some hickup in the webdialog...
-
This just keeps getting more bazaar. The code works when pasted into Ruby Console but fails when executed from Ruby Web Console.
I first noticed this in a plugin I was creating and I had to skip the add_face if I was on a face to get it to work.
I just created a new simple plugin that accepts a center point and a point on the circle and it works without fail on a face or off. The only real difference in the two plugins is a start_operation and commit_operation statements.
Remembering these have caused be trouble in the past, I removed them from plugin that was failing and that cured the problem. So the moral of the story is, if strange things are happening with a plugin, remove the start/commit statements and see if it goes away.
-
For for me as well - SU2015 Win8.1.
Have you tried with extension disabled?
Advertisement