⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Inputbox too narrow

    12
    0 Votes
    12 Posts
    898 Views
    G
    I've now made a simple video of the door maker. http://www.youtube.com/watch?v=vBeug0CTA7k
  • Name of the top parent

    7
    0 Votes
    7 Posts
    603 Views
    G
    @tt_su said: ...What is it you are making? What is the goal you are trying to achieve? I wanna make it [image: report.jpg]
  • A few newbie questions...

    12
    0 Votes
    12 Posts
    844 Views
    Dan RathbunD
    And depending upon version, either the relative or absolute path, or both script path(s), (sometimes downcased,) were pushed into the $LOADED_FEATURES array. Sometimes we need a table to keep track of things like this from version to version.
  • Atributes size

    16
    0 Votes
    16 Posts
    1k Views
    Dan RathbunD
    It is OK, goga. We love a good debate!
  • Between different Macs plugin works and doesn't work

    48
    0 Votes
    48 Posts
    5k Views
    S
    So the Alert shows that it caught the error, but evidently I don't know how to read out the message. BTW, I added that "Hello!" just because a blank dialog leaves me wondering if anything happened. Steve
  • How to get info from a face

    5
    0 Votes
    5 Posts
    491 Views
    tt_suT
    @d0n said: Thanks which function should i look at if i want to get all the vertices of the face? http://www.sketchup.com/intl/en/developer/docs/ourdoc/face.php#vertices
  • Ruby script to output outer face loop?

    20
    0 Votes
    20 Posts
    4k Views
    tt_suT
    face.outer_loop returns a Loop object. Loop object will return vertices in order and it will return EdgeUse objects in order. If you have an Edge and want to figure out it's direction in relationship with a face you must use edge.reversed_in?(face).
  • How to create the pulldown menu for DC

    6
    0 Votes
    6 Posts
    529 Views
    G
    @jim said: You have an extra space in this line: ang_def.set_attribute 'dynamic_attributes','_test_options[highlight=#ff0000:169f3gnp]_[/highlight:169f3gnp]','&yes=yes&no=no' Yes, thanks! All has earned.
  • [code] ComponentDefinition-delete (another version!)

    22
    0 Votes
    22 Posts
    5k Views
    F
    @tig said: It's ' commit_operation' NOT ' confirm_operation' - my typo - it's now corrected in my earlier code... You can manually select objects including instances, and just the instances' definitions will be processed. You can only add 'entities' to a Selection [like geometry or instances] in code. NOT a 'definition' - which is NOT an 'entity'... Thanks you sir! That works perfectly! I should of caught that but I just figured it was a command I didn't know of yet!
  • How do you make plug-ins for sketchup

    103
    0 Votes
    103 Posts
    18k Views
    T
    @jeff hammond said: @unknownuser said: How do you make plug-ins for sketchup me? by begging I do not know, but maybe this can help you: http://www.alexschreyer.net/projects/sketchup-ruby-code-editor/
  • 3D model of hill-like structures using SketchUp C SDK

    12
    0 Votes
    12 Posts
    2k Views
    tt_suT
    There is, yes. But the C API isn't finalized either. It's still being developed and we are improving it to make it have a similar coverage as the Ruby API.
  • How to tell if a plane is horizontal

    12
    0 Votes
    12 Posts
    1k Views
    jeff hammondJ
    @daiku said: @jeff hammond said: . (is this a ruby question or an ill_located thead?) Am I not in the developers forum? yes, you are. every thread isn't always started in the right forum though and your question could be answered in a sketchup way or a ruby way.. the first answer to your question was how to figure it out in sketchup. hence my question. [+, many members (myself included) browse the forums via the 'new posts' or 'active topics' lists so sub-forums aren't always so obvious since we're basically seeing all forums in one view.. some confusion is bound to happen here&there.. it's ok]
  • [plugin/code] get global coordinates, the brute force way

    4
    0 Votes
    4 Posts
    1k Views
    A
    Here's a piece of code I've written for the new project to get stuff from groups/components. Maybe you'll find it useful: # ------------------------------------------------------------------------------ # # Anton Synytsia # anton.synytsia@gmail.com # # ------------------------------------------------------------------------------ module MSPhysics module Group # @!visibility private VALID_TYPES = [Sketchup;;Group, Sketchup;;ComponentInstance].freeze # @!visibility private INVALID_TYPE = 'The specified entity is not a group or a component!'.freeze module_function # Get entities of a group/component/definition. # @param [Sketchup;;Group, Sketchup;;ComponentInstance, Sketchup;;ComponentDefinition] ent # @return [Sketchup;;Entities, NilClass] # @since 1.0.0 def get_entities(ent) case ent when Sketchup;;Group, Sketchup;;ComponentDefinition ent.entities when Sketchup;;ComponentInstance ent.definition.entities else nil end end # Get all edges of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Array<Geom;;Point3d>>] An array of edges. Each edge # represents an array of two points. # @since 1.0.0 def get_edges(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end edges = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) edges.push *get_edges(e, true, true) next end next unless e.is_a?(Sketchup;;Edge) edge = [] e.vertices.each { |v| edge.push v.position } edges.push edge } if transform == true edges.each { |edge| edge.each { |pt| pt.transform!(ent.transformation) } } end edges end # Get vertices from all edges of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Geom;;Point3d>] An array of points. # @since 1.0.0 def get_vertices_from_edges(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end pts = [] verts = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) pts.push *get_vertices_from_edges(e, true, true) next end next unless e.is_a?(Sketchup;;Edge) e.vertices.each { |v| verts.push(v) unless verts.include?(v) } } verts.each { |v| pts.push v.position } if transform == true pts.each { |pt| pt.transform!(ent.transformation) } end pts end # Get all faces of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Array<Geom;;Point3d>>] An array of faces. Each face # represents an array of points. # @since 1.0.0 def get_faces(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end faces = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) faces.push *get_faces(e, true, true) next end next unless e.is_a?(Sketchup;;Face) face = [] e.vertices.each { |v| face.push v.position } faces.push face } if transform == true faces.each { |face| face.each { |pt| pt.transform!(ent.transformation) } } end faces end # Get vertices from all faces of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Geom;;Point3d>] An array of points. # @since 1.0.0 def get_vertices_from_faces(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end pts = [] verts = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) pts.push *get_vertices_from_faces(e, true, true) next end next unless e.is_a?(Sketchup;;Face) e.vertices.each { |v| verts.push(v) unless verts.include?(v) } } verts.each { |v| pts.push v.position } if transform == true pts.each { |pt| pt.transform!(ent.transformation) } end pts end # Get all construction points and lines of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Geom;;Point3d>] An array of points. # @since 1.0.0 def get_construction(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end pts = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) pts.push *get_construction(e, true, true) next end if e.is_a?(Sketchup;;ConstructionPoint) pts.push e.position elsif e.is_a?(Sketchup;;ConstructionLine) pts.push(e.start) unless e.start.nil? pts.push(e.end) unless e.end.nil? end } if transform == true pts.each { |pt| pt.transform!(ent.transformation) } end pts end end # module Group end # module MSPhysics
  • Trial Version

    5
    0 Votes
    5 Posts
    566 Views
    TIGT
    But for a low cost script decrypting an rbs to see how it is licensed hardly seems worth the effort. In contrast simply reading a plain rb is much easier to do and more likely to lead to a license breach. Encrypting data/licenses is never going to be 100% 'hacker-proof' - but neither is your front-door lock - but you'll have one and use it anyway - just to stop a casual intruder walking in and stealing your laptop - but a determined thief will know how to open most locks - or just enter another way...
  • Web dialog on a Mac

    69
    0 Votes
    69 Posts
    13k Views
    G
    This issue has been resolved. I am now substituting single quote ' for back tick ` and then back again. This allows us to see the single quote in the web dialog controls.
  • Exposing Ruby Code?

    4
    0 Votes
    4 Posts
    446 Views
    M
    @dan rathbun said: The SketchUp engine that performs normal tasks, is written in C/C++, and compiled. I was unaware of that, Dan, thanks for letting me know. Ah well, back to feebly trying to wrap my brain around Ruby
  • To create script I need to add GEM to Sketchup's Ruby

    4
    0 Votes
    4 Posts
    616 Views
    TIGT
    Yes I have also looked at 'packaging' other Ruby methods with mine to give extended functions in distributed scripts [I gave up!]. The real complexity is that as soon as you look to import one new moved over method, then you'll almost certainly find that it includes 'requires' for several other files, these files in turn require other files and so on. You'll end up with a massive tangle of files/subfolders 'requiring' other files ad nauseam, and one mistype/misplaced line of code breaks everything - makings untangling it all very very hard...
  • Guidelines for adding a method to existing classes?

    12
    0 Votes
    12 Posts
    1k Views
    danielbowringD
    @tt_su said: Note that extending Entity instances would not be allowed by EW because the instances are global to everyone using the SketchUp environment. But for other types such as Point3d, Vector3d, String etc that would work. Here delegators can be useful. require 'delegate' module DanielB class SampleFace < DelegateClass(Sketchup;;Face) def inner_loops return loops.find_all { |l| l != outer_loop } end end def self.demo face = Sketchup.active_model.selection.find { |e| e.is_a?(Sketchup;;Face) } return if face.nil? face = SampleFace.new(face) puts face.inner_loops end end
  • One-shot toolbar buttons?

    11
    0 Votes
    11 Posts
    832 Views
    tt_suT
    Oh, right - yes I noticed that there's a bug under OSX. Sorry, I mostly use PC so I'd forgotten. I think there's an issue for it, but I'll check again and bump it.
  • Statistics on plugin users

    21
    0 Votes
    21 Posts
    2k Views
    jiminy-billy-bobJ
    @garry k said: This probably should be moved to another thread. Probably

Advertisement