Please post here anything else (not relating to Maxwell technical matters)
User avatar
By deadalvs
#223394
hey there...

i need to do some g-code programming directly out of maya to do some 3-axis cnc drilling (topological studies)

has anyone some hints what could be important that is mostly underestimated?

see http://www.glform.com/ for reference how examples might look.

* * *

i'll «mill» with some simple algorithms based on greyscale maps (marble, ...) to simulate handcrafted surface qualities.
Last edited by deadalvs on Thu May 03, 2007 7:46 pm, edited 1 time in total.
By seco7
#223403
I'm not aware of any G-code generators out of Maya, but then again I don't use Maya. You can output your model into a G-code program (Mastercam, surfCam, etc). Most have a wide range of import options. If it is 2.5 axis (X,Y, and Z without rotation on the Z) and you do not have too many holes, you can code it by hand. It really is pretty easy, but every machine tool is a bit different so you would need to know something about that side of the equation.

I'm not sure what this sentence means: "has anyone some hits what could be important that is mostly underestimated?"

Which examples on your site are you refering too?
User avatar
By deadalvs
#223409
seco7 wrote: I'm not sure what this sentence means: "has anyone some hits what could be important that is mostly underestimated?"
ah sorry, that was a type error... i meant HINTS... (tips)
--> has anyone some HINTS about stuff that can cause problems...

* * *

yes, i'll have 2.5 d, «just» the x, y and the z is the depth without rotation.

* * *

the images i meant are under «products»: for example: «visionaire n.34», «protetch skylight» and similar images.

* * *

other images with models done here with this machine:

Image

Image

Image

* * *

cause that darn machine killed a model of mine with fucked up code that originally came from surfcam. this made me a «little» and thus i'm thinking about writing my own code.

by the way. as mentioned, i want to build some algoriths that mimic manual/handcrafted surface treatment. let's say i use a marble texture, then i'd trace contours in that image (pixel color sampling), use circling movements, whatever... could You give me some ideas how to approach such a task?
User avatar
By deadalvs
#223411
what i'd like to achieve:

Image
Image
Image

and similar patterns, certainly a little randomized.

the material used for milling will be white «Corian»
http://www.corian.com/
By seco7
#223427
There isn't any reason you could not do what you are showing here in G-code. I made chess boards and pieces (lathe) for friends last X-mas that are not too far from what you are talking about. I personnally use Mastercam, not that it is the greatest, but they do have an Art version that I believe is (relatively) reasonably priced.

http://www.mastercam.com

Again, any coding is going to be very specific to the tooling used, materials cut, fixturing and the machine tool, etc. I'm sure SurfCam is just as capable as any other (even more so probably), but machine operation of this type can be a bit tricky. If you do not have this type of equipent and experience, have you considered outsourcing a job like these? Not that every job shop would be able to do what you need, but it shouldn't be difficult to find one. The obvious advantage is that you send your artwork (and possibly the material) and get back the finished piece. Let them worry about which size bull nose end mill to use and whether to climb cut the nurbs.
User avatar
By deadalvs
#223433
hehe, the actual problem or «interesting part» IS the programming of the algorithm... and not a special produced object. that's my task in this course...

i must produce that code and be able to reproduce multiple surfaces with different values from within that mel-script... :roll:

* * *

well, i don't care much about the tool tip, we only have a few there that i can use, a few round ones and a few flat ones. i'll just implement the distance tween the curves as a sort of diameter... 8)
By JDHill
#223445
Shouldn't be too terribly difficult...here's some code grabbed from another project:
Code: Select all
    Public Const DefaultRapidWord As String = "G00"
    Public Const DefaultFeedWord As String = "G01"
    Public Const DefaultSpindleWord As String = "M03"

    Public Const DefaultStartCodes As String = "%" & vbCrLf & _
    ":1111(auto-generated)" & vbCrLf & _
    "G00G17G20G28G40G80G91Z0" & vbCrLf & _
    "G90" & vbCrLf & _
    "G52X0Y0Z0M5" & vbCrLf & _
    "G08P1" & vbCrLf

    Public Const DefaultToolChangeCodes As String = "(CoreBoxBit)" & vbCrLf & _
    "G28G91Z0M05" & vbCrLf & _
    "G90T2001M06" & vbCrLf & _
    "T102" & vbCrLf

    Public Const DefaultEndCodes As String = "G28G91X0Z0" & vbCrLf & _
    "G90" & vbCrLf & _
    "G52X0Y0Z0M5" & vbCrLf & _
    "G08P0" & vbCrLf & _
    "M30" & vbCrLf & _
    "%"
