-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello @jlvila ! There seems to be 2 unrelated issues here: wrong side suppression issueI reformated your original text to highlight the code, so it is more readable. Can you put your code for generating the cylinder and the bricks ?
|
Beta Was this translation helpful? Give feedback.
-
Hi Jimy, DifferenceThanks, for tube unexpected difference, I just change, as you suggested, the direction of the axis, and the result is as expected ;-) The code def addTube(self, x, y, w, h, color: QColor):
_radius = w/2.0
_lenght = h
_circle = flatsurface(wire(Circle((vec3(0), vec3(0, -1, 0)), _radius)))
_tube = Tube3D(_circle, [
vec3(0, 0, 0),
vec3(0, _lenght, 0),
])
brTranslated = _tube.transform(
vec3(x+_radius, y, 0))
brTranslated.option(color=vec3(color.red()/255.0,
color.green()/255.0, color.blue()/255.0))
_key = self.scene3d.scene.add(brTranslated)
npart4 = note_bounds(brTranslated)
self.scene3d.scene.add(npart4, f'{_key}_bounds')
print(f'Add tube from 3D: {_key}')
self.refresh3d()
return brTranslated, _key
|
Beta Was this translation helpful? Give feedback.
Hi Jimy,
Difference
Thanks, for tube unexpected difference, I just change, as you suggested, the direction of the axis, and the result is as expected ;-)
I change
vec3(0, 1, 0)
tovec3(0, -1, 0)
for the _circle.The code