Need some help in 2d
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-15 11:03 PM
2006-05-15
11:03 PM
x= 5
y = 9
Rect2 0, 0, x, y
circle2 x/2, y/2, 1
line2 0, 0, x, y
Thanks
8 REPLIES 8
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-15 11:57 PM
2006-05-15
11:57 PM
Mryan,
Circle2 has only one parameter, the radius, not three.
You probably got an error message.
Could you post a drawing of what you want to code ?
I am unsure of the figure you want to code for.
Peter Devlin
Circle2 has only one parameter, the radius, not three.
You probably got an error message.
Could you post a drawing of what you want to code ?
I am unsure of the figure you want to code for.
Peter Devlin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-16 12:29 AM
2006-05-16
12:29 AM
Peter: CIRCLE has one, CIRCLE2 has 3 parameters. Mryan is right yet.
Mryan: Your code is quiet good, but as so often it's more math than programming. You have to give us more informations about the defining of the circle. 1st the dioganal line may not cross the circle, but has the circle to fit inside the resulting triangle or may it be flexible in its radius. May it cross the box lines? It's possible to get more than one result, should all be displayed?
What is it for?
Mryan: Your code is quiet good, but as so often it's more math than programming. You have to give us more informations about the defining of the circle. 1st the dioganal line may not cross the circle, but has the circle to fit inside the resulting triangle or may it be flexible in its radius. May it cross the box lines? It's possible to get more than one result, should all be displayed?
What is it for?
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-16 01:06 AM
2006-05-16
01:06 AM
For a square its very simple to do.... the solution is this (where x and y are equal)
x= 12"
y = 12"
Rect2 (-.5 * x), (-.5 * y), (.5 * x), (.5 * y)
circle2 0, 0, 0.90125"
line2 (-.5 * x), (-.5 * y), -.6328", -.6328"
line2 .6328", .6328", (.5 * x), (.5 * y)
When x and y are not equal i don't know how to draw a line that runs from corner to the circle and then again from the other side of the circle to the corner
x= 12"
y = 24"
Rect2 (-.5 * x), (-.5 * y), (.5 * x), (.5 * y)
circle2 0, 0, 0.90125"
line2 (-.5 * x), (-.5 * y), -.6328", -.6328"
line2 .6328", .6328", (.5 * x), (.5 * y)
x= 12"
y = 12"
Rect2 (-.5 * x), (-.5 * y), (.5 * x), (.5 * y)
circle2 0, 0, 0.90125"
line2 (-.5 * x), (-.5 * y), -.6328", -.6328"
line2 .6328", .6328", (.5 * x), (.5 * y)
When x and y are not equal i don't know how to draw a line that runs from corner to the circle and then again from the other side of the circle to the corner
x= 12"
y = 24"
Rect2 (-.5 * x), (-.5 * y), (.5 * x), (.5 * y)
circle2 0, 0, 0.90125"
line2 (-.5 * x), (-.5 * y), -.6328", -.6328"
line2 .6328", .6328", (.5 * x), (.5 * y)
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-16 01:19 AM
2006-05-16
01:19 AM
Your right Frank, I was thinking about the wrong circle.
Mryan, I apologize.
Peter Devlin
Mryan, I apologize.
Peter Devlin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-16 02:07 AM
2006-05-16
02:07 AM
Try this:
!flex paras r = 0.4 x = a/2 y = b/2 !calculated vars r = MIN(x,y,r) w = ATN(b/a) RECT2 -x, -y, x, y circle2 0, 0, r LINE2 -x, -y, -r*COS(w), -r*SIN(w) LINE2 -x, y, -r*COS(w), r*SIN(w) LINE2 x, y, r*COS(w), r*SIN(w) LINE2 x, -y, r*COS(w), -r*SIN(w)
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-16 09:13 PM
2006-05-16
09:13 PM
thank you very much


Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-17 12:34 AM
2006-05-17
12:34 AM
Frank, your avatar is the best I've seen yet!
AC4.1-AC26SWE; MacOS13.5.1; MP5,1+MBP16,1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-05-17 08:14 AM
2006-05-17
08:14 AM
Thanks.
Was a bit of work to get the animation into the file size limit. 😉

bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm