Calculating with reference parameters (parametric construction)

Calculating with reference parameters (parametric construction)

Kay_Rethmeier
Advocate Advocate
752 Views
3 Replies
Message 1 of 4

Calculating with reference parameters (parametric construction)

Kay_Rethmeier
Advocate
Advocate

Hi,

 

I'm doing a parametric construction creating a path for a chain. Therefore I need the calculate with a radian dimension to calculate the pathlength.

So I need to calculate with a reference paramter. Inventor can do this.

 

Is there a way in AutoCAD I don't to enable calculating with these refence values?

 

 

Bye

Kay

Cheers
Kay (Principal CAD-Consultant)
0 Likes
753 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

What kind of object is the path?  Because of your mention of radians, I assume something like an Arc.  If that's what it is, can you use Lengthen with its Total-length option?  No calculations required, no reference of the current length to determine how much to change it for the desired length, etc.  The length of any object type that has length can be found with (vlax-curve-...) functions without dealing with radians, and whether straight or curved or a combination, etc.

 

Can you post an image or sample drawing showing what you're trying to do?

Kent Cooper, AIA
0 Likes
Message 3 of 4

Kay_Rethmeier
Advocate
Advocate

Hi Kent,

 

thanks for your idea. But in my case it is a closed polyline with arcs. Lengthen is only possible for simpler objects.

Attached you see my idea:

2016-01-27 21_53_28.png

 

Is should be a parametric construction, where you need to input only the total length and the two radius, and the total length is the sum of the two lines + the radian measure (in other words "true length" or "unrolling") of the arcs (DIA * PI  / 360 * ALPHA).

 

The total length must be a multiple of e.g. 325. But this is a different problem.

 

Any ideas? - Inventor can do it easiliy!!! (But the Autodesk Developers do not speak to each other.... thats a big pitty!)

 

Bye

Kay

Cheers
Kay (Principal CAD-Consultant)
0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@Kay_Rethmeier wrote:

... it is a closed polyline with arcs. ..., and the total length is the sum of the two lines + the radian measure (in other words "true length" or "unrolling") of the arcs ....


The total length of a closed Polyline can be obtained without any such calculations, via either:

 

(vlax-curve-getDistAtParam poly (vlax-curve-getEndParam poly))

 

with 'poly' being a variable containing either the Polyline entity name or its conversion to a VLA object, or:

 

(vla-get-Length poly)

 

with 'poly' being the Polyline as a VLA object only [does not work with its entity name].

 

See the (vlax-ename->vla-object) function for the conversion to a VLA object, if you choose to go that route.

 

EDIT:  That (vlax-curve-getDistAtParam...) function will give you the overall length of any 'curve'-class object that has a finite length, whether open or closed [Line, Arc, Circle, any kind of Polyline, Ellipse, Spline].  Not all of those object types have a VLA Property called 'Length' as Polylines do [e.g., for an Arc it's called 'ArcLength' and for a Circle it's called 'Circumference'], so that's a good universal length finder.

Kent Cooper, AIA
0 Likes