Revision: 50649
http://brlcad.svn.sourceforge.net/brlcad/?rev=50649&view=rev
Author: phoenixyjll
Date: 2012-05-24 03:15:33 +0000 (Thu, 24 May 2012)
Log Message:
-----------
Changed the position of the sketch in extrude according to the parameters.
Some comment is added to make it clear.
Modified Paths:
--------------
brlcad/trunk/src/librt/primitives/extrude/extrude_brep.cpp
Modified: brlcad/trunk/src/librt/primitives/extrude/extrude_brep.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/extrude/extrude_brep.cpp 2012-05-23
21:06:26 UTC (rev 50648)
+++ brlcad/trunk/src/librt/primitives/extrude/extrude_brep.cpp 2012-05-24
03:15:33 UTC (rev 50649)
@@ -46,9 +46,22 @@
struct rt_extrude_internal *eip;
eip = (struct rt_extrude_internal *)ip->idb_ptr;
RT_EXTRUDE_CK_MAGIC(eip);
- tmp_internal->idb_ptr = (genptr_t)eip->skt;
+
+ // Create a sketch whose shape is according to eip->skt,
+ // and position is according to eip->V, eip->u_vec and eip->v_vec.
+ // Then convert the sketch to BREP.
+ struct rt_sketch_internal sketch;
+ sketch = *(eip->skt);
+ VMOVE(sketch.V, eip->V);
+ VMOVE(sketch.u_vec, eip->u_vec);
+ VMOVE(sketch.v_vec, eip->v_vec);
+ tmp_internal->idb_ptr = (genptr_t)(&sketch);
rt_sketch_brep(b, tmp_internal, tol);
- const ON_Curve* extrudepath = new ON_LineCurve(ON_3dPoint(eip->V),
ON_3dPoint(eip->h));
+
+ // Create the extrude path and make the extrude primitive.
+ vect_t endpoint;
+ VADD2(endpoint, eip->V, eip->h);
+ const ON_Curve* extrudepath = new ON_LineCurve(ON_3dPoint(eip->V),
ON_3dPoint(endpoint));
ON_Brep& brep = *(*b);
ON_BrepExtrudeFace(brep, 0, *extrudepath, true);
bu_free(tmp_internal, "free temporary rt_db_internal");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
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 Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits