Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

bryan314

Verified Members
  • Posts

    706
  • Joined

  • Last visited

Everything posted by bryan314

  1. quote: PDG? Bryan? Ya got me. I've been hoping ksoufi would figure out how to post an ascii nci file without using nci_manager. That's something I could really use myself. There's a nci_to_bnci in m_nc.h. Seem to me there should be a bnci to ascii nci function but I can't find it. PDG? Bryan
  2. Ok so I was a little bored today and needed a little break this afternoon. (You know you're in trouble when a sentance starts out that way. ) So I hacked together a chook that should toggle translucent. A zip file contain v8 and v9 chooks can be downloaded here: link to translucent chook I can't stress enough save your work first before running this chook. It really needs more testing. I've tested in v8 and v9 with a simple ruled surf. Also, I had to poke around into the more vague parts of the development kit to find the switches and I'm not sure how well they take to being poked. Bryan
  3. Hi everybody, It seems the previous version of my edit arcs chook has a small bug. If for example, you had an arc assigned to a contour toolpath and edited the arc with the chook the toolpath wouldn't regen. I've uploaded a temporary file containing a new fixed version of my edit arcs chook. Now after editing an arc assigned to a toolpath, the toolpath should be marked as needing regenerated and should regenerate properly. Also, as a bonus the zip file contains a testing copy of the editarcs chook for mastercam 9. Bryan
  4. hey ksoufi, If you figure this out will you let me know? It was the next area I was looking into before they pulled me off chook programming and put me on another project. The only help I have is try looking at init_tp_ent() in the m_assoc.h header. That might be the answer. Bryan ps. Did you ever get any answers on groups?
  5. The information can be found in chapter 11 of the develpement kit doc files(11db.doc). Also look in the *.h files themselves. Some functions are in the h files but haven't been updated into the documentation. Bryan
  6. Let's see, under list_grp_add_empty and list_grp_add_ents the 'type' (short type) is the type of group to create. 0=geometry - normal group for adding entities - ie lines, points, and arcs. 1=operations - groups seen in the operation manager - adding toolpaths 2=SystemGroup 3=SystemResult - these last two I assume are for creating the groups 'Group' and 'Result' like when to xform-tranlate-copy entites. they're stuck in Group and Result groups. If you're trying to add geometry like lines and arcs to a group that might be part of your trouble. Your using 1 (operation group) code: list_grp_add_empty ("group1",TRUE,1,&succf); Another problem is you're calling TRUE in your second variable. This sets the group to hidden. That also might be why it isnt showing up in the group list. Bryan
  7. Trees pretty. Chooks hard. First - Install the chook development kit from your mastercam cd. It contains directions on what you need (like microsoft visual c++) and how to set them up. Second - After that bang you head against a cement wall a couple hundred times until a chook falls out. Oops. Sorry, that's just what chook writing it feels like. Actually if you have any specific question after setting the development kit up post them to the forum. The people here are extremely friendly and will try to help with any specific questions you have. Bryan
  8. The squash chook was integrated into version 9. From main menu: Xform->Squash Bryan
  9. ksoufi, I think you might be having the same problem I'm having. In chooks you use the functions in m_db.h to create, delete, and add entities to groups. list_grp_add_empty list_grp_add_ents list_grp_append_ents list_grp_remove_ents They all take a 'name' variable. But unless you created the group how do you know the 'name'? right? For the life of me I can't find a function to get a list of current group names. I think this is the same problem you're having. right? Maybe Product Developement Guy or one of the other developers could help. I know the 'op_common' structure in 'm_avars.h' refer to a group idn number but I can't find how use the group number to get the group name. Bryan
  10. You're welcome. Have a nice weekend too. I plan on sleeping in. As much as nine month old will let me. (Which is none ) Bryan
  11. It's not a function. Its a variable. Look in chapter five of the docs 05avars.doc for the definition of assoc_setup struct. for example to set the stock size you could do this: job_setup.x = 100; job_setup.y = 50; job_setup.z = 10; or the variable job_setup.n_vws tells you how many named views are in teh vws variable for job_setup. Good luck on your programming Bryan
  12. Here's a slight modification of Bullines' code. It's not too pretty but compiles and runs fine on my machine. It prints the name level or error to mastercams prompt areas. See if this works any better. Bryan code: boolean succ; short num_level = 1; char Name_level[600]; succ = get_levname(num_level,599,Name_level); if (succ == TRUE){ cleartextall(); mprintf("Successn"); mprintf("levelname:%sn",Name_level); wait_for_space(); } else { cleartextall(); mprintf("Something went wrongn"); wait_for_space(); }
  13. quote: I'll update our C-Hooks list with your products once they're updated to V9. Thanks. I'll post an announcement when I finally get them converted. Bryan
  14. I'll add my 'me too' for a beta tester forum. There's been several times I wanted to discuss some new feature but knew 'beta talk' was a no no. Bryan
  15. quote: How are the one's coming for V9? Or are you going to wait for V9.1? My chook development is going to be on hold for a short while. I'm in the middle a major database assignment at work (along with toolpathing) and it's taking up all my time. I'm hoping for a chunk of free time in one of the next few weekends to work on converting programs over to version 9. Last month it was all that end of the year holiday crap. Last weekend my wife and son had a bad case of the flu. Current plans are (As time allows): 1) Minor update to the current package. Before everything hit the fan I was able to finish a new chook. The gentleman that requested it has been nice enough to allow me to add it to my zip package. 2) Convert my current chooks over to version 9. By the way several people have reported the current chooks work fine in v9. The few chooks I've tested confirm this. 3) Work on new chooks: [*]There were a couple of areas I wanted to play with. Hopefully resulting in a few new chooks. [*]I have an internal chook I wanted to release. I need to rewrite it (the code is quite messy) and strip out the company specific code. [*]Also I'm always open to requests. Of course if someone wanted to 'sponsor' me. I could take a few days off work and get those converted over to version 9. Bryan
  16. It can be found at my website: http://www.ivanxxxx.com/mastercam.html or the current zip file is: http://www.ivanxxxx.com/chooks20021215.zip Bryan
  17. Lets see. Moldplus - rules. I'm in awe of this program. Setdir - Set as my start-up chook like Aaron. It needs a 'most recent used' list, though. Say the last 10 directories. Squash - chook in v8, integrated into mc in v9. Plus a few others. Bryan
  18. lol I have to agree with the others. Your english is better than most of my co-workers. (Hi Kevin) bryan [ 01-07-2003, 09:50 AM: Message edited by: bryan314 ]
  19. plasttav, AAAAAAAAAAAAAAAAAAAAAaRGH! Bryan b - r - y - a - n Just because it's spelled different than just about every brian in the world ... Just kidding. Thanks for the plug. Bryan
  20. MCHulk, You're welcome. Glad I could help. Bryan [ 12-27-2002, 07:58 AM: Message edited by: bryan314 ]
  21. MCHulk, Yep have one more; The chook is probably exiting before the call back can be called. Say that ten times fast. The following is modification of the dummy yourfile.c in the sdk. I added the include for m_gragh.h for the draw_3d_point but you probably alread have that. Added the callback with the TRUE. The clear text and wait for functions are only there to keep the chook 'active'. Compile, run, and repaint. You should now see a yellow point in the center of the screen. Hitting enter or clicking the screen will return the waitforspace function and exit the chook. Repaint again and the dot disapears. Bryan code: /* yourfile.c */ #include <stdlib.h> #include <stdio.h> #include "m_vars.h" #include "m_ncvars.h" #include "m_menu.h" #include "m_io.h" #include "m_dbm.h" #include "m_init.h" #include "m_graph.h" // C-Hook header: graphics functions extern boolean CH_ENTRY ch_repaint_on=TRUE; extern void CH_ENTRY ch_repaint_function(void) { p_3d pointToDraw; pointToDraw[0]=pointToDraw[1]=pointToDraw[2]= 0.0; draw_3d_point(pointToDraw, YELLOW); } /* replace this with your function */ void your_function(void) { cleartextall(); wait_for_space(); }/* end your function */ /************************************************/ /* do not delete m_main() */ /* M_MAIN FUNCTION */ /************************************************/ void CH_ENTRY m_main (long *ptrs) { if (open_app (ptrs)) if (product_level_1_or_design_enabled()) { /* put your function here */ your_function(); } close_app (ptrs); } /************************************************/ /* do not delete m_main() */ /* END M_MAIN FUNCTION */ /************************************************/
  22. MCHulk, try setting extern boolean CH_ENTRY ch_repaint_on=FALSE; to extern boolean CH_ENTRY ch_repaint_on=TRUE; I think the FALSE maybe a typo. Or it's iniatialized in the off position, so to speak, and you turn in on (TRUE) OR off (FALSE) in your program as needed. I hope that works. Bryan
  23. ROFL - rolling on the floor laughing bryan
  24. Just tried edit arcs on v9.1 beta 3. Seems to work on there also. cool. Bryan
  25. Kathy, While the chooks are compiled with the version 8 development kit I believe people have reported no problems using them in v9. This does surprise me a bit but it probably just means mastercam didn't really do too much changing 'under the hood' from 8 to 9. I did a quick test with edit arcs here at work on our version 9. Didn't seem to have problem. I'm hopping to have chook versions compiled with the v9 development kit here in the near future. Bryan

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...