Hi Philippe,

There are numerous examples in our source tree, but we basically leverage the 
Rhino OpenNURBS API directly.  Here's a couple (similar) examples that create a 
cube:  

http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/proc-db/breplicator.cpp
http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/proc-db/brep_cube.cpp

Cheers!
Sean



On Jan 12, 2013, at 9:38 AM, Philippe de Rochambeau wrote:

> Hi,
> 
> could you please provide a simple example of creating NURBS programmatically?
> 
> Thanks.
> 
> Philippe
> 
> 
> Le 7 janv. 2013 à 19:39, Christopher Sean Morrison <brl...@mac.com> a écrit :
> 
>> 
>> On Jan 6, 2013, at 3:01 PM, Philippe de Rochambeau wrote:
>> 
>>> how do you create trimmed NURBS in BRL-CAD?
>> 
>> Via import using either our step-g or 3dm-g importers.  We don't yet provide 
>> a way to interactively create/edit NURBS.  Programmatically, there are 
>> several options.
>> 
>>> what is the best way in BRL-CAD to model fonts such as the New York Times's 
>>> (see http://www.nytimes.com/) with it's serifs and curves?
>> 
>> Currently, the best way is to render the font to a bitmap image, then 
>> extrude the bitmap.  There's an example here:  http://brlcad.org/wiki/EBM 
>> 
>>> the following command in the Command Window causes the BRLCAD 7.22 for 
>>> MacOSX application to freeze:
>>> 
>>> exec ./rel-7.22.0/bin/pix-fb -F0 -s 950 
>>> /Users/philippe/Desktop/BRLCad/hache.pix
>> 
>> 
>> Hard to say with certainty what's going on there without more information 
>> but given how the tcl 'exec' command works, it is going to hang until pix-fb 
>> terminates.  Unfortunately, that's intrinsic and the secure fix would be to 
>> just disable the exec command.  I recommend running pix-fb outside of mged 
>> instead.
>> 
>> Cheers!
>> Sean
>> 
>> 
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. SALE $99.99 this month only -- learn more at:
>> http://p.sf.net/sfu/learnmore_122412
>> _______________________________________________
>> BRL-CAD Users mailing list
>> brlcad-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/brlcad-users
> 
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122912
> _______________________________________________
> BRL-CAD Users mailing list
> brlcad-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-users


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
BRL-CAD Users mailing list
brlcad-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-users

Reply via email to