mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 04:59:52 +00:00
SVG fix bug in point interpolation
This commit is contained in:
@@ -1314,7 +1314,7 @@ void SvgSerializer::write(const geometry_data& data) {
|
|||||||
// Sample some points on the line and assure it's inside.
|
// Sample some points on the line and assure it's inside.
|
||||||
bool all_inside = true;
|
bool all_inside = true;
|
||||||
for (int i = 5; i < 95; ++i) {
|
for (int i = 5; i < 95; ++i) {
|
||||||
gp_Pnt p3d((pa.XYZ() + pb.XYZ()) * i / 100.);
|
gp_Pnt p3d((pa.XYZ() + (pb.XYZ() - pa.XYZ()) * i / 100.));
|
||||||
gp_Pnt2d p2d(p3d.X(), p3d.Y());
|
gp_Pnt2d p2d(p3d.X(), p3d.Y());
|
||||||
|
|
||||||
if (fcls.Perform(p2d) != TopAbs_IN) {
|
if (fcls.Perform(p2d) != TopAbs_IN) {
|
||||||
|
|||||||
Reference in New Issue
Block a user