Is there any way at all to create a folded beam using any version of the API?
We have tried quite a few things and scoured all the forums and guides to no avail.
Trying to create a folded beam very similar to the way the straight stair macro does tread type 19. Or creating a folded beam from a polyline would work for us too. Actually any way or method would be helpful. I'm open to creating a user defined tread or a custom profile programmatically. Any solution would be great.
Please help!
Solved! Go to Solution.
Is there any way at all to create a folded beam using any version of the API?
We have tried quite a few things and scoured all the forums and guides to no avail.
Trying to create a folded beam very similar to the way the straight stair macro does tread type 19. Or creating a folded beam from a polyline would work for us too. Actually any way or method would be helpful. I'm open to creating a user defined tread or a custom profile programmatically. Any solution would be great.
Please help!
Solved! Go to Solution.
Solved by ChristianBlei. Go to Solution.
Hi,
a folded beam is in the API of Type UnfoldedStraightBeam which inherits from StraightBeam.
You pass a PolyLine3D to the constructor + the start point and end point + the z Vector for the section orientation + the thickness of the beam + the portioning, 0 or 0.5 or 1 for the position of the section.
Public Shared Function TestUnfoldedBeam() As Boolean
DocumentManager.LockCurrentDocument()
Using tTrans As Transaction = TransactionManager.StartTransaction()
Try
Dim tStart As New Point3d(0, 0, 0)
Dim tEnd As New Point3d(4000, 0, 0)
Dim tThick As Double = 10
Dim tPortioning As Double = 0.5
Dim tPt1 As New Point3d(-500, -500, 0)
Dim tPt2 As New Point3d(-200, -500, 0)
Dim tPt3 As New Point3d(400, 1000, 0)
Dim tPt4 As New Point3d(400, 2000, 0)
Dim tVertices As Point3d() = New Point3d() {tPt1, tPt2, tPt3, tPt4}
Dim tBulges As Double() = New Double() {0, 0.1, 0.1, 0}
Dim tPoly As New Polyline3d(tVertices, tBulges)
Dim tBeam As New UnfoldedStraightBeam(tPoly, tStart, tEnd, Vector3d.kZAxis, tThick, tPortioning)
tBeam.WriteToDb()
Catch ex As Exception
Finally
tTrans.Commit()
End Try
End Using
DocumentManager.UnlockCurrentDocument()
Return True
End Function
HTH,
Christian
Hi,
a folded beam is in the API of Type UnfoldedStraightBeam which inherits from StraightBeam.
You pass a PolyLine3D to the constructor + the start point and end point + the z Vector for the section orientation + the thickness of the beam + the portioning, 0 or 0.5 or 1 for the position of the section.
Public Shared Function TestUnfoldedBeam() As Boolean
DocumentManager.LockCurrentDocument()
Using tTrans As Transaction = TransactionManager.StartTransaction()
Try
Dim tStart As New Point3d(0, 0, 0)
Dim tEnd As New Point3d(4000, 0, 0)
Dim tThick As Double = 10
Dim tPortioning As Double = 0.5
Dim tPt1 As New Point3d(-500, -500, 0)
Dim tPt2 As New Point3d(-200, -500, 0)
Dim tPt3 As New Point3d(400, 1000, 0)
Dim tPt4 As New Point3d(400, 2000, 0)
Dim tVertices As Point3d() = New Point3d() {tPt1, tPt2, tPt3, tPt4}
Dim tBulges As Double() = New Double() {0, 0.1, 0.1, 0}
Dim tPoly As New Polyline3d(tVertices, tBulges)
Dim tBeam As New UnfoldedStraightBeam(tPoly, tStart, tEnd, Vector3d.kZAxis, tThick, tPortioning)
tBeam.WriteToDb()
Catch ex As Exception
Finally
tTrans.Commit()
End Try
End Using
DocumentManager.UnlockCurrentDocument()
Return True
End Function
HTH,
Christian
Thank you very much!
Side question for you. Do you know how to place the system line of the folded part into a specific location? For instance it would be tPt2 vertex of the part ,or fist bend of the folded beam.
Also tBulges being 0.1 really changes the parts geometry quite a bit. We set them all to 0 and we got a "correct" looking part. Took us a while to figure that one out.
Again thank you very much for the tip. You are a hero 🙂
Thank you very much!
Side question for you. Do you know how to place the system line of the folded part into a specific location? For instance it would be tPt2 vertex of the part ,or fist bend of the folded beam.
Also tBulges being 0.1 really changes the parts geometry quite a bit. We set them all to 0 and we got a "correct" looking part. Took us a while to figure that one out.
Again thank you very much for the tip. You are a hero 🙂
Hi,
My guess for the position of the system line (I have not tested that) is that the origin of the polyline UCS is always the position of thge system line. So you have to move the polyline....
To move the position of the system line into a specific location relativ to the section(to offset the section) you can use, inherited from StraightBeam
HTH, Christian
Hi,
My guess for the position of the system line (I have not tested that) is that the origin of the polyline UCS is always the position of thge system line. So you have to move the polyline....
To move the position of the system line into a specific location relativ to the section(to offset the section) you can use, inherited from StraightBeam
HTH, Christian
Can't find what you're looking for? Ask the community or share your knowledge.