Another approach to assembly solver (A2plus)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Another approach to assembly solver (A2plus)
@kbwbe perhaps you may be interested to use the Github releases/tag features so it's easier to follow the evolution of A2plus + create appimages for it for testing (just like realthunder does for asm3 ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Another approach to assembly solver (A2plus)
instable still having a lot of errors even with last getMovement.kbwbe wrote: ↑Sun Sep 02, 2018 11:43 amHi Manuel,manuelkrause wrote:
your assemblies are always useful to find strange problems. I was hunting a problem with axial constraints within your motor, but found a problem within your piston part.
Please find 3 files attached:
- modified piston
- stable assembly
- instable assembly
Open the assemblies and hit the solve button. you see what happens.
Stable assembly:
I modified the piston "Kolben" and inserted an axis. This axis is used for an axialConstraint
Instable assembly:
Instead of the newly inserted axis, the surface of the drilling hole in piston is used for same axialConstraint.
The problem i found is that the center of surface is 5 meters !!! away from piston part. Is there anythin special with that drilling hole ? Is it a cone with very small angle ?
Please test the files...
EDIT:
during solving a2+man I got exception on vec3.normalize()
Code: Select all
#project this vector to the own axis
#This marks the beginning of the moveVecotr
dot = vec2.dot(ownAxis)
vec3 = Base.Vector(ownAxis)
vec3.normalize() -->EXCEPTION DUE TO NULL VECTOR
vec3.multiply(dot)
#Sub both vectors to geht the movevector shortest way between both axes
moveVector = vec2.sub(vec3)
Re: Another approach to assembly solver (A2plus)
Hi Turro, thank you for feedback. I will have a look.Turro75 wrote: ↑Tue Sep 04, 2018 10:19 pm
instable still having a lot of errors even with last getMovement.
during solving a2+man I got exception on vec3.normalize()
Code: Select all
#project this vector to the own axis #This marks the beginning of the moveVecotr dot = vec2.dot(ownAxis) vec3 = Base.Vector(ownAxis) vec3.normalize() -->EXCEPTION DUE TO NULL VECTOR vec3.multiply(dot) #Sub both vectors to geht the movevector shortest way between both axes moveVector = vec2.sub(vec3)
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Re: Another approach to assembly solver (A2plus)
Hi Kunda1,Kunda1 wrote: ↑Tue Sep 04, 2018 9:07 pm @kbwbe perhaps you may be interested to use the Github releases/tag features so it's easier to follow the evolution of A2plus + create appimages for it for testing (just like realthunder does for asm3 ?
with next master-update, there will be release tags.
Edit: Appimages are making no sense for this python WB. A simple git pull updates the WB to new versions.
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Re: Another approach to assembly solver (A2plus)
Awesome.
Re:appimage
Great that it's pure python so testing is easier. Says the word and ill add it to the add-on manager under alpha status for others to test as well.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- manuelkrause
- Posts: 442
- Joined: Thu Jul 05, 2018 7:16 pm
Re: Another approach to assembly solver (A2plus)
Simply: nice!
Given the simplicity to add, the convenience to work with and the proved results, it's a worthy alternative to asm3, that many FC users would like to have! And so far we're only talking about ~3 months of development, on top of hamish2014's work of course.
I again want to express my thankfulness @kbwbe for having taken this job!
Re: Another approach to assembly solver (A2plus)
@Turro75, @manuelkrause, @wandererfan
Hi Guy's,
i got axialConstraint stable now. It solves Manuel's problematic motor assembly now without problems.
I switched back to old calculation of axial.getMovement(), but adjusted the refPoints during loadSystem().
Now the refPoint of axial is set near to the BoundBox.Center of the referenced surface.
@Turro75: there is a new function inside axial dependency:
.
.
which has to be called here:
.
.
Hi all,
because of this important bugfix, v0.0.2 has been released.
Hi Guy's,
i got axialConstraint stable now. It solves Manuel's problematic motor assembly now without problems.
I switched back to old calculation of axial.getMovement(), but adjusted the refPoints during loadSystem().
Now the refPoint of axial is set near to the BoundBox.Center of the referenced surface.
@Turro75: there is a new function inside axial dependency:
.
Code: Select all
def adjustRefPoints(self,obj,sub,refPoint,axis):
if sub.startswith("Edge"): return refPoint
face = getObjectFaceFromName(obj,sub)
bbCenter = face.BoundBox.Center
if bbCenter.distanceToLine(refPoint,axis) < 1.0e-12:
return bbCenter
v1 = bbCenter.sub(refPoint)
v2 = Base.Vector(axis)
v2.normalize()
dot = v1.dot(v2)
v2.multiply(dot)
refPoint = refPoint.add(v2)
return refPoint
which has to be called here:
.
Code: Select all
.... Dependency.Create()....
elif c.Type == "axial":
dep1 = DependencyAxial(c, "pointAxis")
dep2 = DependencyAxial(c, "pointAxis")
ob1 = doc.getObject(c.Object1)
ob2 = doc.getObject(c.Object2)
dep1.refPoint = getPos(ob1,c.SubElement1)
dep2.refPoint = getPos(ob2,c.SubElement2)
axis1 = getAxis(ob1, c.SubElement1)
axis2 = getAxis(ob2, c.SubElement2)
if dep2.direction == "opposed":
axis2.multiply(-1.0)
dep1.refPoint = dep1.adjustRefPoints(ob1,c.SubElement1,dep1.refPoint,axis1)
dep2.refPoint = dep2.adjustRefPoints(ob2,c.SubElement2,dep2.refPoint,axis2)
dep1.refAxisEnd = dep1.refPoint.add(axis1)
dep2.refAxisEnd = dep2.refPoint.add(axis2)
Hi all,
because of this important bugfix, v0.0.2 has been released.
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Re: Another approach to assembly solver (A2plus)
Just made a quick test, now it works perfectly.kbwbe wrote: ↑Wed Sep 05, 2018 4:12 pm @Turro75, @manuelkrause, @wandererfan
Hi Guy's,
i got axialConstraint stable now. It solves Manuel's problematic motor assembly now without problems.
I switched back to old calculation of axial.getMovement(), but adjusted the refPoints during loadSystem().
Now the refPoint of axial is set near to the BoundBox.Center of the referenced surface.
@Turro75: there is a new function inside axial dependency:
..Code: Select all
def adjustRefPoints(self,obj,sub,refPoint,axis): if sub.startswith("Edge"): return refPoint face = getObjectFaceFromName(obj,sub) bbCenter = face.BoundBox.Center if bbCenter.distanceToLine(refPoint,axis) < 1.0e-12: return bbCenter v1 = bbCenter.sub(refPoint) v2 = Base.Vector(axis) v2.normalize() dot = v1.dot(v2) v2.multiply(dot) refPoint = refPoint.add(v2) return refPoint
which has to be called here:
..Code: Select all
.... Dependency.Create().... elif c.Type == "axial": dep1 = DependencyAxial(c, "pointAxis") dep2 = DependencyAxial(c, "pointAxis") ob1 = doc.getObject(c.Object1) ob2 = doc.getObject(c.Object2) dep1.refPoint = getPos(ob1,c.SubElement1) dep2.refPoint = getPos(ob2,c.SubElement2) axis1 = getAxis(ob1, c.SubElement1) axis2 = getAxis(ob2, c.SubElement2) if dep2.direction == "opposed": axis2.multiply(-1.0) dep1.refPoint = dep1.adjustRefPoints(ob1,c.SubElement1,dep1.refPoint,axis1) dep2.refPoint = dep2.adjustRefPoints(ob2,c.SubElement2,dep2.refPoint,axis2) dep1.refAxisEnd = dep1.refPoint.add(axis1) dep2.refAxisEnd = dep2.refPoint.add(axis2)
Hi all,
because of this important bugfix, v0.0.2 has been released.
One more step to the first release
Re: Another approach to assembly solver (A2plus)
Hi Kunda1,
have a little bit patience, we are very near to this point, but not completely.
KBWBE
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Re: Another approach to assembly solver (A2plus)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs