Coder Social home page Coder Social logo

howto polyline? about pyautocad HOT 4 OPEN

reclosedev avatar reclosedev commented on July 18, 2024
howto polyline?

from pyautocad.

Comments (4)

FrancoTonutti avatar FrancoTonutti commented on July 18, 2024 3
from pyautocad import Autocad
import array

acad = Autocad(create_if_not_exists=True)

points_2d = [0, 0, 1, 1, 2, 1]
points_double = array.array("d", points_2d)
acad.model.AddLightWeightPolyline(points_double)

points_3d = [0, 0, 0, 1, 1, 0, 2, 1, 0]
points_double = array.array("d", points_3d)
acad.model.AddPolyline(points_double)

from pyautocad.

iNakel avatar iNakel commented on July 18, 2024
from pyautocad import Autocad
import array

acad = Autocad(create_if_not_exists=True)

points_2d = [0, 0, 1, 1, 2, 1]
points_double = array.array("d", points_2d)
acad.model.AddLightWeightPolyline(points_double)

points_3d = [0, 0, 0, 1, 1, 0, 2, 1, 0]
points_double = array.array("d", points_3d)
acad.model.AddPolyline(points_double)

the result is a 2D Polyline... and not a 3D Polyline... ¿is it possible to get it 3D?

from pyautocad.

better319 avatar better319 commented on July 18, 2024

in the end how to choice the “closed”,when finish draw

from pyautocad.

CEXT-Dan avatar CEXT-Dan commented on July 18, 2024

in the end how to choice the “closed”,when finish draw

use Closed..
https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-5A604B98-B6DE-42C3-97D9-98B8CAEBB507

from pyautocad import Autocad
import array

acad = Autocad(create_if_not_exists=True)

points_3d = [0, 0, 0, 1, 1, 0, 2, 1, 0]
points_double = array.array("d", points_3d)
pline = acad.model.AddPolyline(points_double)
pline.Closed = True

from pyautocad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.