Mac User? | Join the Rayscaper Beta for Mac Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • ComponentInstance.explode

    5
    0 Szavazatok
    5 Hozzászólások
    477 Megtekintések
    honoluludesktopH
    Thanks, gotit. Hope I don't forget!-)
  • Best way to get all Face's in model?

    25
    0 Szavazatok
    25 Hozzászólások
    4k Megtekintések
    S
    @thomthom said: ............ 2. Exploding is very slow in SU. ( and if your script should fail at some point and halt - you're left with a broken model. ) ok! I changed my way and it seems work alot faster! (for my plugin converter 2 POV-Ray script). note: At this time I get only the color of the parent object(s) and not texture... def pov_find_faces(entities,tform,layername) entities.each do |entity| if entity.is_a?(Sketchup;;Face) pov_write_face(entity, tform) elsif entity.is_a?(Sketchup;;Group) if entity.material if entity.material.color $levelcolor[$level]=entity.material.color else $levelcolor[$level]=$levelcolor[$level-1] end if entity.material.alpha $levelalpha[$level]=entity.material.alpha.to_s else $levelalpha[$level]=$levelalpha[$level-1] end else $levelcolor[$level]=$levelcolor[$level-1] $levelalpha[$level]=$levelalpha[$level-1] end $level+=1 pov_find_faces(entity.entities,tform * entity.transformation,entity.name) elsif entity.is_a?(Sketchup;;ComponentInstance) if entity.material if entity.material.color $levelcolor[$level]=entity.material.color else $levelcolor[$level]=$levelcolor[$level-1] end if entity.material.alpha $levelalpha[$level]=entity.material.alpha.to_s else $levelalpha[$level]=$levelalpha[$level-1] end else $levelcolor[$level]=$levelcolor[$level-1] $levelalpha[$level]=$levelalpha[$level-1] end $level+=1 pov_find_faces(entity.definition.entities,tform * entity.transformation,entity.name) end end $level=$level-1 #UI.messagebox($level.to_s) end
  • Recursive print_group_tree() help

    12
    0 Szavazatok
    12 Hozzászólások
    1k Megtekintések
    honoluludesktopH
    tt, This recursive stuff really works! Below drills down into component instances. Now, on to add groups. def get_ci(ci_array) entities = Sketchup.active_model.entities entities.each do |ent| if ent.is_a? Sketchup;;ComponentInstance ci_array.push ent end end return ci_array end def explode_ci_array(ci_array) ci_sub_array=[] ci_array.each do |ci| if ci.is_a? Sketchup;;ComponentInstance ci_sub_array=ci.explode end end return ci_sub_array end ci_array=[] found = false while found == false ci_array=get_ci(ci_array) ci_array=explode_ci_array(ci_array) if ci_array[0] == nil found = true end end
  • File access speed

    9
    0 Szavazatok
    9 Hozzászólások
    708 Megtekintések
    honoluludesktopH
    All this time I labored under the belief that only old programs up to Win98 ran in the command window, and didn't ever try.
  • Get_datfile_info

    2
    0 Szavazatok
    2 Hozzászólások
    282 Megtekintések
    thomthomT
    The file seem to be a config file of SU. @unknownuser said: // NOTE TO USERS: Making modifications to this file is not recommended as it will be overwritten // each time an upgrade is installed. I don't see much useful info in it for us... Possibly it could be used to brand SU - but as the file warns - it'll be overwritten upon SU updates...
  • Small face fails

    5
    0 Szavazatok
    5 Hozzászólások
    557 Megtekintések
    S
    @jim said: You may be able to use a PolygonMesh instead of adding each Face. The mesh will also be faster to create than individual faces; but which is better depends on your goal. See also: http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#add_faces_from_mesh http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#fill_from_mesh Yes I thank you, but I am working about some interfaces between SketchUp and other CAD system. At this moment I am unable to find the unique criterion that SkUp uses to dispense the order of the ponts in the mesh. Especially about faces edited by subtraction of other faces or with holes. The mesh is really difficult to decode because the vertexes seem to hop and to return using a lot of different combinations. This is really laborious and so I use to split triangular faces, that in CAD is a 4 vertexs faces with a duplicated vertex, or, where it'i possible, a couple of SkUp triangles that are a unique (cad) 3DFACE. Anyway I thank you very much, because I'll to import also textures, and I will need of the meshes also, I fear... Excuse my bad english..
  • Manipulate a ruby from command line?

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    M
    ah, OK cheers Jim. It looks like it will be possible one way or another! now I know its possible, time to hunt down someone with the capabilities Thanks a lot for the help, Tom
  • Groups to components plugin ploblem

    8
    0 Szavazatok
    8 Hozzászólások
    621 Megtekintések
    thomthomT
    hmm... that can be a problem with symmetrical objects like this - there are several possible ways to orient them...
  • Help with ruby

    4
    0 Szavazatok
    4 Hozzászólások
    2k Megtekintések
    A
    My previous ruby file didn't even have the ./ to delete.in that script... tried for days to make it work. Cleared up now with this one ..Many Thanks :O)
  • Get objects at specified poitn

    11
    0 Szavazatok
    11 Hozzászólások
    852 Megtekintések
    Chris FullmerC
    Good question, hopefully soon. Now we'll have to add a version check to make sure people are not running SU 8, original release. But that's ok, the fix will be well recieved.
  • A clone of an active_view.camera

    9
    0 Szavazatok
    9 Hozzászólások
    656 Megtekintések
    TIGT
    But it is a transient setting! If you click in the view it evaporates... It would be good if it were accessible but it is pretty transient...
  • Close webdialogs on File-New/Open

    14
    0 Szavazatok
    14 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    Agreed. I logged several Feature Requests for MDI support (new methods) in the API, including a Models collection.
  • Face Me

    9
    0 Szavazatok
    9 Hozzászólások
    1k Megtekintések
    thomthomT
    What makes it more troublesome is that the documentation doesn't mention bugs that appeared in the various methods in the various SU versions.
  • Vector transformation ... whut?

    3
    0 Szavazatok
    3 Hozzászólások
    390 Megtekintések
    thomthomT
    Never - my brain was being silly.
  • Problems saving user preferences

    8
    0 Szavazatok
    8 Hozzászólások
    691 Megtekintések
    honoluludesktopH
    Wow, Sketchup.read_default and Sketchup.write_default were easy to implement. Attaching the defaults to individual models can also be advantageous, and I will have to think about the best way to save user defaults. Thanks guys. a_values=[] s_value="" s_value = Sketchup.read_default "honoluludesktop","values","None:Inches:Model:to Faces:by Number" a_values = s_value.split(":") . . results = inputbox prompts,a_values,enums,my_file_name+" Options" . . a_values = ["None",scale_sel,origin_sel,dface_sel,material_sel] s_value = a_values.join(":") result = Sketchup.write_default "honoluludesktop","values",s_value
  • Face loop vertex order?

    15
    0 Szavazatok
    15 Hozzászólások
    3k Megtekintések
    honoluludesktopH
    TIG, As you suggest, I will work on this and post what I find. Thanks.
  • Transformation in scale

    6
    0 Szavazatok
    6 Hozzászólások
    588 Megtekintések
    honoluludesktopH
    tt, and cf, Thanks. Got it to work as follows: my_definition.entities.transform_entities(t,my_definition.entities.to_a) Off and on for 4 days, this has got to be the longest time I've spent getting a single line of code right. Hopefully I'm getting better.
  • Launching Google Sketchup from external application

    2
    0 Szavazatok
    2 Hozzászólások
    465 Megtekintések
    thomthomT
    http://forums.sketchucation.com/viewtopic.php?f=180&t=30000
  • ACad Colors 2 RGB

    8
    0 Szavazatok
    8 Hozzászólások
    823 Megtekintések
    honoluludesktopH
    I unzipped a skm to see what it contained. If I learn enough, maybe working with skm's is something I can attempt to tackle a year from now?-)
  • Extract Zip files via SU Ruby?

    5
    0 Szavazatok
    5 Hozzászólások
    494 Megtekintések
    tbdT
    I think it can be ported on OSX as zlib (library that I used in dezip) is available on OSX as well.

Advertisement