Toolkit for vismach model
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4003
- Thank you received: 1730
06 Dec 2022 13:35 #258697
by Aciera
Replied by Aciera on topic Toolkit for vismach model
I haven't had much luck working with exported stl groups. My workflow is to create the STLs from individual parts in the CAD with the origin in the center of the joint where the next part attaches but I presume you don't have a proper CAD model of the machine assembly other than as an STL?
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- cakeslob
- Offline
- Platinum Member
Less
More
- Posts: 799
- Thank you received: 231
07 Dec 2022 00:20 #258770
by cakeslob
Replied by cakeslob on topic Toolkit for vismach model
For anyone interested, the machine simulator in mastercam appears to operate in a similar manor to vismach. By similar I mean they are both machine simulators that use stl files, and mastercam exports those stl parameters into an xml file. many places provide these machine models as well. the mastercam sim is also used to align all the joints and set the limits
pocketnc.com/pages/mastercam-information
the first link doesnt work, but this one has the files, its" v1 machine simulation"
cdn.shopify.com/s/files/1/0077/5477/6623...ineSim9-1-16.zip?992
this has all the stl files for the pocketnc model and the xml file for assembling it and the constraints
this is what the xml file looks like. from my narrow understanding, this look like the numbers that would be used in vismach
pocketnc.com/pages/mastercam-information
the first link doesnt work, but this one has the files, its" v1 machine simulation"
cdn.shopify.com/s/files/1/0077/5477/6623...ineSim9-1-16.zip?992
this has all the stl files for the pocketnc model and the xml file for assembling it and the constraints
this is what the xml file looks like. from my narrow understanding, this look like the numbers that would be used in vismach
Warning: Spoiler!
<?xml version="1.0" encoding="UTF-8" ?>
<machine_definition>
<machine_data name="Unnamed" version="1.8" units="inch">
<view_transform initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000" />
</machine_data>
<geometry name="BALL_SCREWS" geo="base ball screws.stl" clrr="0.50196081" clrg="0.50196081" clrb="0.50196081" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="BASE" geo="base.stl" clrr="0.00000000" clrg="0.50196081" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="EMBLEM" geo="emblem on base.stl" clrr="1.00000000" clrg="1.00000000" clrb="1.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<axis id="X" type="translation" x="1.00000000" y="0.00000000" z="0.00000000" minvalue="-2.175000" maxvalue="2.520000" valuetype="cont" initial_value="0.000000">
<geometry name="BALLSCREW" geo="z axis ball screw mounted on x.stl" clrr="0.50196081" clrg="0.50196081" clrb="0.50196081" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<axis id="Z" type="translation" x="0.00000000" y="0.00000000" z="1.00000000" minvalue="3.062953" maxvalue="6.262953" valuetype="cont" initial_value="3.062953">
<geometry name="'CAM'" geo="cam on spindle.stl" clrr="1.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="'MASTER'" geo="mastercam on spindle.stl" clrr="0.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="HOLDER-SPINDLE-NOSE" geo="holder_spindle nose.stl" clrr="0.50196081" clrg="0.50196081" clrb="0.50196081" alpha="0.0" reflectivity="0.8" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="SPINDLE" geo="spindle-motor.stl" clrr="0.17647059" clrg="0.17647059" clrb="0.17647059" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<transform id="holder_transform" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">
<geometry name="Tool Set" geo="tool.stl" alpha="0.0" reflectivity="0.1" reflectivityBitmapFileName="" objtype="tool" cuttr="0.82745099" cuttg="0.78039217" cuttb="0.67450982" noncuttr="0.50196081" noncuttg="0.50196081" noncuttb="0.50196081" arborr="0.39215687" arborg="0.39215687" arborb="0.39215687" holderr="0.36862746" holderg="0.57254905" holderb="0.69019610" />
</transform>
</axis>
<geometry name="Z-AXIS-WAY" geo="z axis way mounted on x.stl" clrr="0.50196081" clrg="0.50196081" clrb="0.50196081" alpha="0.0" reflectivity="1.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="Z_AXIS_STEPPER" geo="z_axis_stepper.stl" clrr="0.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="x-AXIS" geo="x_axis.stl" clrr="0.17647059" clrg="0.17647059" clrb="0.17647059" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
</axis>
<axis id="Y" type="translation" x="0.00000000" y="-1.00000000" z="0.00000000" minvalue="-2.350000" maxvalue="2.520000" valuetype="cont" initial_value="0.000000">
<axis id="A" type="rotation" x="1.00000000" y="0.00000000" z="0.00000000" minvalue="-5.000000" maxvalue="95.000000" valuetype="cont" initial_value="0.000000" rzx="0.00000000" rzy="0.00000000" rzz="0.00000000">
<geometry name="A-AXIS" geo="a_axis.stl" clrr="0.00000000" clrg="0.50196081" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="A_PLATTER" geo="b_axis.stl" clrr="0.17647059" clrg="0.17647059" clrb="0.17647059" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<axis id="B" type="rotation" x="0.00000000" y="1.00000000" z="0.00000000" minvalue="-10000.000000" maxvalue="10000.000000" valuetype="cont" initial_value="0.000000" rzx="0.00000000" rzy="0.00000000" rzz="0.00000000">
<geometry name="PLATTER" geo="b_axis rotary table.stl" clrr="0.00000000" clrg="0.50196081" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<transform id="workpiece_transform" initialvalue="1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000,0.00000000,0.00000000,0.00000000,0.00000000,1.00000000">
<geometry name="Fixture" geo="fixture.stl" clrr="0.50196081" clrg="0.50196081" clrb="0.50196081" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="fixture" />
<geometry name="Initial Stock" geo="initial stock.stl" clrr="0.75294119" clrg="0.75294119" clrb="0.75294119" alpha="0.8" reflectivity="0.0" reflectivityBitmapFileName="" objtype="initialstock" />
<geometry name="Stock" geo="stock.stl" clrr="0.75294119" clrg="0.75294119" clrb="0.75294119" alpha="0.0" reflectivity="0.4" reflectivityBitmapFileName="" objtype="stock" />
<geometry name="Workpiece" geo="workpiece.stl" clrr="0.75294119" clrg="0.75294119" clrb="0.75294119" alpha="0.0" reflectivity="0.4" reflectivityBitmapFileName="" objtype="workpiece" />
<geometry name="toolpath" geo="toolpath.asc" clrr="0.80000001" clrg="0.80000001" clrb="0.80000001" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="toolpath" />
</transform>
</axis>
<geometry name="b-EMBLEM" geo="emblem on b axis.stl" clrr="1.00000000" clrg="1.00000000" clrb="1.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
</axis>
<geometry name="Y_EMBLEM" geo="emblem on a axis.stl" clrr="1.00000000" clrg="1.00000000" clrb="1.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="yAXIS" geo="y_axis.stl" clrr="0.17647059" clrg="0.17647059" clrb="0.17647059" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
</axis>
<geometry name="feet" geo="feet.stl" clrr="0.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="mh_CAM" geo="cam on table_laptop.stl" clrr="1.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="mh_EMBLEM2" geo="emblem on laptop.stl" clrr="1.00000000" clrg="1.00000000" clrb="1.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="mh_LAPTOP" geo="laptop.stl" clrr="0.29411766" clrg="0.29411766" clrb="0.29411766" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="mh_MASTER" geo="master on table_laptop.stl" clrr="0.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="mh_TABLE" geo="table.stl" clrr="0.62745100" clrg="0.32156864" clrb="0.17647059" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="outlet" geo="outlet and button.stl" clrr="0.17647059" clrg="0.17647059" clrb="0.17647059" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
<geometry name="servos" geo="base servo motors.stl" clrr="0.00000000" clrg="0.00000000" clrb="0.00000000" alpha="0.0" reflectivity="0.0" reflectivityBitmapFileName="" objtype="geometry" />
</machine_definition>
The following user(s) said Thank You: tommylight, Aciera
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
08 Dec 2022 23:12 #258929
by andypugh
I am curious about the file sizes and geometric fidelity of STL v OBJ.
Replied by andypugh on topic Toolkit for vismach model
I think that I found it necessary to _create_ the parts in-situ, rather than move them later, if you want to avoid having to shift them about in the Vismach script.I have been trying today and found it very trying!
I opened a single STL model of all parts provided to me in F360, made a rigid group and then set the part origin to the spindle tip. Then I exported all the parts as a mesh in Ascii STL. THey should have known where they lived
I am curious about the file sizes and geometric fidelity of STL v OBJ.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4003
- Thank you received: 1730
09 Dec 2022 07:58 #258974
by Aciera
Replied by Aciera on topic Toolkit for vismach model
Maybe we need to make a distinction between individual parts that are to be assembled rigidly in the model and parts that need to be movable in the finished model? I can see how importing an assembly of STLs would work in the former case but in the latter I would think that the movable parts need to be imported as separate STL bodys.I think that I found it necessary to _create_ the parts in-situ, rather than move them later, if you want to avoid having to shift them about in the Vismach script.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4003
- Thank you received: 1730
09 Dec 2022 08:10 #258976
by Aciera
Replied by Aciera on topic Toolkit for vismach model
An interesting application of a vismach model might be to check for interference of machine parts while running a gcode file in a simulation config. I have no idea how complex such a feature would be to include but ROS uses that, IIRC.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
10 Dec 2022 10:38 #259071
by andypugh
Replied by andypugh on topic Toolkit for vismach model
It should be possible to add a collision detection function to the Vismach base code, and then the python handler could choose to run it, or not.
Googling for "opengl collision detection" suggests that it is not built-in to OpenGL as far as I can see.
Googling for "opengl collision detection" suggests that it is not built-in to OpenGL as far as I can see.
The following user(s) said Thank You: Aciera
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 696
- Thank you received: 123
11 Dec 2022 01:41 #259174
by smc.collins
Replied by smc.collins on topic Toolkit for vismach model
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
11 Dec 2022 20:10 #259216
by andypugh
Replied by andypugh on topic Toolkit for vismach model
That 2D collision algorithm wouldn't work with these complex 3D shapes. Siimply calculating the intersection of the bounding cuboids would false-flag pretty much permanently for most models.
Please Log in or Create an account to join the conversation.
- emildepp
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
31 Jan 2023 05:00 #263298
by emildepp
To fix the error, make sure that all lines in the code block are properly indented by the same number of spaces or tabs. . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .
Replied by emildepp on topic Toolkit for vismach model
This error message occurs when the Python interpreter encounters a code block that should be indented, but isn't. Python indentation is a common issue in Python because whitespace is used to define code blocks, so proper indentation is critical for code to run correctly. Some common causes of this error include:
IndentationError: expected an indented block after class definition on line 12
- Forgetting to indent the statements within a compound statement
- Forgetting to indent the statements of a user-defined function.
To fix the error, make sure that all lines in the code block are properly indented by the same number of spaces or tabs. . It is recommended to use 4 spaces for indentation in Python, tabulation or a different number of spaces may work, but it is also known to cause trouble at times. Tabs are a bad idea because they may create different amount if spacing in different editors .
Please Log in or Create an account to join the conversation.
Time to create page: 0.075 seconds