On Jul 10, 2012, at 2:12 AM, crdueck wrote:

> finding the new inside corners is working now for sketches consisting of only 
> line segments and circular arcs as the important points used to divide the 
> sketch into rectangular sections are simply their end points. but for 
> bezier/NURBS segments I'll need their critical points.
> 
> plussai mentioned some useful looking functions for NURBS in 
> src/librt/opennurbs_ext.cpp, which i'll take a look at, but i'd have to 
> promote the nurb_seg into a full ON_Curve in order to use those. however, i 
> think i'll need to use some of the NURBS API functions anyways in order to 
> evaluate the bezier/NURBS segments so it makes sense to do that unless there 
> is already some simpler way to analyze the curve segments.

That seems like an acceptable form of reuse -- just take care to make sure any 
openNURBS API you are intending to call actually has an implementation defined 
(either in src/librt/opennurbs_ext.* or in src/other/openNURBS/*).  Many of 
their API functions do not have an implementation, which is why we provide 
extensions in opennurbs_ext implementing some of the pieces they removed.

> also, i havent touched any of the C++ codebase yet, will there be any issues 
> calling ON functions in librt/primitives/sketch.c? where should I look for 
> examples of opennurbs API functions being used in librt?

There's not any issues other than proper containment.  You cannot make any 
changes that would expose a C++ type to LIBRT's API.  That is, you can't make a 
new public function or change an existing one (any defined by RT_EXPORT) to 
make it pass a C++ object.  You CAN, however, use C++ properly encapsulated.

I'd suggest adding a new sketch_tess.cpp and including all of the C++ guts 
related to tessellation in there.  Make sense?

Cheers!
Sean



------------------------------------------------------------------------------
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/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to