qtvismach, a axis toolpath

More
1 year 10 months ago #316219 by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
I pushed HALColorRGB and HALColorFlip functions to master.
I added them to the docs too.
The following user(s) said Thank You: tommylight, MarkoPolo

Please Log in or Create an account to join the conversation.

  • MarkoPolo
  • Away
  • Elite Member
  • Elite Member
More
1 year 10 months ago #316222 by MarkoPolo
Replied by MarkoPolo on topic qtvismach, a axis toolpath
The improved color control is nice, but I haven't been able to get the material resizing to work yet.

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #316229 by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
Have you looked at HalToolCylinder and HalToolTriangle ?
These change the shape of an object.

Can you post the material object building code?

Please Log in or Create an account to join the conversation.

  • MarkoPolo
  • Away
  • Elite Member
  • Elite Member
More
1 year 10 months ago #316239 by MarkoPolo
Replied by MarkoPolo on topic qtvismach, a axis toolpath
length = hal.get_value("hor_pos")
length = (float(length) + 115)
mat = Box(60, -30, -30, length, 30, 30)
mat = Color([0.4, 0.6, 0.2, 0.4],[mat])
mat = Rotate([mat],0,45,0,0)
mat = Translate([mat],0,0,0)
mat = Color([1, 1, 0, 1],[mat])

This is how I build a material element mounted in a lathe.

For now, only the material length is determined automatically, depending on the position of the lathe tailstock.

After the first simulation run, the material dimensions are drawn correctly. The problem is with rebuilding the dimension after running another ngc file with different dimensions.

I tried using HalToolCylinder and HalToolTriangle in various ways, but I must be doing something wrong

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #316303 by cmorley
Replied by cmorley on topic qtvismach, a axis toolpath
If you create a component (called comp, with a float pin named length) in your script, you can use this for the box:

Box(comp, 60, -30, -30, 'length', 30, 30)

or with no component in the script this should work:
Box(60, -30, -30, 'comp_name.length', 30, 30)

All the other entries can use a string to force evaluation of a HAL pin too.

Chris
The following user(s) said Thank You: MarkoPolo

Please Log in or Create an account to join the conversation.

  • MarkoPolo
  • Away
  • Elite Member
  • Elite Member
More
1 year 10 months ago #316331 by MarkoPolo
Replied by MarkoPolo on topic qtvismach, a axis toolpath
Perfect, it works this way. thanks

By the way, I propose a small change in qt_vaismach.py
in the zooIn and zoomout functions add and subtract the value of self.near.

Now, with a big zoom, you have to really turn the mouse wheel to fully zoom in and then zoom out.

After such a change, it is much more pleasant, more linear operation.

Such a correction would also be useful in the main preview window, but I haven't found a solution for this..
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.238 seconds
Powered by Kunena Forum