Show messages: All
1
2-9
From: Michael Gibson
Hi Nemoz,
re:
> Could you please clarify the correct and reliable way to retrieve the currently selected object(s)
> (including faces of solids and standalone surfaces) from within a custom HTML
> command's JavaScript?
It's moi.geometryDatabase.getSelectedObjects().
If that is not working for your script, please post the script and .3DM file, or send it to me at
moi@moi3d.com so I can try to reproduce the problem over here.
> Retrieving dimensions and properties of 3D solids: Once a solid is selected, what are the appropriate API
> methods to obtain its bounding box, volume, surface area, or other geometric properties necessary for CAM
> calculations?
For getting a bounding box:
var bbox = obj.getBoundingBox( true /* Use high accuracy bounds */ );
Bounding box has these properties:
bbox.min
bbox.max
bbox.center
bbox.xLength
bbox.yLength
bbox.zLength
bbox.diagonalLength
Calculating surface area:
code:
function GetObjectArea( objects )
{
moi.geometryDatabase.deselectAll();
objects.setProperty( 'selected', true );
var area = moi.ui.propertiesPanel.calcSurfaceArea();
moi.geometryDatabase.deselectAll();
return area;
}
Calculating volume:
code:
function GetObjectVolume( objects )
{
moi.geometryDatabase.deselectAll();
objects.setProperty( 'selected', true );
var volume = moi.ui.propertiesPanel.calcSolidVolume();
moi.geometryDatabase.deselectAll();
return volume;
}
- Michael
From: nemoz
So ... a lot of coding and finally I'm very close to the end... Attached you can find the manual, 2 axes operations already tested and even lathe operations and 3 axes operations, now I will start the testing for 4 axes operations... 5 axes operations can't be tested because I don't have yet a 5 axes machine, I can only import in a gcode 5 axes simulator . As soon as I will be sure that everything is done I will release it.
Attachments:
MOI3DCAM_manual_v0.1.pdf
From: blowlamp
It looks like an epic piece of work.
I'm looking forward to testing this with my PlanetCNC controlled lathe.
Thanks for the all the effort you must have put into it.
Martin.
From: nemoz
are you using windows based pc?
From: blowlamp
Yes. I'm staying with Windows 10 for as long as posible. ;-)
Martin.
From: nemoz
I don't want to know which cam you are using actually, but can you spot a postprocessor in that list that fit your machine? I used this type of postprocessors because this is the biggest postprocessor library downloadable for free.
https://mecsoft.com/downloads/download-posts/
We can even make one from zero in case... I'm finishing the GUI to create post processors...
From: blowlamp
I have a Mach 3 controlled milling machine as well as a PlanetCNC lathe, both of these use a very similar g-code structure which is mostly interchangeable. The PlanetCNC controller can use g-code written for a LinuxCNC machine, so there is nothing unusual to allow for there.
Martin.
From: AlexPolo
Wow amazing a long time RHINO CAM paired with a SHOPBOT PRS5 with 5th axis on windows 10 been solid for nearly 20 years,
Look forward to the release and costings?
Show messages: All
1
2-9