OpenSCAD/Generalità: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Gian BOT (discussione | contributi)
m Bot: sostituzione tag obsoleti
Nessun oggetto della modifica
Etichetta: Editor wikitesto 2017
Riga 345:
Getting a point is useful for reading an origin point in a 2D view in a technical drawing. The function dxf_cross will read the intersection of two lines on a layer you specify and return the intersection point. This means that the point must be given with two lines in the DXF file, and not a point entity.
 
<sourcesyntaxhighlight lang="java">
OriginPoint = dxf_cross(file="drawing.dxf", layer="SCAD.Origin",
origin=[0, 0], scale=1);
</syntaxhighlight>
</source>
 
'''Getting a dimension value'''
Riga 354:
You can read dimensions from a technical drawing. This can be useful to read a rotation angle, an extrusion height, or spacing between parts. In the drawing, create a dimension that does not show the dimension value, but an identifier. To read the value, you specify this identifier from your program:
 
<sourcesyntaxhighlight lang="java">
TotalWidth = dxf_dim(file="drawing.dxf", name="TotalWidth",
layer="SCAD.Origin", origin=[0, 0], scale=1);
</syntaxhighlight>
</source>
 
For a nice example of both functions, see Example009 and the image on the [http://www.openscad.org/ homepage of OpenSCAD].