You don't see this?
When you add a subassembly to an assembly the function returns an AssembledSubAssembly object. When you add a part to an assembly the function returns an AssembledPart object. Add constraints between these AssembledXXX objects.
sub_assy = ca.AddSubAssembly(subassy,0,0,0)
# sub_assy is an AssembledSubAssembly object.
ca.AddMateConstraint(0, sub_assy, sub_assy.YZPlane, P1, own_face)
# so this should work (theoretically)
AssembledPart does not bring up anything in the index search.
would I be better to work out which is the correct face for each bolt type and use that as a "tube-to-tube mate?
You can also use the hole's edge instead of a hole' face.
I'm not saying it MUST but it COULD.View attachment 27767
Well, the holes have all the same diameter and the linkage parts have 6 of them each on the same face...
What to do?
Regards
Stefan
A few month ago i made me a little test part:
View attachment 27771
The holes in are made in various ways and for example i didn't found a good way to recognize the holes made from the thread tool (and some other things...)
If the Script should be universal, it should be able to handle different "hole situations" in my opinion...
Nate -- Using (American inch, at least) Unified National "bolts," Their "length values" are (relatively) easy to calculate from their basic Major Diameter. A Nut (under Unified National specification is equally simple to determine. It is the Washer that varies as to whether ir is a USS (ANSI Type A), SAE J2655 (ANSI Type B), or a Fender Washer. Unfortunately since the United States eliminated the National Bureau of Standards (in 1986) and the American National Standards Institute (in 2009), no "Standards" have a "legal" authority in the United States of America!Something i can't figure out how to do automatically is calculate bolt lengths when bolting two or more parts. That will require user input.
Thought about it and think that it would be ok for me to click on a start and an end face for the length and as i mostly pick the cylindrical face instead of the edge (it's easier to match...) it would be good to have a function which returns the diameter of such a cylindrical face...(and if i'm allowed to dream: for each of round type geometries an center/axis...;-))Discussion is how to automatically determine needed length based on the geometry in the assembly
Prt = CylinderFace.GetPart()
Diameter = CylinderFace.Edges[0].Diameter
Radius = Diameter / 2.0
CylinderEnds = CylinderFace.GetAdjoiningFaces()
CylinderLength = CylinderEnds[0].DistanceTo(CylinderEnds[1])
ThreadAxis = Prt.AddAxis('Thread axis', CylinderFace)
StartPlane = Prt.AddPlane('Start Plane', CylinderEnds[0], 0)
EndPlane = Prt.AddPlane('End Plane', CylinderEnds[1], 0)
StartPoint = Prt.AddPoint('Start Point', ThreadAxis, StartPlane)
EndPoint = Prt.AddPoint('End Point', ThreadAxis, EndPlane)
The other question was if i click on a hole which is made with the hole tool, are the any data which say it's a hole-tool-hole maybe in AlibreX.dll ?
I hope the final release will take not to long...Will require 2019 beta.
will think about itIf you want it then submit a request to Alibre support.