🏒 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Delete your scenes via the API - working?

    6
    0 Votes
    6 Posts
    160 Views
    R
    @chris fullmer said: Interesting. I had not found it in the API, rather in the blog post here: http://sketchupapi.blogspot.com/2008/11/whats-new-in-sketchup-7.html and the only hint it gives is this: Delete your scenes via the API my_page.erase So I assumed it was a page thing. Then when I looked for it in the API, it was not in the "page" class section. So I see it now, and I'll go give it a shot. Thanks Rick, Chris Yes, it does give that impression. I can see why it was confusing.
  • Request: Rset world Axes match GC Axse

    7
    0 Votes
    7 Posts
    396 Views
    L
    @xrok1 said: right click your component; select change axes; then triple click any point or even close to the component. this will not set the world axes to your component but it will set your component to the world axes. hope this helps? yes,this is wonderful, thank you.
  • Vector3d.samedirection? tolerance is not what is expected

    4
    0 Votes
    4 Posts
    195 Views
    thomthomT
    @tig said: For deleting coplanar edges I successfully use if e.faces[0].normal.dot(e.faces[1].normal) > 0.99999999 && e.faces[0].material==e.faces[1].material && e.faces[0].back_material==e.faces[1].back_material This avoids the problem of erasing edges that remove the face as the normals aren't quite == I've been using nearly the same: (after some testing I came down to: 0.9999999991) But the problem is that there seem to be a range of dot products of edges that can be removed and those that can't overlaps. http://forums.sketchucation.com/viewtopic.php?f=180&t=22920&start=0#p193613 I could set the precision to a safe value - but that'd leave edges that still could be deleted.
  • Cross linking two web dialogs

    10
    0 Votes
    10 Posts
    1k Views
    chrisglasierC
    Cross linked thanks to Jim! [image: a1B7_OneTwoAnimated.gif]
  • Method to identify what context the user is in?

    11
    0 Votes
    11 Posts
    332 Views
    L
    [quote="fizgig"] If the user does double-click into a group, the active context is that group and the local coordinate system associated with that group. yes,I want this too.I ask the same qus here http://forums.sketchucation.com/viewtopic.php?f=180&t=22915&p=193698#p193698
  • Detect if Scene is used in Animation?

    7
    0 Votes
    7 Posts
    186 Views
    Chris FullmerC
    Aha! there it is, thanks Rick! I had noticed the .label method. I had checked the .name method to see if it would return the name in praenthesis (like .label apprently does), but obviously found nothing. Thanks for pointing that method out. Not a bad suggestion for the .skx I think. Chris
  • Select face to deselect edges or faces -ruby ?

    3
    0 Votes
    3 Posts
    841 Views
    A
    Thank you Thomas for answering and providing that script...I'll give it a go :O)
  • Getting the material of a face not directly assigned...

    12
    0 Votes
    12 Posts
    340 Views
    TIGT
    Why not have a method that picks a face and returns its material. If it's nil and it's not in the model then the picked point could also return the 'container' - i.e. group or component and it's material - if it's not nil then that's the nil face's material too... Your 'pick-helper' can return two values ?
  • RE: date.rb error

    7
    0 Votes
    7 Posts
    268 Views
    C
    Cheers
  • RE: Zorro Ruby Overlap

    3
    0 Votes
    3 Posts
    412 Views
    C
    Did some digging and found out that the wco_zorrocut is the one with the Z icon. Zorro2 is access from tools menu and works with parallel projection.
  • Attempting to make a button for a toolbar

    4
    0 Votes
    4 Posts
    199 Views
    E
    Alright it's actually pretty simple. If anybody else needs the same thing here you go... ` toolbar = UI::Toolbar.new "TOOLBAR.NAME" cmd = UI::Command.new("TOOLBAR.ITEM.NAME") { ###copy everything from the def you want to use here... ###call it... DEF.NAME.call() } cmd.small_icon = "PATH.TO.ICON" cmd.large_icon = "PATH.TO.ICON" cmd.tooltip = "POPUP.TEXT" cmd.status_bar_text = "TEXT" cmd.menu_text = "TEXT" toolbar = toolbar.add_item cmd toolbar.show`
  • Follow me along a line ruby(new to rubys)

    5
    0 Votes
    5 Posts
    261 Views
    R
    oh thanks for all the responses guys, much appreciate it! i tried the one that Gaieus recommended at once and it worked like a charm. cheers
  • Notepad++ Ruby Syntax enhancement

    10
    0 Votes
    10 Posts
    3k Views
    M
    @thomthom said: Can a Python lexer work with NP++? I've no idea. Took a look. My lexer is a Decaf lexer, written in Python. Decaf (Java without the Jitters) is a beginners language I've designed and am working on, but not often enough. Decaf is quite like Python in most things, except suites. I actually have decided to implement suites: if condition no braces around this block of code # no braces, no begin/end Fortunately for your requirement, Decaf's lexer still looks for {} around statement blocks. Unfortunately, Ruby persuaded me to add trailing IF and UNLESS but they're not there yet, either. I could add those soon. Here's the language description. Before you go here, "lexical analysis" and "lexing" are Decaf-described as "breaking the language into WORDS" (not tokens). Parsing is picking out PHRASES (not expressions) and SENTENCES (aka statements). The code and doc is in various stages of being converted to Decaf-speak. # Decaf's EBNF grammar # grammar of the grammar; # 'x' the character 'x' # 'xxx' the character string 'xxx' (as a separate word) # x | y either x or y # [ x ] 0 or 1 x # x* 0 or more x # x+ 1 or more x # {} grouping, example; # "exp{',' exp}+" - "exp" followed by one or more "',' exp" # < xx > comment (documentation of the grammar) # full_name, nm ;;= # x 'full_name' is defined as 'x', 'nm' is short for 'full_name' # # xxx; definition continued, next line # # name ;;= # x # y 'name' is defined as 'x | y' # # xxx_operator, xx ;;= # < operators of type 'xxx' listed here > #---------------------- words ----------------------- constant_e, con_e ;;= 'E' = 2.71828182845904523536 constant_pi, con_pi ;;= 'PI' = 3.14159265358979323846 comment_eol_word, cmt_w ;;= COMMENT_EOL end_of_line_word, eol_w ;;= END_OF_LINE end_of_input_word, eoi_w ;;= END_OF_INPUT end_of_statement_word, eos_w ;;= END_OF_STATEMENT line_continuation_word, lcon_w ;;= LINE_CONTINUATION whitespace_word, white_w ;;= WHITESPACE constant_integer_word, con_i_w ;;= CONSTANT_INTEGER constant_decimal_word, con_d_w ;;= CONSTANT_DECIMAL lbrace_word, lbrace_w ;;= LBRACE lbracket_word, lbrkt_w ;;= LBRACKET lparen_word, lprn_w ;;= LPAREN malformed_number_word, m_num_w ;;= MALFORMED_NUMBER multiline_string_word, ml_str_w ;;= MULTILINE_STRING name_word, name_w ;;= NAME operator_word, op_w ;;= OPERATOR rbrace_word, rbrace_w ;;= RBRACE rbracket_word, rbrkt_w ;;= RBRACKET reserved_word_word, res_wrd_w ;;= RESERVED_WORD rparen_word, rprn_w ;;= RPAREN string_word, str_w ;;= STRING unclosed_multiline_string_word, unc_mls_w ;;= UNCLOSED_MULTILINE_STRING unclosed_string_word, unc_str_w ;;= UNCLOSED_STRING unknown_character_word, unk_chr_w ;;= UNKNOWN_CHARACTER #------------------- expressions -------------------- arithmetic_operator, arth_op_p ;;= '+' | '-' | '*' | '/' | '^' | '%' copula_operator, cop_op_p ;;= '=>' comparison_operator, cmp_op_p ;;= 'GT' | 'GE' | 'EQ' | 'LE' | 'LT' | 'NE' | 'IN' binary_logical_operator, log_op_p ;;= 'AND' | 'OR' unary_logical_operator, not_op_p ;;= 'NOT' other_operator, oth_op_p ;;= '.' | ',' | ';' expression, expr ;;= arithmetic_expression comparison_expression logical_expression parenthesized_expression list_expression range_expression subscript_expression function_call selection_expression arithmetic_expression, arth_exp ;;= operand arithmetic_operator operand '-' operand comparison_expression, cmp_exp ;;= operand comparison_operator operand logical_expression, log_exp ;;= operand binary_logical_operator operand unary_logical_operator operand 'TRUE' | 'FALSE' comparison_expression parenthesized_expression, paren_exp ;;= '(' expression ')' list_expression, lst_exp ;;= expression {',' expression}+ range_expression, rng_exp ;;= operand ';' [operand] ';' operand < operands must be integers > subscript_expression, sub_exp ;;= '[' range_expression{',' range_expression}* ']' function_call, func_exp ;;= parenthesized_expression function_name function_name, func_nm ;;= NAME < name of defined or imported function > selection_expression, sel_exp ;;= NAME{'.' NAME}+ operand, oprand ;;= NAME constant expression constant, cnstnt ;;= CONSTANT_INTEGER | CONSTANT_DECIMAL | STRING | MULTILINE_STRING #-------------------------- other phrases ---------------------------- address, addr_p ;;= PATHNAME < address on local machine > URL < address on any machine > capability_name, cp_nm_p ;;= NAME < of capability type > right_hand_side, rhs_p ;;= rhs_qualifiers [type_name] variable_name rhs_qualifiers, rhs_ql_p ;;= [ 'LOCAL' | 'GLOBAL' ] [ 'RW' | 'RO' ] [range_expression] return_types_list, rt_tps_p ;;= type_name{, type_name}* type_name, tp_nm_p ;;= base_type built_in_type defined_type base_type, bs_tp_p ;;= 'BIT' | 'BYTE' | 'CHAR' | 'DEC' | 'GROUP' |; 'INT' | 'NAMELIST' | 'TYPE' | 'SUB' built_in_type, bi_tp_p ;;= < see http://www.MartinRinehart.com/posters/decaf-object-library.html > defined_type, def_tp_p ;;= < types defined in page or imported from other pages > variable_name, vr_nm_p ;;= NAME < word, type==NAME, textValue contains name > condition, cond_p ;;= logical_expression list_name, ls_nm_p ;;= NAME < that identifies a list, array, NAMELIST or group > self_name_p, self_p ;;= 'ME' #--------------------- statements ----------------------- statement, smt ;;= declaration_statement action_statement declaration_statement, dec_smt ;;= var_declaration_statement include_statement type_declaration_statement sub_declaration_statement action_statement, act_smt ;;= expression_statement block_statement if_statement foreach_statement while_statement loop_statement break_statement return_statement var_declaration_statement, vr_dec_smt ;;= rhs_qualifiers type_name variable_name include_statement, incl_smt ;;= 'INCLUDE' address {',' address}* type_declaration_statement, tp_dec_smt ;;= { 'CLASS' | 'CAPABILITY' } NAME1; [ 'EXTENDS' NAME2 ]; ['CANDO' capability_name [, capability_name]* ]; [ MULTILINE_STRING ] < documentation >; action_statement sub_declaration_statement, sb_dec_smt ;;= 'SUB' '(' [ list_expression ] ')' NAME '(' [ return_types_list ] ')'; action_statement expression_statement, exp_smt ;;= expression [ copula_operator right_hand_side{',' right_hand_side}* ] block_statement, blk_smt ;;= INDENT; [ MULTILINE_STRING ] < documentation >; statement*; UNINDENT if_statement, if_smt ;;= 'IF' condition 'THEN' action_statement [ 'ELSE' action_statement ] foreach_statement, for_smt ;;= 'FOR' 'EACH' variable_name IN list_name DO action_statement while_statement, whl_smt ;;= 'WHILE' condition 'DO' action_statement loop_statement, loop_smt ;;= 'LOOP' break_statement, brk_smt ;;= 'BREAK' return_statement, ret_smt ;;= 'RETURN' expression < expression may be expression_list > #---------------------- program ----------------------- program, prgrm ;;= [ MULTILINE_STRING ] < documentation >; statement*; END_OF_INPUT # end of decaf.bnf This is drifting off-topic. Unless someone (anyone?) else is interested, maybe we could do this via Email. MartinRinehart at gmail dot com.
  • How to add entities inside a group?

    6
    0 Votes
    6 Posts
    183 Views
    thomthomT
    Go ahead!
  • Script returns no errors but has no effect in sketchup

    9
    0 Votes
    9 Posts
    222 Views
    J
    @eric_erb said: I'm sure there is a big hint in your reply to my post but I just don't know enough to discern what you're telling me. No, I did not mean to say that. I replied to the wrong message - I should have tried more to answer the question.
  • Problem with Group name in SU 7.1

    6
    0 Votes
    6 Posts
    328 Views
    thomthomT
    definition.name is not the same as instance.name or group.name As you see when you select a ComponentInstance, in the Entity Info you see Name: and Definition Name: Same goes for the group, when you edit the Name: in the Entity Info you edit the ComponentInstance.name or Group.name - not the definition's name.
  • Trouble with .position_material method

    36
    0 Votes
    36 Posts
    5k Views
    F
    Thanks for carrying this on ThomThom. I think you're on to something here and I'm experimenting further. One of the complicating factors for me is that the face I want to apply texture to is often in a group which is in turn in a group (the wall file I posted earlier was a simplified version of what I'm doing). I notice that when I run the UVhelper script modified per your homogenous tip earlier, I get better UV values. I also notice that the real-world vertex positions are in global coordinates (returned from the face.outer_loop.vertices.each method). Conversely, when applying a texture, you need to use coordinates that are based on the local coordinate system that the face belongs to. I'm going to play around further. I've attached my modified uvhelper script. If what I said above is confirmed about local and global coordinates then I'll modify the uvhelper script further to report in local coordinates. uvhelper.rb
  • Removal of unwanted internal polys (lines)?

    5
    0 Votes
    5 Posts
    416 Views
    pilouP
    Problem is that the internal "square faces" are not coplanar! So ruby "remove inner face" cant work So you must ask a request in the Ruby section with a title like [REQ]Select internal lines don't believe that plug yet exist
  • Am I going nuts? [found, thanks]

    17
    0 Votes
    17 Posts
    1k Views
    E
    @ecuadorian said: Hi, Tomasz, thank you for your great work with the KT exporter. At the end I decided "Bring My View Back" was the quickest and most precise way to add a background. [...] I'll post a video tutorial soon for anyone interested. A bit late, but here it is: http://www.forums.sketchucation.com/viewtopic.php?f=18&t=22786
  • Production ruby for watercolor images

    6
    0 Votes
    6 Posts
    372 Views
    T
    Is this something that others would like? I have very limited ruby programing experience but I could look into it. thanks! s

Advertisement