|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I head the idea to construct a screw and the opposite part; a nut ? (Sorry,
For this I had the idea to contruct a flat polygon (6 corners), cut off a
circle inside, sweep it to the third dimension and then use CSG to do the
remaining.
But how to cut off the circle inside the polygon ?
So, the first step is to define the polygon.
# declare Radius_Aussen = 0.5;
# declare Radius_Innen = 0.3;
# declare Anfangswinkel = 0.0;
# declare Mittelpunkt = <0.0, 0.0, 0.0>;
# declare Winkel = Anfangswinkel;
# declare Increment = pi/3.0;
# declare X_Koordinate = 0.0;
# declare Y_Koordinate = 0.0;
# declare Eckpunkt = array [6];
# declare Index = 0;
# while (Index < 6)
# X_Koordinate = Mittelpunkt.x + Radius_Aussen * Winkel; // This does not
work
# Y_Koordinate = Mittelpunkt.y + Radius_Aussen * Winkel; // This does not
work
# Eckpunkt [Index] = <X_Koordinate, Y_Koordinate>;
# Index = Index + 1;
# Winkel = Anfangswinkel + Index * Increment;
# end
# declare Grundflaeche =
polygon
{
6, Eckpunkt[0], Eckpunkt[1], Eckpunkt[2],
Eckpunkt[3], Eckpunkt[4], Eckpunkt[5]
}
Thank you
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hans-Werner nous apporta ses lumieres ainsi en ce 2004-09-24 18:27... :
>I head the idea to construct a screw and the opposite part; a nut ? (Sorry,
>For this I had the idea to contruct a flat polygon (6 corners), cut off a
>circle inside, sweep it to the third dimension and then use CSG to do the
>remaining.
>But how to cut off the circle inside the polygon ?
>So, the first step is to define the polygon.
>
># declare Radius_Aussen = 0.5;
># declare Radius_Innen = 0.3;
># declare Anfangswinkel = 0.0;
># declare Mittelpunkt = <0.0, 0.0, 0.0>;
># declare Winkel = Anfangswinkel;
># declare Increment = pi/3.0;
># declare X_Koordinate = 0.0;
># declare Y_Koordinate = 0.0;
># declare Eckpunkt = array [6];
># declare Index = 0;
>
>
># while (Index < 6)
> # X_Koordinate = Mittelpunkt.x + Radius_Aussen * Winkel; // This does not
>work
> # Y_Koordinate = Mittelpunkt.y + Radius_Aussen * Winkel; // This does not
>work
> # Eckpunkt [Index] = <X_Koordinate, Y_Koordinate>;
> # Index = Index + 1;
> # Winkel = Anfangswinkel + Index * Increment;
># end
># declare Grundflaeche =
>polygon
>{
> 6, Eckpunkt[0], Eckpunkt[1], Eckpunkt[2],
> Eckpunkt[3], Eckpunkt[4], Eckpunkt[5]
>}
>
>Thank you
>
>
>
>
Planes are objects that can be intersected (intersection{}) or
diferenced (difference{}), they do have a deffinite interior and exterior.
In your case, you can start with a cylinder or a sphere, use 6 planes to
chop off the faces and a cylinder to bore the hole.
You can also start with a prism from whitch you subtract a cylinder.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|