clothoids

323 views
Skip to first unread message

Franz Reiter

unread,
Aug 30, 2007, 11:14:07 AM8/30/07
to open_ca...@googlegroups.com
Hallo,

as far as i know, a clothoid is a curve between two lines with variable .
Thus you can represent cyloids with very few parameters: the 2 Points/vectors,
the starting radius and the ending radius.

So the structure of a clothoid could be:
{Point *p1, *p2; Vector *v1; double radius r1, r2;} CurvClotho;
(maybe the vector for r=infinite is useful also) ..

The definition could be something like:
CURVE<curveNr> = CLOTH <startpoint> <startVektor> <startRadius>
<endpoint> <endRadius>

So this could be also a basic objectType of a cad-system; why not ?
To intersect this curve with all other kinds of curves you need a parametrized
description, thats all ..

Franz

martin_gnu

unread,
Aug 30, 2007, 1:28:00 PM8/30/07
to open_cad_format

> So the structure of a clothoid could be:
> {Point *p1, *p2; Vector *v1; double radius r1, r2;} CurvClotho;


from my point of view a clothoid can be like this:
{Point *p1; Vector *v1; double r_max; double A_parameter;}
CurvClotho;
p2 is redundant information.
Perhaps it´s good a precision parameter for the number of points
calculates between R=infinite to R_max (minimum radious value). In a
privative software MDT-TCP the clothoid primitive is a group of short
lines.


Here i upload 3 files
http://groups.google.com/group/open_cad_format/files

there are a file called MUPAD_script_clotoids.txt. It´s a clothoid
script in MUPAD language created by me.
http://open_cad_format.googlegroups.com/web/MUPAD_script_clotoids.txt?gda=G6mZ1koAAABIyjegFuEwdPdDjMosUWAZCGxqTGT34Ybcct6TMfSqlmG1qiJ7UbTIup-M2XPURDSOQ4nMWvBoT7cEQ4i_uvllbNaXM_Sdfwt-3UEa4cCI4A
there are a file called clothoids.odt. It´s a clothoid tutorial to
programmer created by me.
http://open_cad_format.googlegroups.com/web/clothoids.odt?gda=dcTTkz4AAABIyjegFuEwdPdDjMosUWAZCGxqTGT34Ybcct6TMfSqlmG1qiJ7UbTIup-M2XPURDQoLaOQ8FRAh_3o2AZL460X
there are a file called clotoides_castellano.odt. It´s a complete
tutorial to clothoid created by me, but it´s in spanish. I hope
traslate to english... In the page 9 and 10 we have formulas to create
our own clothoid formulas
http://open_cad_format.googlegroups.com/web/clotoides_castellano.odt?gda=5XAog0kAAABIyjegFuEwdPdDjMosUWAZCGxqTGT34Ybcct6TMfSqlmG1qiJ7UbTIup-M2XPURDQpPXRlRyxVVdzpfNhjQvr9Qz91N-o-QOrRBWt5jtLyOw

Regards, Martin Vales

martin_gnu

unread,
Aug 30, 2007, 2:03:45 PM8/30/07
to open_cad_format

martin_gnu

unread,
Aug 31, 2007, 11:41:59 AM8/31/07
to open_cad_format

Microstation V8 has 3 kind of spirals (they are b-splines curves
primitives):

clothoid (initial degree, final degree, length, tolerance (number of
knots and poles of b-splines) )
Archimedes (initial radius, final radius, angle)
Logarithmic (initial radius, final radius, angle, tolerance)

You need define 3 points on the screen to know the vector, and other
point to up/down side...

In surveying i think that this clothoid don´t works.

In Autocad every entity can be a derived type and can have auxiliar
information.

In a MDT-TCI (Autocad plugin) they define several new derived
primitives like MDT_point primitive like a group of a point, 2 texts
and a block.
In Autocad you can explode this MDT_point and it becomes on the
Autocad basic primitives (point, 2 text and a block).

A clothoid perhaps can be b-splines and the plugins add adicional type
information like Autocad can do.

Regards.
Martin.


Franz Reiter

unread,
Sep 1, 2007, 4:28:17 AM9/1/07
to open_ca...@googlegroups.com
Hallo,

concerning:


> > {Point *p1, *p2; Vector *v1; double radius r1, r2;} CurvClotho;
>
> from my point of view a clothoid can be like this:
> {Point *p1; Vector *v1; double r_max; double A_parameter;}
> CurvClotho;
> p2 is redundant information.

2D or 3D ?
My proposal was, that with p1, v1 and p2 you have the 3D-plane defined (!)
where the clotho goes.

The content of the datarecord should describe the clothoid without the need of
any other information.

The clothoid can connect a line and a circle (r1=inf, r2=rCir); or 2 circles
(r1=rCir1, r2=rCir2).

Now we would have to produce a polygon from this datarecord.
The accuracy (the deviation) shall be defined; for example, deviation shall
not exceed 10mm.

In the mupad-script i do not understand where L comes from.

Are there programs in C or Basic for clothoids ?

Franz.

"Martín RV (OPENGeoMap)"

unread,
Sep 1, 2007, 8:13:25 AM9/1/07
to open_ca...@googlegroups.com
Hi all:

2D or 3D ?
My proposal was, that with p1, v1 and p2 you have the 3D-plane defined (!) 
where the clotho goes.
  
It´s sound very  interesting but i only see plugins for surveyors clothoids in the horizontal plane. In surveying you define the horizontal plane of the Highway like this :"clothoid, circle, clothoid" and the radius on the begining of the clothoid is always infinite. The clothoid is for get the terrain elevation profile along a clothoid path using a MDT (triangulation)
http://www.earthslot.org/help/tep/terrain_profile_tool.htm
In this graphic you define the future real elevation  profile of the Highway. Perhaps the heights of this new profile can be interesting insert them  into the clothoid but i have never seen that.
Therefore by now i have seen something like that:
1) Highway ("clothoid, circle, clothoid", "clothoid, circle, clothoid","clothoid, circle, clothoid",...)
2) MDT (triangulation to get heights of points on the CAD)
3) terrain elevation profile along a clothoid
4) real elevation profile of the Highway
The content of the datarecord should describe the clothoid without the need of 
any other information.

The clothoid can connect a line and a circle (r1=inf, r2=rCir); or 2 circles 
(r1=rCir1, r2=rCir2).
  
The second option is very interesting but i have never seen that, but the CAD would be more complete in the definition of clothoid of course.

Now we would have to produce a polygon from this datarecord.
The accuracy (the deviation) shall be defined; for example, deviation shall 
not exceed 10mm.
  
Yes this is the same that i have seen in several surveying plugins.

In the mupad-script i do not understand where L comes from.

Are there programs in C or Basic for clothoids ?
  
I don´t know but you only need 2 lines:
x:=L-L^5/(5*fact(2)*(2*R*L)^2)+L^9/(9*fact(4)*(2*R*L)^4)-L^13/(13*fact(6)*(2*R*L)^6)+L^17/(17*fact(8)*(2*R*L)^8)-L^21/(21*fact(10)*(2*R*L)^10)+L^25/(25*fact(12)*(2*R*L)^12)-L^29/(29*fact(14)*(2*R*L)^14)+L^33/(33*fact(16)*(2*R*L)^16)-L^37/(37*fact(18)*(2*R*L)^18):
y:=L^3/(3*fact(1)*(2*R*L)^1)-L^7/(7*fact(3)*(2*R*L)^3)+L^11/(11*fact(5)*(2*R*L)^5)-L^15/(15*fact(7)*(2*R*L)^7)+L^19/(19*fact(9)*(2*R*L)^9)-L^23/(23*fact(11)*(2*R*L)^11)+L^27/(27*fact(13)*(2*R*L)^13)-L^31/(31*fact(15)*(2*R*L)^15)+L^35/(35*fact(17)*(2*R*L)^17):
and this formula:
R=pow(A,2)/L

In mupad script i have  different formulas to study different precision.
to pass to c is very easy:
2^5=pow(2,5)

The L is the lenght from the beginning of the clothoid (when the radious is infinite L=0) and is a variable like R. The A is a constant value and the most important parameter in a clothoid.
A^2=R_infinite*0=R1*L1=R_min*L_max,...
The L value is 0 when the radious is infinite. This is the only point with 0 value of L.
In a clothoid like you say (r1=rCir1, r2=rCir2) in r1 L has a value different of 0 and in r1 too.
Regards.

"Martín RV (OPENGeoMap)"

unread,
Nov 22, 2007, 5:04:52 PM11/22/07
to open_ca...@googlegroups.com
Hi all:

I am working in Madrid doing Autocad and Microstation plugins, and
therefore i would like build exporters to OCA from these 2 CADs.

I would like receive advices in the languages to build exporters. I am
working in VBA in Microstation and in VSTA (.NET c#) in Autocad. I need
to develop applications very quickly in my work. Anyway I explain you
all the possibilities, if someone want to work with me in this new
project...:


Autocad nowadays uses:

Autolisp (list. I don´t like this language at all...)
ARX (c++). I like c++, but it´s very difficult for me this API.
VSTA. Visual Studio tools for aplications. Here we can build plugins in
C#. It´s very easy.

Microstation nowadays uses:

MDL (similar to ANSI C, but it´s based in bytecodes). I would like use
this API, but in my work can not use this API.
Microstation basic. Bentley don´t have support in Microstation V8, and
therefore it´s imposible uses this API. I work with this API, but in V8
we have several problems.
VBA. Visual basic for applications. I would like have VSTA like Autocad
but Bentley nowadays don´t want change the technology.


I would like receive advices and communicate this new project to this list.

Regards.

Franz Reiter

unread,
Nov 23, 2007, 3:06:38 AM11/23/07
to open_ca...@googlegroups.com
Hi,

ad:


> working in VBA in Microstation and in VSTA (.NET c#) in Autocad. I need
> to develop applications very quickly in my work. Anyway I explain you

have never tried c#;
for Acad-development i make exes with VisualBasic-dotNet.
it is much easier than arx; the classes are better than in vba and vb6.
Let us know your decision.

If you also plan a import (from oca to Acad) let us know how we can help.

Franz

martin_gnu

unread,
Nov 25, 2007, 5:44:53 AM11/25/07
to open_cad_format


On Nov 23, 9:06 am, Franz Reiter <franz.rei...@cadcam.co.at> wrote:

> have never tried c#;
> for Acad-development i make exes with VisualBasic-dotNet.
> it is much easier than arx; the classes are better than in vba and vb6.
> Let us know your decision.
>
I am working in Microstation nowdays. I am learning the autocad API,
but i think i want work in c#. Reasons:
- I like c/c++ and GTK.
- very similar to c++, more than JAVA.
- good GUI IDE for GTK# in monodevelop (http://www.monodevelop.com/
Image:Stetic-in-monodevelop.png)
- good API in GTK (http://www.mono-project.com/GtkSharp:_Hello_World)

I know we need Visual Studio for Autocad, but i can do GTK# projects
in monodevelop also...

> If you also plan a import (from oca to Acad) let us know how we can help.
>
Yes, i would like have time to this... I only have weekends hehe.
> Franz


Regards.

Gertwin Groen

unread,
Nov 25, 2007, 10:27:34 AM11/25/07
to open_ca...@googlegroups.com
Hi,

On Windows you can use sharpdevelop for C#:
http://www.icsharpcode.net/OpenSource/SD
When working with C# i think you don't need visual studio to build
AutoCAD applications.
If you have access to the Autodesk ADN site, inside the ARX sdk
download there are also dot net examples.

The Autodesk discussion groups are a good resource if you have
questions about the arx or the dot net api:
http://discussion.autodesk.com/index.jspa

Greetings,
Gertwin

2007/11/25, martin_gnu <openg...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages