Simulated Weld

chrisb
Posts: 16831
Joined: Tue Mar 17, 2015 9:14 am

Re: Simulated Weld

I had hoped for a moment that a distorted clone of a sphere would save space but in vain: A comparison of file sizes yields:
single sphere: 2830
ellipsoid: 3252
sphere+clone: 4550

And while the BOPCheck succeeds on a sphere it fails again on the distorted clone - which in fact is an ellipsoid.
microelly2
Posts: 4319
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Simulated Weld

bp_737.png (42.57 KiB) Viewed 1089 times

Code: Select all

``````
import numpy as np
import random
ptsk=[]
d0=9
d1=6
xl=10

for i in range(20):
if i<>0:
d=d0*(0.8+random.random()*0.4)
ptsk += [pts]
d=d1*(0.9+random.random()*0.2)
ptsk += [pts]
d=d1*(0.9+random.random()*0.2)
ptsk += [pts]

uc=3*20-2
vc=11

def createNurbs(ptsarr,uc=0,vc=0):
'''create the nurbs representation'''

bs=Part.BSplineSurface()
kv=[1.0/(uc-3+1)*i for i in range(uc-2+1)]
mv=[4]+[1]*(uc-4+1)+[4]

ku=[1.0/(vc-3+1)*i for i in range(vc-2+1)]
mu=[4]+[1]*(vc-4+1)+[4]

bs.buildFromPolesMultsKnots(ptsarr, mv, mu, kv, ku, False, False ,3,3)
nu.Shape=bs.toShape()
return nu

createNurbs(ptsk,uc,vc)

``````
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm

Re: Simulated Weld

Just FYI, in commercial CAD software with weld features (at least mid-range ones), a fillet weld is just displayed as following:

FC_simulated_fillet_weld_01.png (21.79 KiB) Viewed 1071 times

The fillet feature has a bitmap image mapped to its faces to simulate texture, that you can choose to display on screen or not.

One useful thing is that when creating a weld callout in a drawing view, it extracts welding information from the fillet feature.

I think a macro that would sweep a triangle along a selected edge would be simpler and keep a lower filesize. The trick would be for the triangle sides to always be collinear to the faces attached to the edge. And of course it would not be as pretty as those spheres!
chrisb
Posts: 16831
Joined: Tue Mar 17, 2015 9:14 am

Re: Simulated Weld

I remember that is the way it is shown in books about welding. Especially the different colour is very helpful.
bill
Posts: 374
Joined: Fri Jan 09, 2015 9:25 pm

Re: Simulated Weld

microelly2 wrote:
Sun Mar 04, 2018 6:55 pm
by chrisb » Sun Mar 04, 2018 6:04 pm
With a few var.defs. BOOM!
nonukeweld.png (22.41 KiB) Viewed 1036 times
Thanks MElly! I did not know you were also a master welder!
triplus
Posts: 8415
Joined: Mon Dec 12, 2011 4:45 pm

Re: Simulated Weld

Any closer and we would see welding sparks too.
microelly2
Posts: 4319
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Simulated Weld

triplus wrote:
Tue Mar 06, 2018 5:21 pm
Any closer and we would see welding sparks too.
would be a fun to animate
phpBB [video]
triplus
Posts: 8415
Joined: Mon Dec 12, 2011 4:45 pm

Re: Simulated Weld

I went straight to watching the video. Thanks for using the welding glass filter by default.
Kunda1
Posts: 4755
Joined: Thu Jan 05, 2017 9:03 pm

Re: Simulated Weld

Next time you need to warn us!! I didn't have my Welding mask on!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
silopolis
Posts: 59
Joined: Thu Oct 20, 2016 10:06 pm

Re: Simulated Weld

NormandC wrote:
Sun Mar 04, 2018 9:50 pm
I think a macro that would sweep a triangle along a selected edge would be simpler and keep a lower filesize. The trick would be for the triangle sides to always be collinear to the faces attached to the edge. And of course it would not be as pretty as those spheres!
How would that work for "external" edge welds?
Feeling like spheres have the advantage of working in all flat, interior and exterior cases, aren't they?

But thinking about penetration too sweeping a circle, partly dipped in welded parts, could be another approximation option... WDYT?