Code: Select all
Public Function DoLeadIn(ByVal RapidWord As String, _
                             ByVal XStart As String, _
                             ByVal YStart As String, _
                             ByVal HNumber As String, _
                             ByVal SpindleWord As String, _
                             ByVal RoughSpeed As String, _
                             ByVal SafetyPlane As String, _
                             ByVal ZRapidFeedDepth As String) As String

        Return RapidWord & "G17G55" & XStart & YStart & SpindleWord & "S" & RoughSpeed & vbCrLf & _
               "G43" & HNumber & "Z" & SafetyPlane & vbCrLf & _
               ZRapidFeedDepth & vbCrLf

    End Function
Code: Select all
    Public Function DoLeadOut(ByVal RapidWord As String, _
                              ByVal SafetyPlane As String) As String

        Return vbCrLf & RapidWord & SafetyPlane & vbCrLf

    End Function
Obviously VB, (never used MEL before), mostly I just posted it for the g-code words. Basically, your script needs to slice the 3D surface along one axis, then traverse the line querying Maya for the surface-XYZ at each point...so a basic pseudo-program would:

> output start codes
> output first toolchange (if applicable)
> rapid to first lead-in
> perform lead-in
> walk surface, outputting [feed-word (i.e. 'G01')]XnYnZn for each point
> perform lead-out
> Z-up to safety plane
> rapid to next row
> repeat lead-in, traverse, lead-out, safety plane, next row...for each row
> output end codes

Sounds like a fun school project...good luck. :)

JD
User avatar
By deadalvs
#223448
cool ... :)

i got a piece of sample code, totally easy it seems:

just in this form:
%
S1592
G90 G17 G40
M3
G0 X0.018 Y7.856 F99
G0 Z1.024
G0 Z-0.039
G1 X0.018 Y7.856 Z-0.137 F6
X0.347 Y7.759 Z-0.232 F11
X0.687 Y7.659 Z-0.322
X1.04 Y7.555 Z-0.407
X1.406 Y7.448 Z-0.488
X1.788 Y7.335 Z-0.565
X2.188 Y7.218 Z-0.637
X2.621 Y7.09 Z-0.707
X3.066 Y6.959 Z-0.771
X3.528 Y6.823 Z-0.83
X4.009 Y6.682 Z-0.883
X4.512 Y6.534 Z-0.931
X7.062 Y5.784 Z-0.721
X7.189 Y5.747 Z-0.653
G0 Z1.024
M5
M30
M2
%
hell yeah !

* * *

yes, this is a fun school project, indeed... the problem is only that it's just additional to my normal design diploma which itself is alreadyaa fulltime jon... well........ it's gonna be a hard time the next five weeks !!
User avatar
By deadalvs
#223451
guys, try this ... it's a start ...

http://www.jumpgates.com/matthias/MEL/d ... ode_V3.zip
http://www.jumpgates.com/matthias/MEL/diploma_milling/

maybe with this image:
Image

* * *

BE SURE TO:
- use Z-axis up
- use millimeters as units
- import any image to the node "file1" (best map it to the color channel of the lambert material)


then just place the code in the script editor and hit enter. a self-explanatory window should appear. (be sure to enlarge the window enough so You miss nothing in it !)

check out the animation of the drill !

the script scans thru the image and gives out a greyscale heightmap which is at the moment only mapped to the z-axis of the drill height. the paths themselves will become more complex of course...

have fun !

a cool start i think !
User avatar
By deadalvs
#223452
also important before hitting the create code button:

set the animation range enough large (to xRes x yRes)
else, the keyframing gets garbled cos the animation starts again at 1...
User avatar
By michaelplogue
#223455
Whoa! I got to staring at that image of yours deadalves....... I'm dizzy now..........

:shock: :wink:
User avatar
By deadalvs
#223928
has anyone a tip for a freeware path-vizualization software?

i just need to see the paths if they're correctly sized before milling...

ok thanks for explaining. actually I do copy the T[…]

Sketchup 2026 Released

Fernando wrote: " Now that Maxwell for Cinema[…]

Hello Gaspare, I could test the plugin on Rhino 8[…]

Hello Blanchett, I could reproduce the problem he[…]