Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - billo

Pages: [1] 2
CamBam help (General usage) / Re: Unusual 3D waterline toolpath
« on: May 25, 2023, 22:49:41 pm »
This forum has been a wonderful resource for me. Thanks to all who participate.

p.s. The Camotics "arc warnings" are because I had set my PP number format to 0.0# (which is plenty precise for us and makes the gcode easier to read).  I added another digit with 0.0## and Camotics is now happy.


CamBam help (General usage) / Re: Unusual 3D waterline toolpath
« on: May 25, 2023, 16:55:41 pm »
Thank you very much Dave.

Your effort made me realize the problem must be in my Standard style.

There I found I had a non-default value for "Arc Fit Tolerance". Setting that back to the default of 0 fixed all of my problems.

(Although still working on the minor warnings in Camotics.)

Pics show the low-triangle and high-triangle simulations.


CamBam help (General usage) / Re: Unusual 3D waterline toolpath
« on: May 24, 2023, 22:20:43 pm »
To detach from the style: I copied from the Style to clipboard, then "paste format" onto my toolpath. That seemed to capture most of the appropriate properties from the style to the document.

I exported a new .3ds from Rhino with minimal triangles. This version has only 60 triangles. That is now in the .cb.

Waterline still produces a funky toolpath.

CamBam help (General usage) / Re: Unusual 3D waterline toolpath
« on: May 24, 2023, 21:25:47 pm »
My toolpaths make extensive use of styles. I've searched and I do not see a way to detach a toolpath from it's style and bring all of those style properties forward into the document.

That would seem to be the only way to make my .cb useful. Or, would it be useful anyway?


CamBam help (General usage) / Re: Unusual 3D waterline toolpath
« on: May 24, 2023, 18:24:22 pm »
I tried various boundary shapes (detected edge with offsets) as you suggested. I didn't see much difference. The paths are still not concentric in seemingly random ways.

I thought my rough cut was good. However, even though the paths are concentric, they are shifted towards one side of the symmetric 3D object.

I applied a horizontal-method finish pass to the rough (which has a 2mm clearance), and the rough shows through the finish.

Given our different results it seems like it must be due to the characteristics of my particular .stl?

Attached are the nice-looking rough toolpath (but notice how the start/end points are not symmetric with the slope around the island), and the Camotic of rough and finish (with the rough peeking through).

They are all 3D objects and they are all different.

I'm finding that 3DS format does what I want, but I am not getting the resolution I want from Rhino. I have to study the export options to see if I can get a better export.


CamBam help (General usage) / Unusual 3D waterline toolpath
« on: May 23, 2023, 21:03:31 pm »
I'm trying to create a waterline toolpath for a series of parts I have. I'm testing with a simple disk shape with sides of varying steepness. I think I have the rough path working (using "Region Fill Style: Outside Offsets" instead of the default).

It seems like this should be pretty simple, but I can't get a finish toolpath that works. Here is what I have.

Attached is a 3D view of part, and the top and side views of the toolpath.

I would expect for a waterline to see "concentric" ovals, but instead I get crossing (or connecting) paths.

Is there some obvious option I'm missing?


Update: I'm trying 3D Studio (.3ds) format now. Rhino exports OK (but seems lo-res). CamBam loads the file as separate objects.

I'm still experimenting, but so far, the toolpaths don't look good.


I am exporting multiple individual objects from Rhino to an .stl file. When I open it in CamBam, the objects are not individually selectable. That is all Rhino objects are combined into one object in the .stl.

I typically have up to 50 such objects that need to be cut on multiple sheets of stock, so it is important that I create toolpaths accordingly.

I have read that .stl does not support multiple objects in a single file.

I see a number of different possibilities:

* Try to break up the objects from within CamBam.
* Export to 50 individual .stl files from Rhino, then write a script to import them all into a single CamBam document.
* Export to .3mf, which is apparently an stl-like format that support multiple objects. Then figure out how to import this into CamBam.

Can anyone suggest additional options?

tia, Bill

Scripts and Plugin Help / Re: Get Directory of opened file
« on: February 05, 2023, 16:03:40 pm »
After hours of object browsing and trying dozens of alternatives, here is the best I could find.

It requires one more user interaction than I would like, but it's acceptable.

Code: [Select]
from CamBam.CAM import *
from CamBam.UI import CamBamUI

CamBamUI.MainUI.OpenFile() # async
doc.Save() # Does two things: 1) gets the folder of the .dxf 2) awaits async OpenFile

print doc.Filename, doc.Name # after Save this has the correct full Path but the old Name
view = CamBamUI.MainUI.ActiveView
newdoc = view.CADFile
print newdoc.Filename, newdoc.Name # the newdoc has Path of None, but the correct Name

Scripts and Plugin Help / Re: Get Directory of opened file
« on: January 29, 2023, 21:06:37 pm »
Thanks Dave. I thought that was perfect, but it turns out that if you open a .dfx, as opposed to a .cb, CADFile.Filename is "none".

If I then look in the .config file, the DefaultDrawingDirector IS updated to the directory of the .dfx I opened.

Also, if I then do a doc.Save, CB prompts me to save the new .cb file (which contains the .dfx data) to the directory from which the .dfx was opened. At that point the doc.Filename does contain the full path I need. However, CB prompts me to confirm the doc.Save and I'm trying to avoid showing ANY prompt dialogs in my script. If I could do a doc.Save and somehow force "no prompt" that would work also, but I don't see that option.

It seems like the info I need is available and being used internally by CB, but I can't seem to get at it.

Scripts and Plugin Help / Re: How to loop over all styles in script
« on: January 28, 2023, 17:22:30 pm »
I've spent a few hours following various tips and clues with no luck.

I've resorted to hardcoding style names into my script. Slightly unsettling, but works fine.

Scripts and Plugin Help / Get Directory of opened file
« on: January 28, 2023, 17:20:07 pm »
In my process I want to open a .dfx file and then automatically produce gcode into the Directory than contains that .dfx. Everything works nicely, except that I can't seem to find the name of the Directory from which the .dfx was loaded.

I see that it is actually stored in "CamBam 1.0.config" in "<DefaultDrawingDirectory>C:\MyLocalFiles\CamBamTemp</DefaultDrawingDirectory>" (I suppose I could open the .config and scan directly, but ugh).

I've tried the enticing CamBamConfig.DefaultDrawingDirectory, but that returns a "getset_descriptor". Is there a way to evaluate that to the actual property value?

Or, is there another way to get what I need?

tia, Bill

Thanks to the hint from Dragonfly I think I have it working without ANY prompts.

The only real change is to GenerateGcode on Machining, not on individual Parts.

Code: [Select]
from CamBam.CAM import *
from CamBam.UI import CamBamUI

import System.IO

folder = "C:\MyLocalFiles\CamBamTemp"
folderPieces = "{}\{}".format(folder, "Pieces") # create a subfolder for some Parts

view = CamBamUI.MainUI.ActiveView
doc = view.CADFile

def Main():
    # create output folders if they don't yet exist
    if (not System.IO.Directory.Exists(folder)): System.IO.Directory.CreateDirectory(folder)
    if (not System.IO.Directory.Exists(folderPieces)): System.IO.Directory.CreateDirectory(folderPieces)

    # set OutFile for all parts (but not in MachinIng)
    for part in doc.Parts:
        outfileFolder = folder
        if (part.Name.startswith("Piece")): outfileFolder = folderPieces
        outfile = "{0}\{1}.nc".format(outfileFolder, part.Name)
        System.IO.File.Delete(outfile) # avoid the "overwrite" confirmation prompt
        part.OutFile = outfile
    CAMUtils.GenerateGCodeOutput(view) # generate gcode on Machining, not on individual Parts
def wait():
    while view.CurrentEditMode is not None: app.Sleep(1)

Update: I believe you also have to save to a .cb file with "doc.Save(filename)" sometime before calling GenerateGcode to trigger some magic file naming.

I think I'm making a little progress. CAMPart has a field called OutFile that seems to have some effect, sometimes.

After setting this property I'm still being prompted for a filename, and the proposed filename is not what is in the OutFile property.

Here is my latest attempt:

Code: [Select]
from CamBam.CAM import *
from CamBam.UI import CamBamUI

view = CamBamUI.MainUI.ActiveView
doc = view.CADFile

folder = "C:\\CamBamTemp"

for part in doc.Parts:
    part.OutFile = "{0}\\{1}.nc".format(folder, part.Name)
    print part.OutFile
    #view.DrawingTree.ReloadTree() # doesn't fix
    CAMUtils.GenerateGCodeOutput(view, part, None) # how to avoid prompt here
    while view.CurrentEditMode is not None: app.Sleep(1) #wait

Actually, the more I test, it appears that the OutFile field does nothing. Even if you use the CamBam UI, click on the three-dot button, and enter a filename, the interactive "Produce gcode" command seems to ignore it.

If anyone uses "Out File", even in the interactive UI, could you tell us what it does?


Pages: [1] 2