free-cad-general

Hi All
I've been playing with FreeCAD on and off for a little while and have
now decided to start investigating the scripting interface.
I've started out going through the bottle example and comparing the Open
Cascade notes with the FreeCAD script.
Now I'm stuck on the threaded neck of the bottle and need some advice.
It looks like the Open Cascade example creates 2 cylindrical surfaces
for the wires defining the thread. My sticking point is how to generate
a cylindrical surface by script. The Open Cascade calls in question are:
/Handle(Geom_CylindricalSurface) aCyl1 = new
Geom_CylindricalSurface(neckAx2 , myNeckRadius * 0.99);
Handle(Geom_CylindricalSurface) aCyl2 = new
Geom_CylindricalSurface(neckAx2 , myNeckRadius * 1.05);
///
How do I do this operation in FreeCAD? I took a look at the source and
could only see Bezier and BSpline surfaces in src/Mod/Part/App but
couldn't see a cylindrical surface anywhere. It also looked like this
Geom_CylindricalSurface call is made in multiple places but doesn't look
exposed.
Am I missing something? Remember I'm a real noob with the scripting part
so the answer may be obvious and I'm just missing it.
Thanks
Alex.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css">"body { font-family:'Times New Roman'; font-size:13px"}</style>
</head>
<body>May I ask why you are using FreeCad? Have you tried AutoCAD? I know the software is open source and has a lot of potential but I think the developers have their priorities out of whack; why put all that attention in a program and limit it with only a metric unit?<BR><BR>If you are interested in AutoCAD I can hook you up.<BR><BR>Tim<BR><BR>On Sat, 19 May 2012 20:39:43 -0400, Alex Barclay &lt;alex@...&gt; wrote:<BR><BR><BLOCKQUOTE style="margin: 0 0 0.80ex; border-left: #0000FF 2px solid; padding-left: 1ex"><body bgcolor="#FFFFFF" text="#000000">
Hi All<br>
<br>
I've been playing with FreeCAD on and off for a little while and
have now decided to start investigating the scripting interface.<br>
<br>
I've started out going through the bottle example and comparing the
Open Cascade notes with the FreeCAD script.<br>
<br>
Now I'm stuck on the threaded neck of the bottle and need some
advice. It looks like the Open Cascade example creates 2 cylindrical
surfaces for the wires defining the thread. My sticking point is how
to generate a cylindrical surface by script. The Open Cascade calls
in question are:<br>
<meta charset="utf-8">
<i style="color: rgb(0, 0, 0); font-family: verdana; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
background-color: rgb(255, 255, 255); font-size: small;">Handle(Geom_CylindricalSurface)
aCyl1 = new Geom_CylindricalSurface(neckAx2 , myNeckRadius *
0.99);<br>
Handle(Geom_CylindricalSurface) aCyl2 = new
Geom_CylindricalSurface(neckAx2 , myNeckRadius * 1.05);<br>
</i><i style="color: rgb(0, 0, 0); font-family: verdana;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: small; "></i><br>
How do I do this operation in FreeCAD? I took a look at the source
and could only see Bezier and BSpline surfaces in src/Mod/Part/App
but couldn't see a cylindrical surface anywhere. It also looked like
this Geom_CylindricalSurface call is made in multiple places but
doesn't look exposed.<br>
<br>
Am I missing something? Remember I'm a real noob with the scripting
part so the answer may be obvious and I'm just missing it.<br>
<br>
Thanks<br>
<br>
Alex.<br>
<br>
</BLOCKQUOTE><BR><BR><BR>

To Tim Taylor (if that's really your name):
Great Tim, that was inspirational. Why do you hang out with our group,
if you think we are way off track?
Are you a legit VAR for Autodesk?
I suggest you unsubscribe from this list.
Dan
On 05/20/2012 12:17 PM, Tim Taylor wrote:
> May I ask why you are using FreeCad? Have you tried AutoCAD? I know
> the software is open source and has a lot of potential but I think the
> developers have their priorities out of whack; why put all that
> attention in a program and limit it with only a metric unit?
>
> If you are interested in AutoCAD I can hook you up.
>
> Tim
>
> On Sat, 19 May 2012 20:39:43 -0400, Alex Barclay
> <alex@...> wrote:
>
> Hi All
>
> I've been playing with FreeCAD on and off for a little while and
> have now decided to start investigating the scripting interface.
>
> I've started out going through the bottle example and comparing
> the Open Cascade notes with the FreeCAD script.
>
> Now I'm stuck on the threaded neck of the bottle and need some
> advice. It looks like the Open Cascade example creates 2
> cylindrical surfaces for the wires defining the thread. My
> sticking point is how to generate a cylindrical surface by script.
> The Open Cascade calls in question are:
> /Handle(Geom_CylindricalSurface) aCyl1 = new
> Geom_CylindricalSurface(neckAx2 , myNeckRadius * 0.99);
> Handle(Geom_CylindricalSurface) aCyl2 = new
> Geom_CylindricalSurface(neckAx2 , myNeckRadius * 1.05);
> /
> How do I do this operation in FreeCAD? I took a look at the source
> and could only see Bezier and BSpline surfaces in src/Mod/Part/App
> but couldn't see a cylindrical surface anywhere. It also looked
> like this Geom_CylindricalSurface call is made in multiple places
> but doesn't look exposed.
>
> Am I missing something? Remember I'm a real noob with the
> scripting part so the answer may be obvious and I'm just missing it.
>
> Thanks
>
> Alex.
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
> _______________________________________________
> Free-cad-general mailing list
> Free-cad-general@...
> https://lists.sourceforge.net/lists/listinfo/free-cad-general

Well said Dan...
@Alex, about your question: As far as I know that Geom_CylindricalSurface
is indeed not exposed (yet). This goes little by little, and since the aim
of FreeCAD is not to reimplement the whole opencascade, there is no special
hurry at that, it is basically done when someone needs one of the OCC
tools. BTW, If you think something would be useful, don't hesitate to
suggest it on the freecad mantis tracker.
Now in this particular case, the bottle thread is indeed tricky... On the
freecad forum you'll find quite a lot of discussions about making threads
and helixes, but I believe you'll need to test other methods. Another
solution is to use pythonOCC (that can be imported in freecad and its
shapes transferred to/from freecad), there you have 100% of the OCC tools
available...
Yorik