jfc4120 wrote: ↑Sun Jul 24, 2022 5:13 pm
@onekk thanks for answers. But also using this code:
Code: Select all
zaxis = App.Vector(0, 0, 1)
p1 = App.Vector(0, TCLRD + WD, 0)
place1 = App.Placement(p1, App.Rotation(zaxis, 0))
circle1 = Draft.make_circle(TCLRD, placement=place1, face=None, startangle=270 - ELDG, endangle=270, support=None)
And that is using the example in the documentation.
Is there a way to get the begin point and end point of that arc? Or do I have to use part library or what.
I rarely use Draft as Part is more low level, and surely respect the Topology Chain.
with great approximations shape - faces - wires - edges - vertexes
Draft is not bad, but it returns DocumentObjects, so you have some side effects, you have all the intermediate objects that for complex objects will enlarge the file size.
So I prefer to use Part and explicitly use Part.show to explicity visualize things.
I rarely use Draft as there is some overhead built on Shapes (In fact it was made to ease some geometric works.) and have some more high level constructs, but I prefer the low level ways as it expose more cleanly OCCT primitives.
As example in Part you have Part.Line (that is the line of geometry so an infinite line passing from two point) and the more used Part.LineSegment that is the segment that join two points.
Plus with Part you could use Curves and limit them using toShape(min, max) that is more near to the way OCCT work.
Draft is taylored to resemble more a 2D CAD program that produce everytime something to display.
Part is more near to the concept of "building block" and you could see in the second example the use when building patametric solids creating wires faces solud but also manipulate them using some things like the offset2d thing that is very powerful once you know his limitations.
Hope it helps.
Carlo D.